diff --git a/CHANGELOG.md b/CHANGELOG.md index 341e89bb5a9..13e0e33eca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +Release v1.54.1 (2024-06-13) +=== + +### Service Client Updates +* `service/cloudhsmv2`: Updates service API and documentation + * Added support for hsm type hsm2m.medium. Added supported for creating a cluster in FIPS or NON_FIPS mode. +* `service/glue`: Updates service API and documentation + * This release adds support for configuration of evaluation method for composite rules in Glue Data Quality rulesets. +* `service/iotwireless`: Updates service API +* `service/kms`: Updates service API, documentation, and examples + * This feature allows customers to use their keys stored in KMS to derive a shared secret which can then be used to establish a secured channel for communication, provide proof of possession, or establish trust with other parties. +* `service/mediapackagev2`: Updates service API, documentation, and examples + Release v1.54.0 (2024-06-12) === diff --git a/aws/version.go b/aws/version.go index 929357349e4..6b081d63cdd 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.54.0" +const SDKVersion = "1.54.1" diff --git a/models/apis/cloudhsmv2/2017-04-28/api-2.json b/models/apis/cloudhsmv2/2017-04-28/api-2.json index 6c125bc862c..6e3ed4dbcba 100644 --- a/models/apis/cloudhsmv2/2017-04-28/api-2.json +++ b/models/apis/cloudhsmv2/2017-04-28/api-2.json @@ -5,6 +5,7 @@ "endpointPrefix":"cloudhsmv2", "jsonVersion":"1.1", "protocol":"json", + "protocols":["json"], "serviceAbbreviation":"CloudHSM V2", "serviceFullName":"AWS CloudHSM V2", "serviceId":"CloudHSM V2", @@ -277,7 +278,9 @@ "SourceBackup":{"shape":"BackupId"}, "SourceCluster":{"shape":"ClusterId"}, "DeleteTimestamp":{"shape":"Timestamp"}, - "TagList":{"shape":"TagList"} + "TagList":{"shape":"TagList"}, + "HsmType":{"shape":"HsmType"}, + "Mode":{"shape":"ClusterMode"} } }, "BackupId":{ @@ -326,7 +329,7 @@ "Boolean":{"type":"boolean"}, "Cert":{ "type":"string", - "max":5000, + "max":20000, "pattern":"[a-zA-Z0-9+-/=\\s]*" }, "Certificates":{ @@ -399,13 +402,21 @@ "SubnetMapping":{"shape":"ExternalSubnetMapping"}, "VpcId":{"shape":"VpcId"}, "Certificates":{"shape":"Certificates"}, - "TagList":{"shape":"TagList"} + "TagList":{"shape":"TagList"}, + "Mode":{"shape":"ClusterMode"} } }, "ClusterId":{ "type":"string", "pattern":"cluster-[2-7a-zA-Z]{11,16}" }, + "ClusterMode":{ + "type":"string", + "enum":[ + "FIPS", + "NON_FIPS" + ] + }, "ClusterState":{ "type":"string", "enum":[ @@ -458,7 +469,8 @@ "HsmType":{"shape":"HsmType"}, "SourceBackupId":{"shape":"BackupId"}, "SubnetIds":{"shape":"SubnetIds"}, - "TagList":{"shape":"TagList"} + "TagList":{"shape":"TagList"}, + "Mode":{"shape":"ClusterMode"} } }, "CreateClusterResponse":{ @@ -587,7 +599,8 @@ "Filters":{ "type":"map", "key":{"shape":"Field"}, - "value":{"shape":"Strings"} + "value":{"shape":"Strings"}, + "max":30 }, "Hsm":{ "type":"structure", @@ -619,7 +632,8 @@ }, "HsmType":{ "type":"string", - "pattern":"(hsm1\\.medium)" + "max":32, + "pattern":"((p|)hsm[0-9][a-z.]*\\.[a-zA-Z]+)" }, "Hsms":{ "type":"list", diff --git a/models/apis/cloudhsmv2/2017-04-28/docs-2.json b/models/apis/cloudhsmv2/2017-04-28/docs-2.json index 683bf159c0a..4c60d0e9655 100644 --- a/models/apis/cloudhsmv2/2017-04-28/docs-2.json +++ b/models/apis/cloudhsmv2/2017-04-28/docs-2.json @@ -166,6 +166,14 @@ "ModifyClusterRequest$ClusterId": "

The identifier (ID) of the cluster that you want to modify. To find the cluster ID, use DescribeClusters.

" } }, + "ClusterMode": { + "base": null, + "refs": { + "Backup$Mode": "

The mode of the cluster that was backed up.

", + "Cluster$Mode": "

The mode of the cluster.

", + "CreateClusterRequest$Mode": "

The mode to use in the cluster. The allowed values are FIPS and NON_FIPS.

" + } + }, "ClusterState": { "base": null, "refs": { @@ -329,8 +337,9 @@ "HsmType": { "base": null, "refs": { + "Backup$HsmType": "

The HSM type of the cluster that was backed up.

", "Cluster$HsmType": "

The type of HSM that the cluster contains.

", - "CreateClusterRequest$HsmType": "

The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium.

" + "CreateClusterRequest$HsmType": "

The type of HSM to use in the cluster. The allowed values are hsm1.medium and hsm2m.medium.

" } }, "Hsms": { diff --git a/models/apis/cloudhsmv2/2017-04-28/endpoint-rule-set-1.json b/models/apis/cloudhsmv2/2017-04-28/endpoint-rule-set-1.json new file mode 100644 index 00000000000..84e75cdaf06 --- /dev/null +++ b/models/apis/cloudhsmv2/2017-04-28/endpoint-rule-set-1.json @@ -0,0 +1,364 @@ +{ + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://cloudhsmv2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://cloudhsmv2-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://cloudhsmv2.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "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" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] +} \ No newline at end of file diff --git a/models/apis/cloudhsmv2/2017-04-28/endpoint-tests-1.json b/models/apis/cloudhsmv2/2017-04-28/endpoint-tests-1.json new file mode 100644 index 00000000000..811b511cf53 --- /dev/null +++ b/models/apis/cloudhsmv2/2017-04-28/endpoint-tests-1.json @@ -0,0 +1,587 @@ +{ + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "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 + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.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://cloudhsmv2-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://cloudhsmv2.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "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, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file diff --git a/models/apis/glue/2017-03-31/api-2.json b/models/apis/glue/2017-03-31/api-2.json index 97cb46f5eed..279321d23aa 100644 --- a/models/apis/glue/2017-03-31/api-2.json +++ b/models/apis/glue/2017-03-31/api-2.json @@ -5916,6 +5916,13 @@ "key":{"shape":"AdditionalOptionKeys"}, "value":{"shape":"GenericString"} }, + "DQCompositeRuleEvaluationMethod":{ + "type":"string", + "enum":[ + "COLUMN", + "ROW" + ] + }, "DQDLAliases":{ "type":"map", "key":{"shape":"NodeName"}, @@ -6009,7 +6016,8 @@ "type":"structure", "members":{ "CloudWatchMetricsEnabled":{"shape":"NullableBoolean"}, - "ResultsS3Prefix":{"shape":"UriString"} + "ResultsS3Prefix":{"shape":"UriString"}, + "CompositeRuleEvaluationMethod":{"shape":"DQCompositeRuleEvaluationMethod"} } }, "DataQualityMetricValues":{ diff --git a/models/apis/glue/2017-03-31/docs-2.json b/models/apis/glue/2017-03-31/docs-2.json index 2a98c8bdc8b..00aa1dbd1cb 100644 --- a/models/apis/glue/2017-03-31/docs-2.json +++ b/models/apis/glue/2017-03-31/docs-2.json @@ -2181,6 +2181,12 @@ "EvaluateDataQualityMultiFrame$AdditionalOptions": "

Options to configure runtime behavior of the transform.

" } }, + "DQCompositeRuleEvaluationMethod": { + "base": null, + "refs": { + "DataQualityEvaluationRunAdditionalRunOptions$CompositeRuleEvaluationMethod": "

Set the evaluation method for composite rules in the ruleset to ROW/COLUMN

" + } + }, "DQDLAliases": { "base": null, "refs": { @@ -7310,7 +7316,7 @@ "RulesetNames": { "base": null, "refs": { - "GetDataQualityRulesetEvaluationRunResponse$RulesetNames": "

A list of ruleset names for the run.

", + "GetDataQualityRulesetEvaluationRunResponse$RulesetNames": "

A list of ruleset names for the run. Currently, this parameter takes only one Ruleset name.

", "StartDataQualityRulesetEvaluationRunRequest$RulesetNames": "

A list of ruleset names.

" } }, diff --git a/models/apis/iotwireless/2020-11-22/api-2.json b/models/apis/iotwireless/2020-11-22/api-2.json index 7af36af69bd..39dc04d404e 100644 --- a/models/apis/iotwireless/2020-11-22/api-2.json +++ b/models/apis/iotwireless/2020-11-22/api-2.json @@ -9,7 +9,8 @@ "serviceId":"IoT Wireless", "signatureVersion":"v4", "signingName":"iotwireless", - "uid":"iotwireless-2020-11-22" + "uid":"iotwireless-2020-11-22", + "auth":["aws.auth#sigv4"] }, "operations":{ "AssociateAwsAccountWithPartnerAccount":{ @@ -5123,6 +5124,8 @@ "enum":[ "DeviceRSSI", "DeviceSNR", + "DeviceRoamingRSSI", + "DeviceRoamingSNR", "DeviceUplinkCount", "DeviceDownlinkCount", "DeviceUplinkLostCount", diff --git a/models/apis/kms/2014-11-01/api-2.json b/models/apis/kms/2014-11-01/api-2.json index 644785a98c3..5e41743ea1b 100644 --- a/models/apis/kms/2014-11-01/api-2.json +++ b/models/apis/kms/2014-11-01/api-2.json @@ -11,7 +11,8 @@ "serviceId":"KMS", "signatureVersion":"v4", "targetPrefix":"TrentService", - "uid":"kms-2014-11-01" + "uid":"kms-2014-11-01", + "auth":["aws.auth#sigv4"] }, "operations":{ "CancelKeyDeletion":{ @@ -202,6 +203,26 @@ {"shape":"KMSInvalidStateException"} ] }, + "DeriveSharedSecret":{ + "name":"DeriveSharedSecret", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeriveSharedSecretRequest"}, + "output":{"shape":"DeriveSharedSecretResponse"}, + "errors":[ + {"shape":"NotFoundException"}, + {"shape":"DisabledException"}, + {"shape":"KeyUnavailableException"}, + {"shape":"DependencyTimeoutException"}, + {"shape":"InvalidGrantTokenException"}, + {"shape":"InvalidKeyUsageException"}, + {"shape":"KMSInternalException"}, + {"shape":"KMSInvalidStateException"}, + {"shape":"DryRunOperationException"} + ] + }, "DescribeCustomKeyStores":{ "name":"DescribeCustomKeyStores", "http":{ @@ -1356,6 +1377,32 @@ "exception":true, "fault":true }, + "DeriveSharedSecretRequest":{ + "type":"structure", + "required":[ + "KeyId", + "KeyAgreementAlgorithm", + "PublicKey" + ], + "members":{ + "KeyId":{"shape":"KeyIdType"}, + "KeyAgreementAlgorithm":{"shape":"KeyAgreementAlgorithmSpec"}, + "PublicKey":{"shape":"PublicKeyType"}, + "GrantTokens":{"shape":"GrantTokenList"}, + "DryRun":{"shape":"NullableBooleanType"}, + "Recipient":{"shape":"RecipientInfo"} + } + }, + "DeriveSharedSecretResponse":{ + "type":"structure", + "members":{ + "KeyId":{"shape":"KeyIdType"}, + "SharedSecret":{"shape":"PlaintextType"}, + "CiphertextForRecipient":{"shape":"CiphertextType"}, + "KeyAgreementAlgorithm":{"shape":"KeyAgreementAlgorithmSpec"}, + "KeyOrigin":{"shape":"OriginType"} + } + }, "DescribeCustomKeyStoresRequest":{ "type":"structure", "members":{ @@ -1708,7 +1755,8 @@ "KeySpec":{"shape":"KeySpec"}, "KeyUsage":{"shape":"KeyUsageType"}, "EncryptionAlgorithms":{"shape":"EncryptionAlgorithmSpecList"}, - "SigningAlgorithms":{"shape":"SigningAlgorithmSpecList"} + "SigningAlgorithms":{"shape":"SigningAlgorithmSpecList"}, + "KeyAgreementAlgorithms":{"shape":"KeyAgreementAlgorithmSpecList"} } }, "GrantConstraints":{ @@ -1765,7 +1813,8 @@ "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", - "VerifyMac" + "VerifyMac", + "DeriveSharedSecret" ] }, "GrantOperationList":{ @@ -1909,6 +1958,14 @@ }, "exception":true }, + "KeyAgreementAlgorithmSpec":{ + "type":"string", + "enum":["ECDH"] + }, + "KeyAgreementAlgorithmSpecList":{ + "type":"list", + "member":{"shape":"KeyAgreementAlgorithmSpec"} + }, "KeyEncryptionMechanism":{ "type":"string", "enum":["RSAES_OAEP_SHA_256"] @@ -1963,6 +2020,7 @@ "KeySpec":{"shape":"KeySpec"}, "EncryptionAlgorithms":{"shape":"EncryptionAlgorithmSpecList"}, "SigningAlgorithms":{"shape":"SigningAlgorithmSpecList"}, + "KeyAgreementAlgorithms":{"shape":"KeyAgreementAlgorithmSpecList"}, "MultiRegion":{"shape":"NullableBooleanType"}, "MultiRegionConfiguration":{"shape":"MultiRegionConfiguration"}, "PendingDeletionWindowInDays":{"shape":"PendingWindowInDaysType"}, @@ -2020,7 +2078,8 @@ "enum":[ "SIGN_VERIFY", "ENCRYPT_DECRYPT", - "GENERATE_VERIFY_MAC" + "GENERATE_VERIFY_MAC", + "KEY_AGREEMENT" ] }, "LimitExceededException":{ diff --git a/models/apis/kms/2014-11-01/docs-2.json b/models/apis/kms/2014-11-01/docs-2.json index f3f40bcfe31..c6945f4f198 100644 --- a/models/apis/kms/2014-11-01/docs-2.json +++ b/models/apis/kms/2014-11-01/docs-2.json @@ -7,11 +7,12 @@ "CreateAlias": "

Creates a friendly name for a KMS key.

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.

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 GenerateDataKey. You can also change the KMS key that's associated with the alias (UpdateAlias) or delete the alias (DeleteAlias) at any time. These operations don't affect the underlying KMS key.

You can associate the alias with any customer managed key in the same Amazon Web Services Region. Each alias is associated with only one KMS key at a time, but a KMS key can have multiple aliases. A valid KMS key is required. You can't create an alias without a KMS key.

The alias must be unique in the account and Region, but you can have aliases with the same name in different Regions. For detailed information about aliases, see Using aliases in the Key Management Service Developer Guide.

This operation does not return a response. To get the alias that you created, use the ListAliases operation.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.

Required permissions

For details, see Controlling access to aliases in the Key Management Service Developer Guide.

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "CreateCustomKeyStore": "

Creates a custom key store backed by a key store that you own and manage. When you use a KMS key in a custom key store for a cryptographic operation, the cryptographic operation is actually performed in your key store using your keys. KMS supports CloudHSM key stores backed by an CloudHSM cluster and external key stores backed by an external key store proxy and external key manager outside of Amazon Web Services.

This operation is part of the custom key stores feature in KMS, which combines the convenience and extensive integration of KMS with the isolation and control of a key store that you own and manage.

Before you create the custom key store, the required elements must be in place and operational. We recommend that you use the test tools that KMS provides to verify the configuration your external key store proxy. For details about the required elements and verification tests, see Assemble the prerequisites (for CloudHSM key stores) or Assemble the prerequisites (for external key stores) in the Key Management Service Developer Guide.

To create a custom key store, use the following parameters.

For external key stores:

Some external key managers provide a simpler method for creating an external key store. For details, see your external key manager documentation.

When creating an external key store in the KMS console, you can upload a JSON-based proxy configuration file with the desired values. You cannot use a proxy configuration with the CreateCustomKeyStore operation. However, you can use the values in the file to help you determine the correct values for the CreateCustomKeyStore parameters.

When the operation completes successfully, it returns the ID of the new custom key store. 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 cluster, or to connect a new external key store to the external key store proxy for your external key manager. Even if you are not going to use your custom key store immediately, you might want to connect it to verify that all settings are correct and then disconnect it until you are ready to use it.

For help with failures, see Troubleshooting a custom key store in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

Required permissions: kms:CreateCustomKeyStore (IAM policy).

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "CreateGrant": "

Adds a grant to a KMS key.

A grant is a policy instrument that allows Amazon Web Services principals to use 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, grants are considered along with key policies and IAM policies. Grants are often used for temporary permissions because you can create one, use its permissions, and delete it without changing your key policies or IAM policies.

For detailed information about grants, including grant terminology, see Grants in KMS in the Key Management Service Developer Guide . For examples of working with grants in several programming languages, see Programming grants.

The CreateGrant operation returns a GrantToken and a GrantId.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key ARN in the value of the KeyId parameter.

Required permissions: kms:CreateGrant (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", - "CreateKey": "

Creates a unique customer managed KMS key in your Amazon Web Services account and Region. You can use a KMS key in cryptographic operations, such as encryption and signing. Some Amazon Web Services services let you use KMS keys that you create and manage to protect your service resources.

A KMS key is a logical representation of a cryptographic key. In addition to the key material used in cryptographic operations, a KMS key includes metadata, such as the key ID, key policy, creation date, description, and key state. For details, see Managing keys in the Key Management Service Developer Guide

Use the parameters of CreateKey to specify the type of KMS key, the source of its key material, its key policy, description, tags, and other properties.

KMS has replaced the term customer master key (CMK) with KMS key and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.

To create different types of KMS keys, use the following guidance:

Symmetric encryption KMS key

By default, CreateKey creates a symmetric encryption KMS key with key material that KMS generates. This is the basic and most widely used type of KMS key, and provides the best performance.

To create a symmetric encryption KMS key, you don't need to specify any parameters. The default value for KeySpec, SYMMETRIC_DEFAULT, the default value for KeyUsage, ENCRYPT_DECRYPT, and the default value for Origin, AWS_KMS, create a symmetric encryption KMS key with KMS key material.

If you need a key for basic encryption and decryption or you are creating a KMS key to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key. The key material in a symmetric encryption key never leaves KMS unencrypted. You can use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but they are typically used to generate data keys and data keys pairs. For details, see GenerateDataKey and GenerateDataKeyPair.

Asymmetric KMS keys

To create an asymmetric KMS key, use the KeySpec parameter to specify the type of key material in the KMS key. Then, use the KeyUsage parameter to determine whether the KMS key will be used to encrypt and decrypt or sign and verify. You can't change these properties after the KMS key is created.

Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or an SM2 key pair (China Regions only). The private key in an asymmetric KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey operation to download the public key so it can be used outside of KMS. KMS keys with RSA or SM2 key pairs can be used to encrypt or decrypt data or sign and verify messages (but not both). KMS keys with ECC key pairs can be used only to sign and verify messages. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

HMAC KMS key

To create an HMAC KMS key, set the KeySpec parameter to a key spec value for HMAC KMS keys. Then set the KeyUsage parameter to GENERATE_VERIFY_MAC. You must set the key usage even though GENERATE_VERIFY_MAC is the only valid key usage value for HMAC KMS keys. You can't change these properties after the KMS key is created.

HMAC KMS keys are symmetric keys that never leave KMS unencrypted. You can use HMAC keys to generate (GenerateMac) and verify (VerifyMac) HMAC codes for messages up to 4096 bytes.

Multi-Region primary keys
Imported key material

To create a multi-Region primary key in the local Amazon Web Services Region, use the MultiRegion parameter with a value of True. To create a multi-Region replica key, that is, a KMS key with the same key ID and key material as a primary key, but in a different Amazon Web Services Region, use the ReplicateKey operation. To change a replica key to a primary key, and its primary key to a replica key, use the UpdatePrimaryRegion operation.

You can create multi-Region KMS keys for all supported KMS key types: symmetric encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric signing KMS keys. You can also create multi-Region keys with imported key material. However, you can't create multi-Region keys in a custom key store.

This operation supports multi-Region keys, an KMS feature that lets you create multiple interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt 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.

To import your own key material into a KMS key, begin by creating a KMS key with no key material. To do this, use the Origin parameter of CreateKey with a value of EXTERNAL. Next, use GetParametersForImport operation to get a public key and import token. Use the wrapping public key to encrypt your key material. Then, use ImportKeyMaterial with your import token to import the key material. For step-by-step instructions, see Importing Key Material in the Key Management Service Developer Guide .

You can import key material into KMS keys of all supported KMS key types: symmetric encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric signing KMS keys. You can also create multi-Region keys with imported key material. However, you can't import key material into a KMS key in a custom key store.

To create a multi-Region primary key with imported key material, use the Origin parameter of CreateKey with a value of EXTERNAL and the MultiRegion parameter with a value of True. To create replicas of the multi-Region primary key, use the ReplicateKey operation. For instructions, see Importing key material into multi-Region keys. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

Custom key store

A custom key store lets you protect your Amazon Web Services resources using keys in a backing key store that you own and manage. When you request a cryptographic operation with a KMS key in a custom key store, the operation is performed in the backing key store using its cryptographic keys.

KMS supports CloudHSM key stores backed by an CloudHSM cluster and external key stores backed by an external key manager outside of Amazon Web Services. When you create a KMS key in an CloudHSM key store, KMS generates an encryption key in the CloudHSM cluster and associates it with the KMS key. When you create a KMS key in an external key store, you specify an existing encryption key in the external key manager.

Some external key managers provide a simpler method for creating a KMS key in an external key store. For details, see your external key manager documentation.

Before you create a KMS key in a custom key store, the ConnectionState of the key store must be CONNECTED. To connect the custom key store, use the ConnectCustomKeyStore operation. To find the ConnectionState, use the DescribeCustomKeyStores operation.

To create a KMS key in a custom key store, use the CustomKeyStoreId. Use the default KeySpec value, SYMMETRIC_DEFAULT, and the default KeyUsage value, ENCRYPT_DECRYPT to create a symmetric encryption key. No other key type is supported in a custom key store.

To create a KMS key in an CloudHSM key store, use the Origin parameter with a value of AWS_CLOUDHSM. The CloudHSM cluster that is associated with the custom key store must have at least two active HSMs in different Availability Zones in the Amazon Web Services Region.

To create a KMS key in an external key store, use the Origin parameter with a value of EXTERNAL_KEY_STORE and an XksKeyId parameter that identifies an existing external key.

Some external key managers provide a simpler method for creating a KMS key in an external key store. For details, see your external key manager documentation.

Cross-account use: No. You cannot use this operation to create a KMS key in a different Amazon Web Services account.

Required permissions: kms:CreateKey (IAM policy). To use the Tags parameter, kms:TagResource (IAM policy). For examples and information about related permissions, see Allow a user to create KMS keys in the Key Management Service Developer Guide.

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", + "CreateKey": "

Creates a unique customer managed KMS key in your Amazon Web Services account and Region. You can use a KMS key in cryptographic operations, such as encryption and signing. Some Amazon Web Services services let you use KMS keys that you create and manage to protect your service resources.

A KMS key is a logical representation of a cryptographic key. In addition to the key material used in cryptographic operations, a KMS key includes metadata, such as the key ID, key policy, creation date, description, and key state. For details, see Managing keys in the Key Management Service Developer Guide

Use the parameters of CreateKey to specify the type of KMS key, the source of its key material, its key policy, description, tags, and other properties.

KMS has replaced the term customer master key (CMK) with KMS key and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.

To create different types of KMS keys, use the following guidance:

Symmetric encryption KMS key

By default, CreateKey creates a symmetric encryption KMS key with key material that KMS generates. This is the basic and most widely used type of KMS key, and provides the best performance.

To create a symmetric encryption KMS key, you don't need to specify any parameters. The default value for KeySpec, SYMMETRIC_DEFAULT, the default value for KeyUsage, ENCRYPT_DECRYPT, and the default value for Origin, AWS_KMS, create a symmetric encryption KMS key with KMS key material.

If you need a key for basic encryption and decryption or you are creating a KMS key to protect your resources in an Amazon Web Services service, create a symmetric encryption KMS key. The key material in a symmetric encryption key never leaves KMS unencrypted. You can use a symmetric encryption KMS key to encrypt and decrypt data up to 4,096 bytes, but they are typically used to generate data keys and data keys pairs. For details, see GenerateDataKey and GenerateDataKeyPair.

Asymmetric KMS keys

To create an asymmetric KMS key, use the KeySpec parameter to specify the type of key material in the KMS key. Then, use the KeyUsage parameter to determine whether the KMS key will be used to encrypt and decrypt or sign and verify. You can't change these properties after the KMS key is created.

Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or an SM2 key pair (China Regions only). The private key in an asymmetric KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey operation to download the public key so it can be used outside of KMS. Each KMS key can have only one key usage. KMS keys with RSA key pairs can be used to encrypt and decrypt data or sign and verify messages (but not both). KMS keys with NIST-recommended ECC key pairs can be used to sign and verify messages or derive shared secrets (but not both). KMS keys with ECC_SECG_P256K1 can be used only to sign and verify messages. KMS keys with SM2 key pairs (China Regions only) can be used to either encrypt and decrypt data, sign and verify messages, or derive shared secrets (you must choose one key usage type). For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

HMAC KMS key

To create an HMAC KMS key, set the KeySpec parameter to a key spec value for HMAC KMS keys. Then set the KeyUsage parameter to GENERATE_VERIFY_MAC. You must set the key usage even though GENERATE_VERIFY_MAC is the only valid key usage value for HMAC KMS keys. You can't change these properties after the KMS key is created.

HMAC KMS keys are symmetric keys that never leave KMS unencrypted. You can use HMAC keys to generate (GenerateMac) and verify (VerifyMac) HMAC codes for messages up to 4096 bytes.

Multi-Region primary keys
Imported key material

To create a multi-Region primary key in the local Amazon Web Services Region, use the MultiRegion parameter with a value of True. To create a multi-Region replica key, that is, a KMS key with the same key ID and key material as a primary key, but in a different Amazon Web Services Region, use the ReplicateKey operation. To change a replica key to a primary key, and its primary key to a replica key, use the UpdatePrimaryRegion operation.

You can create multi-Region KMS keys for all supported KMS key types: symmetric encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric signing KMS keys. You can also create multi-Region keys with imported key material. However, you can't create multi-Region keys in a custom key store.

This operation supports multi-Region keys, an KMS feature that lets you create multiple interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt 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.

To import your own key material into a KMS key, begin by creating a KMS key with no key material. To do this, use the Origin parameter of CreateKey with a value of EXTERNAL. Next, use GetParametersForImport operation to get a public key and import token. Use the wrapping public key to encrypt your key material. Then, use ImportKeyMaterial with your import token to import the key material. For step-by-step instructions, see Importing Key Material in the Key Management Service Developer Guide .

You can import key material into KMS keys of all supported KMS key types: symmetric encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and asymmetric signing KMS keys. You can also create multi-Region keys with imported key material. However, you can't import key material into a KMS key in a custom key store.

To create a multi-Region primary key with imported key material, use the Origin parameter of CreateKey with a value of EXTERNAL and the MultiRegion parameter with a value of True. To create replicas of the multi-Region primary key, use the ReplicateKey operation. For instructions, see Importing key material into multi-Region keys. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

Custom key store

A custom key store lets you protect your Amazon Web Services resources using keys in a backing key store that you own and manage. When you request a cryptographic operation with a KMS key in a custom key store, the operation is performed in the backing key store using its cryptographic keys.

KMS supports CloudHSM key stores backed by an CloudHSM cluster and external key stores backed by an external key manager outside of Amazon Web Services. When you create a KMS key in an CloudHSM key store, KMS generates an encryption key in the CloudHSM cluster and associates it with the KMS key. When you create a KMS key in an external key store, you specify an existing encryption key in the external key manager.

Some external key managers provide a simpler method for creating a KMS key in an external key store. For details, see your external key manager documentation.

Before you create a KMS key in a custom key store, the ConnectionState of the key store must be CONNECTED. To connect the custom key store, use the ConnectCustomKeyStore operation. To find the ConnectionState, use the DescribeCustomKeyStores operation.

To create a KMS key in a custom key store, use the CustomKeyStoreId. Use the default KeySpec value, SYMMETRIC_DEFAULT, and the default KeyUsage value, ENCRYPT_DECRYPT to create a symmetric encryption key. No other key type is supported in a custom key store.

To create a KMS key in an CloudHSM key store, use the Origin parameter with a value of AWS_CLOUDHSM. The CloudHSM cluster that is associated with the custom key store must have at least two active HSMs in different Availability Zones in the Amazon Web Services Region.

To create a KMS key in an external key store, use the Origin parameter with a value of EXTERNAL_KEY_STORE and an XksKeyId parameter that identifies an existing external key.

Some external key managers provide a simpler method for creating a KMS key in an external key store. For details, see your external key manager documentation.

Cross-account use: No. You cannot use this operation to create a KMS key in a different Amazon Web Services account.

Required permissions: kms:CreateKey (IAM policy). To use the Tags parameter, kms:TagResource (IAM policy). For examples and information about related permissions, see Allow a user to create KMS keys in the Key Management Service Developer Guide.

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "Decrypt": "

Decrypts ciphertext that was encrypted by a KMS key using any of the following operations:

You can use this operation to decrypt ciphertext that was encrypted under a symmetric encryption KMS key or an asymmetric encryption KMS key. When the KMS key is asymmetric, you must specify the KMS key and the encryption algorithm that was used to encrypt the ciphertext. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

The Decrypt operation also decrypts ciphertext that was encrypted outside of KMS by the public key in an KMS asymmetric KMS key. However, it cannot decrypt symmetric ciphertext produced by other libraries, such as the Amazon Web Services Encryption SDK or Amazon S3 client-side encryption. These libraries return a ciphertext format that is incompatible with KMS.

If the ciphertext was encrypted under a symmetric encryption KMS key, the KeyId parameter is optional. KMS can get this information from metadata that it adds to the symmetric ciphertext blob. This feature adds durability to your implementation by ensuring that authorized users can decrypt ciphertext decades after it was encrypted, even if they've lost track of the key ID. However, specifying the KMS key is always recommended as a best practice. When you use the KeyId parameter to specify a KMS key, KMS only uses the KMS key you specify. If the ciphertext was encrypted under a different KMS key, the Decrypt operation fails. This practice ensures that you use the KMS key that you intend.

Whenever possible, use key policies to give users permission to call the Decrypt operation on a particular KMS key, instead of using &IAM; policies. Otherwise, you might create an &IAM; policy that gives the user Decrypt permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys in other accounts if the key policy for the cross-account KMS key permits it. If you must use an IAM policy for Decrypt permissions, limit the user to particular KMS keys or particular trusted accounts. For details, see Best practices for IAM policies in the Key Management Service Developer Guide.

Decrypt also supports Amazon Web Services Nitro Enclaves, which provide an isolated compute environment in Amazon EC2. To call Decrypt for a Nitro enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter to provide the attestation document for the enclave. Instead of the plaintext data, the response includes the plaintext data encrypted with the public key from the attestation document (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.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: Yes. If you use the KeyId parameter to identify a KMS key in a different Amazon Web Services account, specify the key ARN or the alias ARN of the KMS key.

Required permissions: kms:Decrypt (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "DeleteAlias": "

Deletes the specified alias.

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.

Because an alias is not a property of a KMS key, you can delete and change the aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the response from the DescribeKey operation. To get the aliases of all KMS keys, use the ListAliases operation.

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 create a new alias. To associate an existing alias with a different KMS key, call UpdateAlias.

Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.

Required permissions

For details, see Controlling access to aliases in the Key Management Service Developer Guide.

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "DeleteCustomKeyStore": "

Deletes a custom key store. This operation does not affect any backing elements of the custom key store. It does not delete the CloudHSM cluster that is associated with an CloudHSM key store, or affect any users or keys in the cluster. For an external key store, it does not affect the external key store proxy, external key manager, or any external keys.

This operation is part of the custom key stores feature in KMS, which combines the convenience and extensive integration of KMS with the isolation and control of a key store that you own and manage.

The custom key store that you delete cannot contain any KMS keys. Before deleting the key store, verify that you will never need to use any of the KMS keys in the key store for any cryptographic operations. Then, use ScheduleKeyDeletion to delete the KMS keys from the key store. After the required waiting period expires and all KMS keys are deleted from the custom key store, use DisconnectCustomKeyStore to disconnect the key store from KMS. Then, you can delete the custom key store.

For keys in an CloudHSM key store, the ScheduleKeyDeletion operation makes a best effort to delete the key material from the associated cluster. However, you might need to manually delete the orphaned key material from the cluster and its backups. KMS never creates, manages, or deletes cryptographic keys in the external key manager associated with an external key store. You must manage them using your external key manager tools.

Instead of deleting the custom key store, consider using the DisconnectCustomKeyStore operation to disconnect the custom key store from its backing key store. While the key store is disconnected, you cannot create or use the KMS keys in the key store. But, you do not need to delete KMS keys and you can reconnect a disconnected custom key store at any time.

If the operation succeeds, it returns a JSON object with no properties.

Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

Required permissions: kms:DeleteCustomKeyStore (IAM policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "DeleteImportedKeyMaterial": "

Deletes key material that was previously imported. This operation makes the specified KMS key temporarily unusable. To restore the usability of the KMS key, reimport the same key material. For more information about importing key material into KMS, see Importing Key Material in the Key Management Service Developer Guide.

When the specified KMS key is in the PendingDeletion state, this operation does not change the KMS key's state. Otherwise, it changes the KMS key's state to PendingImport.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:DeleteImportedKeyMaterial (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", + "DeriveSharedSecret": "

Derives a shared secret using a key agreement algorithm.

You must use an asymmetric NIST-recommended elliptic curve (ECC) or SM2 (China Regions only) KMS key pair with a KeyUsage value of KEY_AGREEMENT to call DeriveSharedSecret.

DeriveSharedSecret uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive (ECDH) to establish a key agreement between two peers by deriving a shared secret from their elliptic curve public-private key pairs. You can use the raw shared secret that DeriveSharedSecret returns to derive a symmetric key that can encrypt and decrypt data that is sent between the two peers, or that can generate and verify HMACs. KMS recommends that you follow NIST recommendations for key derivation when using the raw shared secret to derive a symmetric key.

The following workflow demonstrates how to establish key agreement over an insecure communication channel using DeriveSharedSecret.

  1. Alice calls CreateKey to create an asymmetric KMS key pair with a KeyUsage value of KEY_AGREEMENT.

    The asymmetric KMS key must use a NIST-recommended elliptic curve (ECC) or SM2 (China Regions only) key spec.

  2. Bob creates an elliptic curve key pair.

    Bob can call CreateKey to create an asymmetric KMS key pair or generate a key pair outside of KMS. Bob's key pair must use the same NIST-recommended elliptic curve (ECC) or SM2 (China Regions ony) curve as Alice.

  3. Alice and Bob exchange their public keys through an insecure communication channel (like the internet).

    Use GetPublicKey to download the public key of your asymmetric KMS key pair.

    KMS strongly recommends verifying that the public key you receive came from the expected party before using it to derive a shared secret.

  4. Alice calls DeriveSharedSecret.

    KMS uses the private key from the KMS key pair generated in Step 1, Bob's public key, and the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive to derive the shared secret. The private key in your KMS key pair never leaves KMS unencrypted. DeriveSharedSecret returns the raw shared secret.

  5. Bob uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive to calculate the same raw secret using his private key and Alice's public key.

To derive a shared secret you must provide a key agreement algorithm, the private key of the caller's asymmetric NIST-recommended elliptic curve or SM2 (China Regions only) KMS key pair, and the public key from your peer's NIST-recommended elliptic curve or SM2 (China Regions only) key pair. The public key can be from another asymmetric KMS key pair or from a key pair generated outside of KMS, but both key pairs must be on the same elliptic curve.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN in the value of the KeyId parameter.

Required permissions: kms:DeriveSharedSecret (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "DescribeCustomKeyStores": "

Gets information about custom key stores in the account and Region.

This operation is part of the custom key stores feature in KMS, which combines the convenience and extensive integration of KMS with the isolation and control of a key store that you own and manage.

By default, this operation returns information about all custom key stores in the account and Region. To get only information about a particular custom key store, use either the CustomKeyStoreName or CustomKeyStoreId parameter (but not both).

To determine whether the custom key store is connected to its CloudHSM cluster or external key store proxy, use the ConnectionState element in the response. If an attempt to connect the custom key store failed, the ConnectionState value is FAILED and the ConnectionErrorCode element in the response indicates the cause of the failure. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry.

Custom key stores have a DISCONNECTED connection state if the key store has never been connected or you used the DisconnectCustomKeyStore operation to disconnect it. Otherwise, the connection state is CONNECTED. If your custom key store connection state is CONNECTED but you are having trouble using it, verify that the backing store is active and available. For an CloudHSM key store, verify that the associated CloudHSM cluster is active and contains the minimum number of HSMs required for the operation, if any. For an external key store, verify that the external key store proxy and its associated external key manager are reachable and enabled.

For help repairing your CloudHSM key store, see the Troubleshooting CloudHSM key stores. For help repairing your external key store, see the Troubleshooting external key stores. Both topics are in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

Required permissions: kms:DescribeCustomKeyStores (IAM policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "DescribeKey": "

Provides detailed information about a KMS key. You can run DescribeKey on a customer managed key or an Amazon Web Services managed key.

This detailed information includes the key ARN, creation date (and deletion date, if applicable), the key state, and the origin and expiration date (if any) of the key material. It includes fields, like KeySpec, that help you distinguish different types of KMS keys. It also displays the key usage (encryption, signing, or generating and verifying MACs) and the algorithms that the KMS key supports.

For multi-Region keys, DescribeKey displays the primary key and all related replica keys. For KMS keys in CloudHSM key stores, it includes information about the key store, such as the key store ID and the CloudHSM cluster ID. For KMS keys in external key stores, it includes the custom key store ID and the ID of the external key.

DescribeKey does not return the following information:

In general, DescribeKey is a non-mutating operation. It returns data about KMS keys, but doesn't change them. However, Amazon Web Services services use DescribeKey to create Amazon Web Services managed keys from a predefined Amazon Web Services alias with no key ID.

Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN in the value of the KeyId parameter.

Required permissions: kms:DescribeKey (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "DisableKey": "

Sets the state of a KMS key to disabled. This change temporarily prevents use of the KMS key for cryptographic operations.

For more information about how key state affects the use of a KMS key, see Key states of KMS keys in the Key Management Service Developer Guide .

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:DisableKey (key policy)

Related operations: EnableKey

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", @@ -28,8 +29,8 @@ "GenerateRandom": "

Returns a random byte string that is cryptographically secure.

You must use the NumberOfBytes parameter to specify the length of the random byte string. There is no default value for string length.

By default, the random byte string is generated in KMS. To generate the byte string in the CloudHSM cluster associated with an CloudHSM key store, use the CustomKeyStoreId parameter.

GenerateRandom also supports Amazon Web Services Nitro Enclaves, which provide an isolated compute environment in Amazon EC2. To call GenerateRandom for a Nitro enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter to provide the attestation document for the enclave. Instead of plaintext bytes, the response includes the plaintext bytes encrypted under the public key from the attestation document (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.

For more information about entropy and random number generation, see Key Management Service Cryptographic Details.

Cross-account use: Not applicable. GenerateRandom does not use any account-specific resources, such as KMS keys.

Required permissions: kms:GenerateRandom (IAM policy)

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "GetKeyPolicy": "

Gets a key policy attached to the specified KMS key.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:GetKeyPolicy (key policy)

Related operations: PutKeyPolicy

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "GetKeyRotationStatus": "

Provides detailed information about the rotation status for a KMS key, including whether automatic rotation of the key material is enabled for the specified KMS key, the rotation period, and the next scheduled rotation date.

Automatic key rotation is supported only on symmetric encryption KMS keys. 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..

You can enable (EnableKeyRotation) and disable automatic rotation (DisableKeyRotation) of the key material in customer managed KMS keys. Key material rotation of Amazon Web Services managed KMS keys is not configurable. KMS always rotates the key material in Amazon Web Services managed KMS keys every year. The key rotation status for Amazon Web Services managed KMS keys is always true.

You can perform on-demand (RotateKeyOnDemand) rotation of the key material in customer managed KMS keys, regardless of whether or not automatic key rotation is enabled. You can use GetKeyRotationStatus to identify the date and time that an in progress on-demand rotation was initiated. You can use ListKeyRotations to view the details of completed rotations.

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three years to every year. For details, see EnableKeyRotation.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key ARN in the value of the KeyId parameter.

Required permissions: kms:GetKeyRotationStatus (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", - "GetParametersForImport": "

Returns the public key and an import token you need to import or reimport key material for a KMS key.

By default, KMS keys are created with key material that KMS generates. This operation supports Importing key material, an advanced feature that lets you generate and import the cryptographic key material for a KMS key. For more information about importing key material into KMS, see Importing key material in the Key Management Service Developer Guide.

Before calling GetParametersForImport, use the CreateKey operation with an Origin value of EXTERNAL to create a KMS key with no key material. You can import key material for a symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, or asymmetric signing KMS key. You can also import key material into a multi-Region key of any supported type. However, you can't import key material into a KMS key in a custom key store. You can also use GetParametersForImport to get a public key and import token to reimport the original key material into a KMS key whose key material expired or was deleted.

GetParametersForImport returns the items that you need to import your key material.

The public key and its import token are permanently linked and must be used together. Each public key and import token set is valid for 24 hours. The expiration date and time appear in the ParametersValidTo field in the GetParametersForImport response. You cannot use an expired public key or import token in an ImportKeyMaterial request. If your key and token expire, send another GetParametersForImport request.

GetParametersForImport requires the following information:

You can use the same or a different public key spec and wrapping algorithm each time you import or reimport the same key material.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:GetParametersForImport (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", - "GetPublicKey": "

Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric KMS key, which never leaves KMS unencrypted, callers with kms:GetPublicKey permission can download the public key of an asymmetric KMS key. You can share the public key to allow others to encrypt messages and verify signatures outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

You do not need to download the public key. Instead, you can use the public key within KMS by calling the Encrypt, ReEncrypt, or Verify operations with the identifier of an asymmetric KMS key. When you use the public key within KMS, you benefit from the authentication, authorization, and logging that are part of every KMS operation. You also reduce of risk of encrypting data that cannot be decrypted. These features are not effective outside of KMS.

To help you use the public key safely outside of KMS, GetPublicKey returns important information about the public key in the response, including:

Although KMS cannot enforce these restrictions on external operations, it is crucial that you use this information to prevent the public key from being used improperly. For example, you can prevent a public signing key from being used encrypt data, or prevent a public key from being used with an encryption algorithm that is not supported by KMS. You can also avoid errors, such as using the wrong signing algorithm in a verification operation.

To verify a signature outside of KMS with an SM2 public key (China Regions only), you must specify the distinguishing ID. By default, KMS uses 1234567812345678 as the distinguishing ID. For more information, see Offline verification with SM2 key pairs.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN in the value of the KeyId parameter.

Required permissions: kms:GetPublicKey (key policy)

Related operations: CreateKey

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", + "GetParametersForImport": "

Returns the public key and an import token you need to import or reimport key material for a KMS key.

By default, KMS keys are created with key material that KMS generates. This operation supports Importing key material, an advanced feature that lets you generate and import the cryptographic key material for a KMS key. For more information about importing key material into KMS, see Importing key material in the Key Management Service Developer Guide.

Before calling GetParametersForImport, use the CreateKey operation with an Origin value of EXTERNAL to create a KMS key with no key material. You can import key material for a symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, or asymmetric signing KMS key. You can also import key material into a multi-Region key of any supported type. However, you can't import key material into a KMS key in a custom key store. You can also use GetParametersForImport to get a public key and import token to reimport the original key material into a KMS key whose key material expired or was deleted.

GetParametersForImport returns the items that you need to import your key material.

The public key and its import token are permanently linked and must be used together. Each public key and import token set is valid for 24 hours. The expiration date and time appear in the ParametersValidTo field in the GetParametersForImport response. You cannot use an expired public key or import token in an ImportKeyMaterial request. If your key and token expire, send another GetParametersForImport request.

GetParametersForImport requires the following information:

You can use the same or a different public key spec and wrapping algorithm each time you import or reimport the same key material.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:GetParametersForImport (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", + "GetPublicKey": "

Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric KMS key, which never leaves KMS unencrypted, callers with kms:GetPublicKey permission can download the public key of an asymmetric KMS key. You can share the public key to allow others to encrypt messages and verify signatures outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

You do not need to download the public key. Instead, you can use the public key within KMS by calling the Encrypt, ReEncrypt, or Verify operations with the identifier of an asymmetric KMS key. When you use the public key within KMS, you benefit from the authentication, authorization, and logging that are part of every KMS operation. You also reduce of risk of encrypting data that cannot be decrypted. These features are not effective outside of KMS.

To help you use the public key safely outside of KMS, GetPublicKey returns important information about the public key in the response, including:

Although KMS cannot enforce these restrictions on external operations, it is crucial that you use this information to prevent the public key from being used improperly. For example, you can prevent a public signing key from being used encrypt data, or prevent a public key from being used with an encryption algorithm that is not supported by KMS. You can also avoid errors, such as using the wrong signing algorithm in a verification operation.

To verify a signature outside of KMS with an SM2 public key (China Regions only), you must specify the distinguishing ID. By default, KMS uses 1234567812345678 as the distinguishing ID. For more information, see Offline verification with SM2 key pairs.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN in the value of the KeyId parameter.

Required permissions: kms:GetPublicKey (key policy)

Related operations: CreateKey

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "ImportKeyMaterial": "

Imports or reimports key material into an existing KMS key that was created without key material. ImportKeyMaterial also sets the expiration model and expiration date of the imported key material.

By default, KMS keys are created with key material that KMS generates. This operation supports Importing key material, an advanced feature that lets you generate and import the cryptographic key material for a KMS key. For more information about importing key material into KMS, see Importing key material in the Key Management Service Developer Guide.

After you successfully import key material into a KMS key, you can reimport the same key material into that KMS key, but you cannot import different key material. You might reimport key material to replace key material that expired or key material that you deleted. You might also reimport key material to change the expiration model or expiration date of the key material.

Each time you import key material into KMS, you can determine whether (ExpirationModel) and when (ValidTo) the key material expires. To change the expiration of your key material, you must import it again, either by calling ImportKeyMaterial or using the import features of the KMS console.

Before calling ImportKeyMaterial:

Then, in an ImportKeyMaterial request, you submit your encrypted key material and import token. When calling this operation, you must specify the following values:

When this operation is successful, the key state of the KMS key changes from PendingImport to Enabled, and you can use the KMS key in cryptographic operations.

If this operation fails, use the exception to help determine the problem. If the error is 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 and repeat the import procedure. For help, see How To Import Key Material in the Key Management Service Developer Guide.

The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide.

Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

Required permissions: kms:ImportKeyMaterial (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "ListAliases": "

Gets a list of aliases in the caller's Amazon Web Services account and region. For more information about aliases, see CreateAlias.

By default, the ListAliases operation returns all aliases in the account and region. To get only the aliases associated with a particular KMS key, use the KeyId parameter.

The ListAliases response can include aliases that you created and associated with your customer managed keys, and aliases that Amazon Web Services created and associated with Amazon Web Services managed keys in your account. You can recognize Amazon Web Services aliases because their names have the format aws/<service-name>, such as aws/dynamodb.

The response might also include aliases that have no TargetKeyId field. These are predefined aliases that Amazon Web Services has created but has not yet associated with a KMS key. Aliases that Amazon Web Services creates in your account, including predefined aliases, do not count against your KMS aliases quota.

Cross-account use: No. ListAliases does not return aliases in other Amazon Web Services accounts.

Required permissions: kms:ListAliases (IAM policy)

For details, see Controlling access to aliases in the Key Management Service Developer Guide.

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", "ListGrants": "

Gets a list of all grants for the specified KMS key.

You must specify the KMS key in all requests. You can filter the grant list by grant ID or grantee principal.

For detailed information about grants, including grant terminology, see Grants in KMS in the Key Management Service Developer Guide . For examples of working with grants in several programming languages, see Programming grants.

The GranteePrincipal field in the ListGrants response usually contains the user or role designated as the grantee principal in the grant. However, when the grantee principal in the grant is an Amazon Web Services service, the GranteePrincipal field contains the service principal, which might represent several different grantee principals.

Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key ARN in the value of the KeyId parameter.

Required permissions: kms:ListGrants (key policy)

Related operations:

Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

", @@ -65,7 +66,7 @@ "AlgorithmSpec": { "base": null, "refs": { - "GetParametersForImportRequest$WrappingAlgorithm": "

The algorithm you will use with the asymmetric public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt your key material directly with the SM2 public key from KMS.

The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm, except in China Regions, where you must use the SM2PKE wrapping algorithm to import an RSA private key.

The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China Regions.

" + "GetParametersForImportRequest$WrappingAlgorithm": "

The algorithm you will use with the RSA public key (PublicKey) in the response to protect your key material during import. For more information, see Select a wrapping algorithm in the Key Management Service Developer Guide.

For RSA_AES wrapping algorithms, you encrypt your key material with an AES key that you generate, then encrypt your AES key with the RSA public key from KMS. For RSAES wrapping algorithms, you encrypt your key material directly with the RSA public key from KMS.

The wrapping algorithms that you can use depend on the type of key material that you are importing. To import an RSA private key, you must use an RSA_AES wrapping algorithm.

" } }, "AliasList": { @@ -143,6 +144,7 @@ "refs": { "DecryptRequest$CiphertextBlob": "

Ciphertext to be decrypted. The blob includes metadata.

", "DecryptResponse$CiphertextForRecipient": "

The plaintext data encrypted with the public key in the attestation document.

This field is included in the response only when the Recipient parameter in the request includes a valid attestation document from an Amazon Web Services Nitro enclave. 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.

", + "DeriveSharedSecretResponse$CiphertextForRecipient": "

The plaintext shared secret encrypted with the public key in the attestation document.

This field is included in the response only when the Recipient parameter in the request includes a valid attestation document from an Amazon Web Services Nitro enclave. 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.

", "EncryptResponse$CiphertextBlob": "

The encrypted plaintext. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

", "GenerateDataKeyPairResponse$PrivateKeyCiphertextBlob": "

The encrypted copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

", "GenerateDataKeyPairResponse$CiphertextForRecipient": "

The plaintext private data key encrypted with the public key from the Nitro enclave. This ciphertext can be decrypted only by using a private key in the Nitro enclave.

This field is included in the response only when the Recipient parameter in the request includes a valid attestation document from an Amazon Web Services Nitro enclave. 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.

", @@ -398,6 +400,16 @@ "refs": { } }, + "DeriveSharedSecretRequest": { + "base": null, + "refs": { + } + }, + "DeriveSharedSecretResponse": { + "base": null, + "refs": { + } + }, "DescribeCustomKeyStoresRequest": { "base": null, "refs": { @@ -744,6 +756,7 @@ "refs": { "CreateGrantRequest$GrantTokens": "

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

", "DecryptRequest$GrantTokens": "

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

", + "DeriveSharedSecretRequest$GrantTokens": "

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

", "DescribeKeyRequest$GrantTokens": "

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

", "EncryptRequest$GrantTokens": "

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

", "GenerateDataKeyPairRequest$GrantTokens": "

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

", @@ -822,7 +835,7 @@ } }, "InvalidKeyUsageException": { - "base": "

The request was rejected for one of the following reasons:

For encrypting, decrypting, re-encrypting, and generating data keys, the KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage of a KMS key, use the DescribeKey operation.

To find the encryption or signing algorithms supported for a particular KMS key, use the DescribeKey operation.

", + "base": "

The request was rejected for one of the following reasons:

For encrypting, decrypting, re-encrypting, and generating data keys, the KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage of a KMS key, use the DescribeKey operation.

To find the encryption or signing algorithms supported for a particular KMS key, use the DescribeKey operation.

", "refs": { } }, @@ -851,6 +864,21 @@ "refs": { } }, + "KeyAgreementAlgorithmSpec": { + "base": null, + "refs": { + "DeriveSharedSecretRequest$KeyAgreementAlgorithm": "

Specifies the key agreement algorithm used to derive the shared secret. The only valid value is ECDH.

", + "DeriveSharedSecretResponse$KeyAgreementAlgorithm": "

Identifies the key agreement algorithm used to derive the shared secret.

", + "KeyAgreementAlgorithmSpecList$member": null + } + }, + "KeyAgreementAlgorithmSpecList": { + "base": null, + "refs": { + "GetPublicKeyResponse$KeyAgreementAlgorithms": "

The key agreement algorithm used to derive a shared secret. This field is present only when the KMS key has a KeyUsage value of KEY_AGREEMENT.

", + "KeyMetadata$KeyAgreementAlgorithms": "

The key agreement algorithm used to derive a shared secret.

" + } + }, "KeyEncryptionMechanism": { "base": null, "refs": { @@ -868,6 +896,8 @@ "DecryptRequest$KeyId": "

Specifies the KMS key that KMS uses to decrypt the ciphertext.

Enter a key ID of the KMS key that was used to encrypt the ciphertext. If you identify a different KMS key, the Decrypt operation throws an IncorrectKeyException.

This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key. If you used a symmetric encryption KMS key, KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob. However, it is always recommended as a best practice. This practice ensures that you use the KMS key that you intend.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

", "DecryptResponse$KeyId": "

The Amazon Resource Name (key ARN) of the KMS key that was used to decrypt the ciphertext.

", "DeleteImportedKeyMaterialRequest$KeyId": "

Identifies the KMS key from which you are deleting imported key material. The Origin of the KMS key must be EXTERNAL.

Specify the key ID or key ARN of the KMS key.

For example:

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", + "DeriveSharedSecretRequest$KeyId": "

Identifies an asymmetric NIST-recommended ECC or SM2 (China Regions only) KMS key. KMS uses the private key in the specified key pair to derive the shared secret. The key usage of the KMS key must be KEY_AGREEMENT. To find the KeyUsage of a KMS key, use the DescribeKey operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

", + "DeriveSharedSecretResponse$KeyId": "

Identifies the KMS key used to derive the shared secret.

", "DescribeKeyRequest$KeyId": "

Describes the specified KMS key.

If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), KMS associates the alias with an Amazon Web Services managed key and returns its KeyId and Arn in the response.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with \"alias/\". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

", "DisableKeyRequest$KeyId": "

Identifies the KMS key to disable.

Specify the key ID or key ARN of the KMS key.

For example:

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", "DisableKeyRotationRequest$KeyId": "

Identifies a symmetric encryption KMS key. You cannot enable or disable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store.

Specify the key ID or key ARN of the KMS key.

For example:

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.

", @@ -956,7 +986,7 @@ "KeySpec": { "base": null, "refs": { - "CreateKeyRequest$KeySpec": "

Specifies the type of KMS key to create. The default value, SYMMETRIC_DEFAULT, creates a KMS key with a 256-bit AES-GCM key that is used for encryption and decryption, except in China Regions, where it creates a 128-bit symmetric key that uses SM4 encryption. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Key Management Service Developer Guide .

The KeySpec determines whether the KMS key contains a symmetric key or an asymmetric key pair. It also determines the algorithms that the KMS key supports. You can't change the KeySpec after the KMS key is created. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see kms:EncryptionAlgorithm, kms:MacAlgorithm or kms:Signing Algorithm in the Key Management Service Developer Guide .

Amazon Web Services services that are integrated with KMS use symmetric encryption KMS keys to protect your data. These services do not support asymmetric KMS keys or HMAC KMS keys.

KMS supports the following key specs for KMS keys:

", + "CreateKeyRequest$KeySpec": "

Specifies the type of KMS key to create. The default value, SYMMETRIC_DEFAULT, creates a KMS key with a 256-bit AES-GCM key that is used for encryption and decryption, except in China Regions, where it creates a 128-bit symmetric key that uses SM4 encryption. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Key Management Service Developer Guide .

The KeySpec determines whether the KMS key contains a symmetric key or an asymmetric key pair. It also determines the algorithms that the KMS key supports. You can't change the KeySpec after the KMS key is created. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see kms:EncryptionAlgorithm, kms:MacAlgorithm or kms:Signing Algorithm in the Key Management Service Developer Guide .

Amazon Web Services services that are integrated with KMS use symmetric encryption KMS keys to protect your data. These services do not support asymmetric KMS keys or HMAC KMS keys.

KMS supports the following key specs for KMS keys:

", "GetPublicKeyResponse$KeySpec": "

The type of the of the public key that was downloaded.

", "KeyMetadata$KeySpec": "

Describes the type of key material in the KMS key.

" } @@ -983,8 +1013,8 @@ "KeyUsageType": { "base": null, "refs": { - "CreateKeyRequest$KeyUsage": "

Determines the cryptographic operations for which you can use the KMS key. The default value is ENCRYPT_DECRYPT. This parameter is optional when you are creating a symmetric encryption KMS key; otherwise, it is required. You can't change the KeyUsage value after the KMS key is created.

Select only one valid value.

", - "GetPublicKeyResponse$KeyUsage": "

The permitted use of the public key. Valid values are ENCRYPT_DECRYPT or SIGN_VERIFY.

This information is critical. If a public key with SIGN_VERIFY key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.

", + "CreateKeyRequest$KeyUsage": "

Determines the cryptographic operations for which you can use the KMS key. The default value is ENCRYPT_DECRYPT. This parameter is optional when you are creating a symmetric encryption KMS key; otherwise, it is required. You can't change the KeyUsage value after the KMS key is created.

Select only one valid value.

", + "GetPublicKeyResponse$KeyUsage": "

The permitted use of the public key. Valid values for asymmetric key pairs are ENCRYPT_DECRYPT, SIGN_VERIFY, and KEY_AGREEMENT.

This information is critical. For example, if a public key with SIGN_VERIFY key usage encrypts data outside of KMS, the ciphertext cannot be decrypted.

", "KeyMetadata$KeyUsage": "

The cryptographic operations for which you can use the KMS key.

" } }, @@ -1155,6 +1185,7 @@ "CreateGrantRequest$DryRun": "

Checks if your request will succeed. DryRun is an optional parameter.

To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.

", "CreateKeyRequest$MultiRegion": "

Creates a multi-Region primary key that you can replicate into other Amazon Web Services Regions. You cannot change this value after you create the KMS key.

For a multi-Region key, set this parameter to True. For a single-Region KMS key, omit this parameter or set it to False. The default value is False.

This operation supports multi-Region keys, an KMS feature that lets you create multiple interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt 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.

This value creates a primary key, not a replica. To create a replica key, use the ReplicateKey operation.

You can create a symmetric or asymmetric multi-Region key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store.

", "DecryptRequest$DryRun": "

Checks if your request will succeed. DryRun is an optional parameter.

To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.

", + "DeriveSharedSecretRequest$DryRun": "

Checks if your request will succeed. DryRun is an optional parameter.

To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.

", "EncryptRequest$DryRun": "

Checks if your request will succeed. DryRun is an optional parameter.

To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.

", "GenerateDataKeyPairRequest$DryRun": "

Checks if your request will succeed. DryRun is an optional parameter.

To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.

", "GenerateDataKeyPairWithoutPlaintextRequest$DryRun": "

Checks if your request will succeed. DryRun is an optional parameter.

To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.

", @@ -1182,6 +1213,7 @@ "base": null, "refs": { "CreateKeyRequest$Origin": "

The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is AWS_KMS, which means that KMS creates the key material.

To create a KMS key with no key material (for imported key material), set this value to EXTERNAL. For more information about importing key material into KMS, see Importing Key Material in the Key Management Service Developer Guide. The EXTERNAL origin value is valid only for symmetric KMS keys.

To create a KMS key in an CloudHSM key store and create its key material in the associated CloudHSM cluster, set this value to AWS_CLOUDHSM. You must also use the CustomKeyStoreId parameter to identify the CloudHSM key store. The KeySpec value must be SYMMETRIC_DEFAULT.

To create a KMS key in an external key store, set this value to EXTERNAL_KEY_STORE. You must also use the CustomKeyStoreId parameter to identify the external key store and the XksKeyId parameter to identify the associated external key. The KeySpec value must be SYMMETRIC_DEFAULT.

", + "DeriveSharedSecretResponse$KeyOrigin": "

The source of the key material for the specified KMS key.

When this value is AWS_KMS, KMS created the key material. When this value is EXTERNAL, the key material was imported or the KMS key doesn't have any key material.

The only valid values for DeriveSharedSecret are AWS_KMS and EXTERNAL. DeriveSharedSecret does not support KMS keys with a KeyOrigin value of AWS_CLOUDHSM or EXTERNAL_KEY_STORE.

", "KeyMetadata$Origin": "

The source of the key material for the KMS key. When this value is AWS_KMS, KMS created the key material. When this value is EXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value is AWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.

" } }, @@ -1197,6 +1229,7 @@ "base": null, "refs": { "DecryptResponse$Plaintext": "

Decrypted plaintext data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

If the response includes the CiphertextForRecipient field, the Plaintext field is null or empty.

", + "DeriveSharedSecretResponse$SharedSecret": "

The raw secret derived from the specified key agreement algorithm, private key in the asymmetric KMS key, and your peer's public key.

If the response includes the CiphertextForRecipient field, the SharedSecret field is null or empty.

", "EncryptRequest$Plaintext": "

Data to be encrypted.

", "GenerateDataKeyPairResponse$PrivateKeyPlaintext": "

The plaintext copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

If the response includes the CiphertextForRecipient field, the PrivateKeyPlaintext field is null or empty.

", "GenerateDataKeyResponse$Plaintext": "

The plaintext data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use this data key to encrypt your data outside of KMS. Then, remove it from memory as soon as possible.

If the response includes the CiphertextForRecipient field, the Plaintext field is null or empty.

", @@ -1248,6 +1281,7 @@ "PublicKeyType": { "base": null, "refs": { + "DeriveSharedSecretRequest$PublicKey": "

Specifies the public key in your peer's NIST-recommended elliptic curve (ECC) or SM2 (China Regions only) key pair.

The public key must be a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280.

GetPublicKey returns the public key of an asymmetric KMS key pair in the required DER-encoded format.

If you use Amazon Web Services CLI version 1, you must provide the DER-encoded X.509 public key in a file. Otherwise, the Amazon Web Services CLI Base64-encodes the public key a second time, resulting in a ValidationException.

You can specify the public key as binary data in a file using fileb (fileb://<path-to-file>) or in-line using a Base64 encoded string.

", "GenerateDataKeyPairResponse$PublicKey": "

The public key (in plaintext). When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

", "GenerateDataKeyPairWithoutPlaintextResponse$PublicKey": "

The public key (in plaintext). When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

", "GetPublicKeyResponse$PublicKey": "

The exported public key.

The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

" @@ -1272,7 +1306,8 @@ "base": "

Contains information about the party that receives the response from the API operation.

This data type is designed to support Amazon Web Services Nitro Enclaves, which lets you create an isolated compute environment in Amazon EC2. 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.

", "refs": { "DecryptRequest$Recipient": "

A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is RSAES_OAEP_SHA_256.

This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.

When you use this parameter, instead of returning the plaintext data, KMS encrypts the plaintext data with the public key in the attestation document, and returns the resulting ciphertext in the CiphertextForRecipient field in the response. This ciphertext can be decrypted only with the private key in the enclave. The Plaintext field in the response is null or empty.

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.

", - "GenerateDataKeyPairRequest$Recipient": "

A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is RSAES_OAEP_SHA_256.

This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.

When you use this parameter, instead of returning a plaintext copy of the private data key, KMS encrypts the plaintext private data key under the public key in the attestation document, and returns the resulting ciphertext in the CiphertextForRecipient field in the response. This ciphertext can be decrypted only with the private key in the enclave. The CiphertextBlob field in the response contains a copy of the private data key encrypted under the KMS key specified by the KeyId parameter. The PrivateKeyPlaintext field in the response is null or empty.

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.

", + "DeriveSharedSecretRequest$Recipient": "

A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is RSAES_OAEP_SHA_256.

This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro Enclaves, use the Amazon Web Services Nitro Enclaves SDK to generate the attestation document and then use the Recipient parameter from any Amazon Web Services SDK to provide the attestation document for the enclave.

When you use this parameter, instead of returning a plaintext copy of the shared secret, KMS encrypts the plaintext shared secret under the public key in the attestation document, and returns the resulting ciphertext in the CiphertextForRecipient field in the response. This ciphertext can be decrypted only with the private key in the enclave. The CiphertextBlob field in the response contains the encrypted shared secret derived from the KMS key specified by the KeyId parameter and public key specified by the PublicKey parameter. The SharedSecret field in the response is null or empty.

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.

", + "GenerateDataKeyPairRequest$Recipient": "

A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is RSAES_OAEP_SHA_256.

This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro Enclaves, use the Amazon Web Services Nitro Enclaves SDK to generate the attestation document and then use the Recipient parameter from any Amazon Web Services SDK to provide the attestation document for the enclave.

When you use this parameter, instead of returning a plaintext copy of the private data key, KMS encrypts the plaintext private data key under the public key in the attestation document, and returns the resulting ciphertext in the CiphertextForRecipient field in the response. This ciphertext can be decrypted only with the private key in the enclave. The CiphertextBlob field in the response contains a copy of the private data key encrypted under the KMS key specified by the KeyId parameter. The PrivateKeyPlaintext field in the response is null or empty.

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.

", "GenerateDataKeyRequest$Recipient": "

A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is RSAES_OAEP_SHA_256.

This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.

When you use this parameter, instead of returning the plaintext data key, KMS encrypts the plaintext data key under the public key in the attestation document, and returns the resulting ciphertext in the CiphertextForRecipient field in the response. This ciphertext can be decrypted only with the private key in the enclave. The CiphertextBlob field in the response contains a copy of the data key encrypted under the KMS key specified by the KeyId parameter. The Plaintext field in the response is null or empty.

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.

", "GenerateRandomRequest$Recipient": "

A signed attestation document from an Amazon Web Services Nitro enclave and the encryption algorithm to use with the enclave's public key. The only valid encryption algorithm is RSAES_OAEP_SHA_256.

This parameter only supports attestation documents for Amazon Web Services Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK.

When you use this parameter, instead of returning plaintext bytes, KMS encrypts the plaintext bytes under the public key in the attestation document, and returns the resulting ciphertext in the CiphertextForRecipient field in the response. This ciphertext can be decrypted only with the private key in the enclave. The Plaintext field in the response is null or empty.

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.

" } @@ -1487,7 +1522,7 @@ "WrappingKeySpec": { "base": null, "refs": { - "GetParametersForImportRequest$WrappingKeySpec": "

The type of public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

Use the longest wrapping key that is practical.

You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

The SM2 wrapping key spec is available only in China Regions.

" + "GetParametersForImportRequest$WrappingKeySpec": "

The type of RSA public key to return in the response. You will use this wrapping key with the specified wrapping algorithm to protect your key material during import.

Use the longest RSA wrapping key that is practical.

You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public key.

" } }, "XksKeyAlreadyInUseException": { diff --git a/models/apis/kms/2014-11-01/examples-1.json b/models/apis/kms/2014-11-01/examples-1.json index 63dee56ef8b..6925c61b148 100644 --- a/models/apis/kms/2014-11-01/examples-1.json +++ b/models/apis/kms/2014-11-01/examples-1.json @@ -632,6 +632,35 @@ "title": "To delete imported key material" } ], + "DeriveSharedSecret": [ + { + "input": { + "KeyAgreementAlgorithm": "ECDH", + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH3Yj0wbkLEpUl95Cv1cJVjsVNSjwGq3tCLnzXfhVwVvmzGN8pYj3U8nKwgouaHbBWNJYjP5VutbbkKS4Kv4GojwZBJyHN17kmxo8yTjRmjR15SKIQ8cqRA2uaERMLnpztIXdZp232PQPbWGxDyXYJ0aJ5EFSag+iSK341kr2kFTpINN7T1ZaX9vfXBdGR+VtkRKMWoHQeWzHrPZ+3irvpXNCKxGUxmPNsJSjPUhuSXT5+0VrY/LEYLQ5lUTrhU6z5/OK0kzaCc66DXc5ipSloS4Xyg+QcYSMxe9xuqO5HtzFImUSKBm1W6eDT6lHnSbpi7vXzNbIX7pWxKw9nmQvQIDAQAB" + }, + "output": { + "KeyAgreementAlgorithm": "ECDH", + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "SharedSecret": "MEYCIQCKZLWyTk5runarx6XiAkU9gv3lbwPO/pHa+DXFehzdDwIhANwpsIV2g/9SPWLLsF6p/hiSskuIXMTRwqrMdVKWTMHG" + }, + "comments": { + "input": { + "KeyAgreementAlgorithm": "The key agreement algorithm used to derive the shared secret. The only valid value is ECDH.", + "KeyId": "The key identifier for an asymmetric KMS key pair. The private key in the specified key pair is used to derive the shared secret.", + "PublicKey": "The public key in your peer's asymmetric key pair." + }, + "output": { + "KeyAgreementAlgorithm": "The key agreement algorithm used to derive the shared secret.", + "KeyId": "The asymmetric KMS key pair used to derive the shared secret.", + "SharedSecret": "The raw secret derived from the specified key agreement algorithm, private key in the asymmetric KMS key, and your peer's public key." + } + }, + "description": "The following example derives a shared secret using a key agreement algorithm.", + "id": "to-derive-a-shared-secret-1716220614829", + "title": "To derive a shared secret" + } + ], "DescribeCustomKeyStores": [ { "input": { diff --git a/models/apis/mediapackagev2/2022-12-25/api-2.json b/models/apis/mediapackagev2/2022-12-25/api-2.json index 2d3e0bd077b..9f8d44ae583 100644 --- a/models/apis/mediapackagev2/2022-12-25/api-2.json +++ b/models/apis/mediapackagev2/2022-12-25/api-2.json @@ -2,9 +2,10 @@ "version":"2.0", "metadata":{ "apiVersion":"2022-12-25", + "auth":["aws.auth#sigv4"], "endpointPrefix":"mediapackagev2", - "jsonVersion":"1.1", "protocol":"rest-json", + "protocols":["rest-json"], "serviceAbbreviation":"mediapackagev2", "serviceFullName":"AWS Elemental MediaPackage v2", "serviceId":"MediaPackageV2", @@ -498,7 +499,8 @@ "ChannelGroupName":{"shape":"String"}, "CreatedAt":{"shape":"Timestamp"}, "ModifiedAt":{"shape":"Timestamp"}, - "Description":{"shape":"ResourceDescription"} + "Description":{"shape":"ResourceDescription"}, + "InputType":{"shape":"InputType"} } }, "CmafEncryptionMethod":{ @@ -593,6 +595,7 @@ "location":"header", "locationName":"x-amzn-client-token" }, + "InputType":{"shape":"InputType"}, "Description":{"shape":"ResourceDescription"}, "Tags":{ "shape":"TagMap", @@ -617,6 +620,7 @@ "ModifiedAt":{"shape":"Timestamp"}, "Description":{"shape":"ResourceDescription"}, "IngestEndpoints":{"shape":"IngestEndpointList"}, + "InputType":{"shape":"InputType"}, "ETag":{"shape":"EntityTag"}, "Tags":{"shape":"TagMap"} } @@ -752,6 +756,7 @@ "HlsManifests":{"shape":"CreateHlsManifests"}, "LowLatencyHlsManifests":{"shape":"CreateLowLatencyHlsManifests"}, "DashManifests":{"shape":"CreateDashManifests"}, + "ForceEndpointErrorConfiguration":{"shape":"ForceEndpointErrorConfiguration"}, "Tags":{"shape":"TagMap"} } }, @@ -787,6 +792,7 @@ "HlsManifests":{"shape":"GetHlsManifests"}, "LowLatencyHlsManifests":{"shape":"GetLowLatencyHlsManifests"}, "DashManifests":{"shape":"GetDashManifests"}, + "ForceEndpointErrorConfiguration":{"shape":"ForceEndpointErrorConfiguration"}, "ETag":{"shape":"EntityTag"}, "Tags":{"shape":"TagMap"} } @@ -1015,6 +1021,19 @@ "CmafEncryptionMethod":{"shape":"CmafEncryptionMethod"} } }, + "EndpointErrorCondition":{ + "type":"string", + "enum":[ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "EndpointErrorConditions":{ + "type":"list", + "member":{"shape":"EndpointErrorCondition"} + }, "EntityTag":{ "type":"string", "max":256, @@ -1041,6 +1060,12 @@ "max":1209600, "min":0 }, + "ForceEndpointErrorConfiguration":{ + "type":"structure", + "members":{ + "EndpointErrorConditions":{"shape":"EndpointErrorConditions"} + } + }, "GetChannelGroupRequest":{ "type":"structure", "required":["ChannelGroupName"], @@ -1143,6 +1168,7 @@ "ModifiedAt":{"shape":"Timestamp"}, "Description":{"shape":"ResourceDescription"}, "IngestEndpoints":{"shape":"IngestEndpointList"}, + "InputType":{"shape":"InputType"}, "ETag":{"shape":"EntityTag"}, "Tags":{"shape":"TagMap"} } @@ -1302,9 +1328,10 @@ "StartoverWindowSeconds":{"shape":"Integer"}, "HlsManifests":{"shape":"GetHlsManifests"}, "LowLatencyHlsManifests":{"shape":"GetLowLatencyHlsManifests"}, + "DashManifests":{"shape":"GetDashManifests"}, + "ForceEndpointErrorConfiguration":{"shape":"ForceEndpointErrorConfiguration"}, "ETag":{"shape":"EntityTag"}, - "Tags":{"shape":"TagMap"}, - "DashManifests":{"shape":"GetDashManifests"} + "Tags":{"shape":"TagMap"} } }, "IdempotencyToken":{ @@ -1324,6 +1351,13 @@ "type":"list", "member":{"shape":"IngestEndpoint"} }, + "InputType":{ + "type":"string", + "enum":[ + "HLS", + "CMAF" + ] + }, "Integer":{ "type":"integer", "box":true @@ -1513,7 +1547,8 @@ "ModifiedAt":{"shape":"Timestamp"}, "HlsManifests":{"shape":"ListHlsManifests"}, "LowLatencyHlsManifests":{"shape":"ListLowLatencyHlsManifests"}, - "DashManifests":{"shape":"ListDashManifests"} + "DashManifests":{"shape":"ListDashManifests"}, + "ForceEndpointErrorConfiguration":{"shape":"ForceEndpointErrorConfiguration"} } }, "OriginEndpointsList":{ @@ -1902,6 +1937,7 @@ "ModifiedAt":{"shape":"Timestamp"}, "Description":{"shape":"ResourceDescription"}, "IngestEndpoints":{"shape":"IngestEndpointList"}, + "InputType":{"shape":"InputType"}, "ETag":{"shape":"EntityTag"}, "Tags":{ "shape":"TagMap", @@ -1940,6 +1976,7 @@ "HlsManifests":{"shape":"CreateHlsManifests"}, "LowLatencyHlsManifests":{"shape":"CreateLowLatencyHlsManifests"}, "DashManifests":{"shape":"CreateDashManifests"}, + "ForceEndpointErrorConfiguration":{"shape":"ForceEndpointErrorConfiguration"}, "ETag":{ "shape":"EntityTag", "location":"header", @@ -1978,6 +2015,7 @@ "StartoverWindowSeconds":{"shape":"Integer"}, "HlsManifests":{"shape":"GetHlsManifests"}, "LowLatencyHlsManifests":{"shape":"GetLowLatencyHlsManifests"}, + "ForceEndpointErrorConfiguration":{"shape":"ForceEndpointErrorConfiguration"}, "ETag":{"shape":"EntityTag"}, "Tags":{ "shape":"TagMap", @@ -2041,7 +2079,9 @@ "TIMING_SOURCE_MISSING", "UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION", "PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES", - "DRM_SIGNALING_MISMATCH_SEGMENT_ENCRYPTION_STATUS" + "DRM_SIGNALING_MISMATCH_SEGMENT_ENCRYPTION_STATUS", + "ONLY_CMAF_INPUT_TYPE_ALLOW_FORCE_ENDPOINT_ERROR_CONFIGURATION", + "SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY" ] } } diff --git a/models/apis/mediapackagev2/2022-12-25/docs-2.json b/models/apis/mediapackagev2/2022-12-25/docs-2.json index 72376f15be4..2ee7932cc97 100644 --- a/models/apis/mediapackagev2/2022-12-25/docs-2.json +++ b/models/apis/mediapackagev2/2022-12-25/docs-2.json @@ -360,6 +360,18 @@ "Encryption$EncryptionMethod": "

The encryption method to use.

" } }, + "EndpointErrorCondition": { + "base": null, + "refs": { + "EndpointErrorConditions$member": null + } + }, + "EndpointErrorConditions": { + "base": null, + "refs": { + "ForceEndpointErrorConfiguration$EndpointErrorConditions": "

The failover conditions for the endpoint. The options are:

" + } + }, "EntityTag": { "base": null, "refs": { @@ -400,6 +412,17 @@ "FilterConfiguration$TimeDelaySeconds": "

Optionally specify the time delay for all of your manifest egress requests. Enter a value that is smaller than your endpoint's startover window. When you include time delay, note that you cannot use time delay query parameters for this manifest's endpoint URL.

" } }, + "ForceEndpointErrorConfiguration": { + "base": "

The failover settings for the endpoint.

", + "refs": { + "CreateOriginEndpointRequest$ForceEndpointErrorConfiguration": "

The failover settings for the endpoint.

", + "CreateOriginEndpointResponse$ForceEndpointErrorConfiguration": "

The failover settings for the endpoint.

", + "GetOriginEndpointResponse$ForceEndpointErrorConfiguration": "

The failover settings for the endpoint.

", + "OriginEndpointListConfiguration$ForceEndpointErrorConfiguration": "

The failover settings for the endpoint.

", + "UpdateOriginEndpointRequest$ForceEndpointErrorConfiguration": "

The failover settings for the endpoint.

", + "UpdateOriginEndpointResponse$ForceEndpointErrorConfiguration": "

The failover settings for the endpoint.

" + } + }, "GetChannelGroupRequest": { "base": null, "refs": { @@ -514,6 +537,16 @@ "UpdateChannelResponse$IngestEndpoints": null } }, + "InputType": { + "base": null, + "refs": { + "ChannelListConfiguration$InputType": "

The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

The allowed values are:

", + "CreateChannelRequest$InputType": "

The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

The allowed values are:

", + "CreateChannelResponse$InputType": "

The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

The allowed values are:

", + "GetChannelResponse$InputType": "

The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

The allowed values are:

", + "UpdateChannelResponse$InputType": "

The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

The allowed values are:

" + } + }, "Integer": { "base": null, "refs": { diff --git a/models/apis/mediapackagev2/2022-12-25/examples-1.json b/models/apis/mediapackagev2/2022-12-25/examples-1.json index 0ea7e3b0bbe..d0878ded910 100644 --- a/models/apis/mediapackagev2/2022-12-25/examples-1.json +++ b/models/apis/mediapackagev2/2022-12-25/examples-1.json @@ -1,5 +1,1276 @@ { "version": "1.0", "examples": { + "CreateChannel": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "Description": "Description for exampleChannel", + "InputType": "HLS", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleChannel", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "IngestEndpoints": [ + { + "Id": "1", + "Url": "https://abcde-1.ingest.vwxyz.mediapackagev2.us-west-2.amazonaws.com/v1/exampleChannelGroup/exampleChannel/index" + }, + { + "Id": "2", + "Url": "https://abcde-2.ingest.vwxyz.mediapackagev2.us-west-2.amazonaws.com/v1/exampleChannelGroup/exampleChannel/index" + } + ], + "InputType": "HLS", + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Creating a Channel" + } + ], + "CreateChannelGroup": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "Description": "Description for exampleChannelGroup", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup", + "ChannelGroupName": "exampleChannelGroup", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleChannelGroup", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "EgressDomain": "abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com", + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Creating a Channel Group" + } + ], + "CreateOriginEndpoint": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "TS", + "Description": "Description for exampleOriginEndpointTS", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + } + ], + "OriginEndpointName": "exampleOriginEndpointTS", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", + "EncryptionMethod": { + "TsEncryptionMethod": "AES_128" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "CLEAR_KEY_AES_128" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "SHARED", + "PresetSpeke20Video": "SHARED" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": true, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT", + "BREAK" + ] + }, + "SegmentDurationSeconds": 6, + "SegmentName": "segmentName", + "TsIncludeDvbSubtitles": true, + "TsUseAudioRenditionGroup": true + }, + "StartoverWindowSeconds": 300, + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel/originEndpoint/exampleOriginEndpointTS", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "TS", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleOriginEndpointTS", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest1.m3u8" + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest2.m3u8" + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest1.m3u8" + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest2.m3u8" + } + ], + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "OriginEndpointName": "exampleOriginEndpointTS", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", + "EncryptionMethod": { + "TsEncryptionMethod": "AES_128" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "CLEAR_KEY_AES_128" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "SHARED", + "PresetSpeke20Video": "SHARED" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": true, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT", + "BREAK" + ] + }, + "SegmentDurationSeconds": 6, + "SegmentName": "segmentName", + "TsIncludeDvbSubtitles": true, + "TsUseAudioRenditionGroup": true + }, + "StartoverWindowSeconds": 300, + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Creating an OriginEndpoint with container type TS, and encryption enabled" + }, + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "CMAF", + "DashManifests": [ + { + "DrmSignaling": "INDIVIDUAL", + "ManifestName": "exampleDashManifest1", + "ManifestWindowSeconds": 300, + "MinBufferTimeSeconds": 30, + "MinUpdatePeriodSeconds": 5, + "PeriodTriggers": [ + "AVAILS" + ], + "ScteDash": { + "AdMarkerDash": "XML" + }, + "SegmentTemplateFormat": "NUMBER_WITH_TIMELINE", + "SuggestedPresentationDelaySeconds": 2 + }, + { + "DrmSignaling": "INDIVIDUAL", + "ManifestName": "exampleDashManifest2", + "ManifestWindowSeconds": 60, + "MinBufferTimeSeconds": 9, + "MinUpdatePeriodSeconds": 3, + "PeriodTriggers": [ + "AVAILS", + "DRM_KEY_ROTATION", + "SOURCE_CHANGES", + "SOURCE_DISRUPTIONS" + ], + "ScteDash": { + "AdMarkerDash": "XML" + }, + "SegmentTemplateFormat": "NUMBER_WITH_TIMELINE", + "SuggestedPresentationDelaySeconds": 12 + } + ], + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + } + ], + "OriginEndpointName": "exampleOriginEndpointCMAF", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B9F", + "EncryptionMethod": { + "CmafEncryptionMethod": "CBCS" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "PLAYREADY", + "WIDEVINE" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "PRESET_AUDIO_1", + "PresetSpeke20Video": "PRESET_VIDEO_1" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": true, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT", + "BREAK" + ] + }, + "SegmentDurationSeconds": 6, + "SegmentName": "segmentName" + }, + "StartoverWindowSeconds": 300, + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel/originEndpoint/exampleOriginEndpointCMAF", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "CMAF", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "DashManifests": [ + { + "DrmSignaling": "INDIVIDUAL", + "ManifestName": "exampleDashManifest1", + "ManifestWindowSeconds": 300, + "MinBufferTimeSeconds": 30, + "MinUpdatePeriodSeconds": 5, + "PeriodTriggers": [ + "AVAILS" + ], + "ScteDash": { + "AdMarkerDash": "XML" + }, + "SegmentTemplateFormat": "NUMBER_WITH_TIMELINE", + "SuggestedPresentationDelaySeconds": 2, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleDashManifest1.mpd" + }, + { + "DrmSignaling": "INDIVIDUAL", + "ManifestName": "exampleDashManifest2", + "ManifestWindowSeconds": 60, + "MinBufferTimeSeconds": 9, + "MinUpdatePeriodSeconds": 3, + "PeriodTriggers": [ + "AVAILS", + "DRM_KEY_ROTATION", + "SOURCE_CHANGES", + "SOURCE_DISRUPTIONS" + ], + "ScteDash": { + "AdMarkerDash": "XML" + }, + "SegmentTemplateFormat": "NUMBER_WITH_TIMELINE", + "SuggestedPresentationDelaySeconds": 12, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleDashManifest2.mpd" + } + ], + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleManifest1.m3u8" + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleManifest2.m3u8" + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleLLManifest1.m3u8" + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleLLManifest2.m3u8" + } + ], + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "OriginEndpointName": "exampleOriginEndpointCMAF", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B9F", + "EncryptionMethod": { + "CmafEncryptionMethod": "CBCS" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "PLAYREADY", + "WIDEVINE" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "PRESET_AUDIO_1", + "PresetSpeke20Video": "PRESET_VIDEO_1" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": true, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT", + "BREAK" + ] + }, + "SegmentDurationSeconds": 6, + "SegmentName": "segmentName" + }, + "StartoverWindowSeconds": 300, + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-2", + "title": "Creating an OriginEndpoint with container type CMAF, and encryption enabled" + } + ], + "DeleteChannel": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel" + }, + "output": { + }, + "id": "example-1", + "title": "Deleting a Channel" + } + ], + "DeleteChannelGroup": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup" + }, + "output": { + }, + "id": "example-1", + "title": "Deleting a Channel Group" + } + ], + "DeleteChannelPolicy": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel" + }, + "output": { + }, + "id": "example-1", + "title": "Deleting a Channel Policy" + } + ], + "DeleteOriginEndpoint": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpointTS" + }, + "output": { + }, + "id": "example-1", + "title": "Deleting an OriginEndpoint" + } + ], + "DeleteOriginEndpointPolicy": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpoint" + }, + "output": { + }, + "id": "example-1", + "title": "Deleting an Origin Endpoint Policy" + } + ], + "GetChannel": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel" + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleChannel", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "IngestEndpoints": [ + { + "Id": "1", + "Url": "https://abcde-1.ingest.vwxyz.mediapackagev2.us-west-2.amazonaws.com/v1/exampleChannelGroup/exampleChannel/index" + }, + { + "Id": "2", + "Url": "https://abcde-2.ingest.vwxyz.mediapackagev2.us-west-2.amazonaws.com/v1/exampleChannelGroup/exampleChannel/index" + } + ], + "InputType": "HLS", + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Getting a Channel" + } + ], + "GetChannelGroup": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup" + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup", + "ChannelGroupName": "exampleChannelGroup", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleChannelGroup", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "EgressDomain": "abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com", + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Getting a Channel Group" + } + ], + "GetChannelPolicy": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel" + }, + "output": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "Policy": "{...}" + }, + "id": "example-1", + "title": "Getting a Channel Policy" + } + ], + "GetOriginEndpoint": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpointTS" + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel/originEndpoint/exampleOriginEndpointTS", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "TS", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleOriginEndpointTS", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest1.m3u8" + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest2.m3u8" + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest1.m3u8" + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest2.m3u8" + } + ], + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "OriginEndpointName": "exampleOriginEndpointTS", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", + "EncryptionMethod": { + "TsEncryptionMethod": "AES_128" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "CLEAR_KEY_AES_128" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "SHARED", + "PresetSpeke20Video": "SHARED" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": true, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT", + "BREAK" + ] + }, + "SegmentDurationSeconds": 6, + "SegmentName": "segmentName", + "TsIncludeDvbSubtitles": true, + "TsUseAudioRenditionGroup": true + }, + "StartoverWindowSeconds": 300, + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Getting an OriginEndpoint" + } + ], + "GetOriginEndpointPolicy": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpoint" + }, + "output": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpoint", + "Policy": "{...}" + }, + "id": "example-1", + "title": "Getting an Origin Endpoint Policy" + } + ], + "ListChannelGroups": [ + { + "input": { + }, + "output": { + "Items": [ + { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup", + "ChannelGroupName": "exampleChannelGroup", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleChannelGroup", + "ModifiedAt": "2022-10-18T09:36:00.00Z" + }, + { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/anotherExampleChannelGroup", + "ChannelGroupName": "anotherExampleChannelGroup", + "CreatedAt": "2022-10-18T10:36:00.00Z", + "ModifiedAt": "2022-10-18T10:36:00.00Z" + } + ] + }, + "id": "example-1", + "title": "Listing all Channel Groups" + } + ], + "ListChannels": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup" + }, + "output": { + "Items": [ + { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleChannel", + "ModifiedAt": "2022-10-18T09:36:00.00Z" + }, + { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/anotherExampleChannel", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "anotherExampleChannel", + "CreatedAt": "2022-10-18T10:36:00.00Z", + "ModifiedAt": "2022-10-18T10:36:00.00Z" + } + ] + }, + "id": "example-1", + "title": "Listing all Channels" + } + ], + "ListOriginEndpoints": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel" + }, + "output": { + "Items": [ + { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel/originEndpoint/exampleOriginEndpointTS", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "TS", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Description for exampleOriginEndpointTS", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest1.m3u8" + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest2.m3u8" + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest1.m3u8" + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest2.m3u8" + } + ], + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "OriginEndpointName": "exampleOriginEndpointTS" + }, + { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel/originEndpoint/exampleOriginEndpointCMAF", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "CMAF", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "DashManifests": [ + { + "ManifestName": "exampleDashManifest1", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleDashManifest1.mpd" + }, + { + "ManifestName": "exampleDashManifest2", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleDashManifest2.mpd" + } + ], + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleManifest1.m3u8" + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleManifest2.m3u8" + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleLLManifest1.m3u8" + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointCMAF/exampleLLManifest2.m3u8" + } + ], + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "OriginEndpointName": "exampleOriginEndpointCMAF" + } + ] + }, + "id": "example-1", + "title": "Listing all OriginEndpoints" + } + ], + "ListTagsForResource": [ + { + "input": { + "ResourceArn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel" + }, + "output": { + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "List all tags for a resource" + } + ], + "PutChannelPolicy": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "Policy": "{...}" + }, + "output": { + }, + "id": "example-1", + "title": "Creating a Channel Policy" + } + ], + "PutOriginEndpointPolicy": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "OriginEndpointName": "exampleOriginEndpoint", + "Policy": "{...}" + }, + "output": { + }, + "id": "example-1", + "title": "Creating an Origin Endpoint Policy" + } + ], + "TagResource": [ + { + "input": { + "ResourceArn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "Tags": { + "key3": "value3", + "key4": "value4" + } + }, + "output": { + }, + "id": "example-1", + "title": "Add tags to a resource" + } + ], + "UntagResource": [ + { + "input": { + "ResourceArn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "TagKeys": [ + "key3", + "key4" + ] + }, + "output": { + }, + "id": "example-1", + "title": "Remove tags from a resource" + } + ], + "UpdateChannel": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "Description": "Updated description for exampleChannel" + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Updated description for exampleChannel", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "IngestEndpoints": [ + { + "Id": "1", + "Url": "https://abcde-1.ingest.vwxyz.mediapackagev2.us-west-2.amazonaws.com/v1/exampleChannelGroup/exampleChannel/index" + }, + { + "Id": "2", + "Url": "https://abcde-2.ingest.vwxyz.mediapackagev2.us-west-2.amazonaws.com/v1/exampleChannelGroup/exampleChannel/index" + } + ], + "InputType": "HLS", + "ModifiedAt": "2022-10-18T10:36:00.00Z", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Updating a Channel" + } + ], + "UpdateChannelGroup": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "Description": "Updated description for exampleChannelGroup" + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup", + "ChannelGroupName": "exampleChannelGroup", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Updated description for exampleChannelGroup", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "EgressDomain": "abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com", + "ModifiedAt": "2022-10-18T10:36:00.00Z", + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Updating a Channel Group" + } + ], + "UpdateOriginEndpoint": [ + { + "input": { + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "TS", + "Description": "Updated description for exampleOriginEndpointTS", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + } + } + ], + "OriginEndpointName": "exampleOriginEndpointTS", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", + "EncryptionMethod": { + "TsEncryptionMethod": "AES_128" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "CLEAR_KEY_AES_128" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "SHARED", + "PresetSpeke20Video": "SHARED" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": false, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT" + ] + }, + "SegmentDurationSeconds": 7, + "SegmentName": "segmentName2", + "TsIncludeDvbSubtitles": false, + "TsUseAudioRenditionGroup": true + }, + "StartoverWindowSeconds": 600 + }, + "output": { + "Arn": "arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel/originEndpoint/exampleOriginEndpointTS", + "ChannelGroupName": "exampleChannelGroup", + "ChannelName": "exampleChannel", + "ContainerType": "TS", + "CreatedAt": "2022-10-18T09:36:00.00Z", + "Description": "Updated description for exampleOriginEndpointTS", + "ETag": "GlfT+dwAyGIR4wuy8nKWl1RDPwSrjQej9qUutLZxoxk=", + "ForceEndpointErrorConfiguration": { + "EndpointErrorConditions": [ + "STALE_MANIFEST", + "INCOMPLETE_MANIFEST", + "MISSING_DRM_KEY", + "SLATE_INPUT" + ] + }, + "HlsManifests": [ + { + "ChildManifestName": "exampleChildManifest1", + "ManifestName": "exampleManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest1.m3u8" + }, + { + "ChildManifestName": "exampleManifest2", + "ManifestName": "exampleManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleManifest2.m3u8" + } + ], + "LowLatencyHlsManifests": [ + { + "ChildManifestName": "exampleLLChildManifest1", + "ManifestName": "exampleLLManifest1", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest1.m3u8" + }, + { + "ChildManifestName": "exampleLLManifest2", + "ManifestName": "exampleLLManifest2", + "ManifestWindowSeconds": 30, + "ProgramDateTimeIntervalSeconds": 60, + "ScteHls": { + "AdMarkerHls": "DATERANGE" + }, + "Url": "https://abcde.egress.vwxyz.mediapackagev2.us-west-2.amazonaws.com/out/v1/exampleChannelGroup/exampleChannel/exampleOriginEndpointTS/exampleLLManifest2.m3u8" + } + ], + "ModifiedAt": "2022-10-18T09:36:00.00Z", + "OriginEndpointName": "exampleOriginEndpointTS", + "Segment": { + "Encryption": { + "ConstantInitializationVector": "A382A901F3C1F7718512266CFFBB0B7E", + "EncryptionMethod": { + "TsEncryptionMethod": "AES_128" + }, + "KeyRotationIntervalSeconds": 300, + "SpekeKeyProvider": { + "DrmSystems": [ + "CLEAR_KEY_AES_128" + ], + "EncryptionContractConfiguration": { + "PresetSpeke20Audio": "SHARED", + "PresetSpeke20Video": "SHARED" + }, + "ResourceId": "ResourceId", + "RoleArn": "arn:aws:iam::123456789012:role/empRole", + "Url": "https://foo.com" + } + }, + "IncludeIframeOnlyStreams": false, + "Scte": { + "ScteFilter": [ + "SPLICE_INSERT" + ] + }, + "SegmentDurationSeconds": 7, + "SegmentName": "segmentName2", + "TsIncludeDvbSubtitles": false, + "TsUseAudioRenditionGroup": true + }, + "StartoverWindowSeconds": 600, + "Tags": { + "key1": "value1", + "key2": "value2" + } + }, + "id": "example-1", + "title": "Updating an OriginEndpoint" + } + ] } } diff --git a/service/cloudhsmv2/api.go b/service/cloudhsmv2/api.go index 6ec6cc7ae86..ce7676e1b9d 100644 --- a/service/cloudhsmv2/api.go +++ b/service/cloudhsmv2/api.go @@ -1671,6 +1671,12 @@ type Backup struct { // The date and time when the backup will be permanently deleted. DeleteTimestamp *time.Time `type:"timestamp"` + // The HSM type of the cluster that was backed up. + HsmType *string `type:"string"` + + // The mode of the cluster that was backed up. + Mode *string `type:"string" enum:"ClusterMode"` + // Specifies whether the service should exempt a backup from the retention policy // for the cluster. True exempts a backup from the retention policy. False means // the service applies the backup retention policy defined at the cluster. @@ -1745,6 +1751,18 @@ func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup { return s } +// SetHsmType sets the HsmType field's value. +func (s *Backup) SetHsmType(v string) *Backup { + s.HsmType = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *Backup) SetMode(v string) *Backup { + s.Mode = &v + return s +} + // SetNeverExpires sets the NeverExpires field's value. func (s *Backup) SetNeverExpires(v bool) *Backup { s.NeverExpires = &v @@ -2312,6 +2330,9 @@ type Cluster struct { // Contains information about the HSMs in the cluster. Hsms []*Hsm `type:"list"` + // The mode of the cluster. + Mode *string `type:"string" enum:"ClusterMode"` + // The default password for the cluster's Pre-Crypto Officer (PRECO) user. PreCoPassword *string `min:"7" type:"string"` @@ -2400,6 +2421,12 @@ func (s *Cluster) SetHsms(v []*Hsm) *Cluster { return s } +// SetMode sets the Mode field's value. +func (s *Cluster) SetMode(v string) *Cluster { + s.Mode = &v + return s +} + // SetPreCoPassword sets the PreCoPassword field's value. func (s *Cluster) SetPreCoPassword(v string) *Cluster { s.PreCoPassword = &v @@ -2577,12 +2604,15 @@ type CreateClusterInput struct { // A policy that defines how the service retains backups. BackupRetentionPolicy *BackupRetentionPolicy `type:"structure"` - // The type of HSM to use in the cluster. Currently the only allowed value is - // hsm1.medium. + // The type of HSM to use in the cluster. The allowed values are hsm1.medium + // and hsm2m.medium. // // HsmType is a required field HsmType *string `type:"string" required:"true"` + // The mode to use in the cluster. The allowed values are FIPS and NON_FIPS. + Mode *string `type:"string" enum:"ClusterMode"` + // The identifier (ID) of the cluster backup to restore. Use this value to restore // the cluster from a backup instead of creating a new cluster. To find the // backup ID, use DescribeBackups. @@ -2670,6 +2700,12 @@ func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput { return s } +// SetMode sets the Mode field's value. +func (s *CreateClusterInput) SetMode(v string) *CreateClusterInput { + s.Mode = &v + return s +} + // SetSourceBackupId sets the SourceBackupId field's value. func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput { s.SourceBackupId = &v @@ -4296,6 +4332,22 @@ func BackupState_Values() []string { } } +const ( + // ClusterModeFips is a ClusterMode enum value + ClusterModeFips = "FIPS" + + // ClusterModeNonFips is a ClusterMode enum value + ClusterModeNonFips = "NON_FIPS" +) + +// ClusterMode_Values returns all elements of the ClusterMode enum +func ClusterMode_Values() []string { + return []string{ + ClusterModeFips, + ClusterModeNonFips, + } +} + const ( // ClusterStateCreateInProgress is a ClusterState enum value ClusterStateCreateInProgress = "CREATE_IN_PROGRESS" diff --git a/service/glue/api.go b/service/glue/api.go index 5cba7104fdd..5fb05266877 100644 --- a/service/glue/api.go +++ b/service/glue/api.go @@ -36631,6 +36631,9 @@ type DataQualityEvaluationRunAdditionalRunOptions struct { // Whether or not to enable CloudWatch metrics. CloudWatchMetricsEnabled *bool `type:"boolean"` + // Set the evaluation method for composite rules in the ruleset to ROW/COLUMN + CompositeRuleEvaluationMethod *string `type:"string" enum:"DQCompositeRuleEvaluationMethod"` + // Prefix for Amazon S3 to store results. ResultsS3Prefix *string `type:"string"` } @@ -36659,6 +36662,12 @@ func (s *DataQualityEvaluationRunAdditionalRunOptions) SetCloudWatchMetricsEnabl return s } +// SetCompositeRuleEvaluationMethod sets the CompositeRuleEvaluationMethod field's value. +func (s *DataQualityEvaluationRunAdditionalRunOptions) SetCompositeRuleEvaluationMethod(v string) *DataQualityEvaluationRunAdditionalRunOptions { + s.CompositeRuleEvaluationMethod = &v + return s +} + // SetResultsS3Prefix sets the ResultsS3Prefix field's value. func (s *DataQualityEvaluationRunAdditionalRunOptions) SetResultsS3Prefix(v string) *DataQualityEvaluationRunAdditionalRunOptions { s.ResultsS3Prefix = &v @@ -46061,7 +46070,8 @@ type GetDataQualityRulesetEvaluationRunOutput struct { // An IAM role supplied to encrypt the results of the run. Role *string `type:"string"` - // A list of ruleset names for the run. + // A list of ruleset names for the run. Currently, this parameter takes only + // one Ruleset name. RulesetNames []*string `min:"1" type:"list"` // The unique run identifier associated with this run. @@ -79772,6 +79782,22 @@ func CsvSerdeOption_Values() []string { } } +const ( + // DQCompositeRuleEvaluationMethodColumn is a DQCompositeRuleEvaluationMethod enum value + DQCompositeRuleEvaluationMethodColumn = "COLUMN" + + // DQCompositeRuleEvaluationMethodRow is a DQCompositeRuleEvaluationMethod enum value + DQCompositeRuleEvaluationMethodRow = "ROW" +) + +// DQCompositeRuleEvaluationMethod_Values returns all elements of the DQCompositeRuleEvaluationMethod enum +func DQCompositeRuleEvaluationMethod_Values() []string { + return []string{ + DQCompositeRuleEvaluationMethodColumn, + DQCompositeRuleEvaluationMethodRow, + } +} + const ( // DQStopJobOnFailureTimingImmediate is a DQStopJobOnFailureTiming enum value DQStopJobOnFailureTimingImmediate = "Immediate" diff --git a/service/iotwireless/api.go b/service/iotwireless/api.go index f9e9ae96e49..56628e80602 100644 --- a/service/iotwireless/api.go +++ b/service/iotwireless/api.go @@ -31818,6 +31818,12 @@ const ( // MetricNameDeviceSnr is a MetricName enum value MetricNameDeviceSnr = "DeviceSNR" + // MetricNameDeviceRoamingRssi is a MetricName enum value + MetricNameDeviceRoamingRssi = "DeviceRoamingRSSI" + + // MetricNameDeviceRoamingSnr is a MetricName enum value + MetricNameDeviceRoamingSnr = "DeviceRoamingSNR" + // MetricNameDeviceUplinkCount is a MetricName enum value MetricNameDeviceUplinkCount = "DeviceUplinkCount" @@ -31908,6 +31914,8 @@ func MetricName_Values() []string { return []string{ MetricNameDeviceRssi, MetricNameDeviceSnr, + MetricNameDeviceRoamingRssi, + MetricNameDeviceRoamingSnr, MetricNameDeviceUplinkCount, MetricNameDeviceDownlinkCount, MetricNameDeviceUplinkLostCount, diff --git a/service/kms/api.go b/service/kms/api.go index f25af3aaab1..6f2ea228a16 100644 --- a/service/kms/api.go +++ b/service/kms/api.go @@ -1107,11 +1107,15 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, // or an SM2 key pair (China Regions only). The private key in an asymmetric // KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey -// operation to download the public key so it can be used outside of KMS. KMS -// keys with RSA or SM2 key pairs can be used to encrypt or decrypt data or -// sign and verify messages (but not both). KMS keys with ECC key pairs can -// be used only to sign and verify messages. For information about asymmetric -// KMS keys, see Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) +// operation to download the public key so it can be used outside of KMS. Each +// KMS key can have only one key usage. KMS keys with RSA key pairs can be used +// to encrypt and decrypt data or sign and verify messages (but not both). KMS +// keys with NIST-recommended ECC key pairs can be used to sign and verify messages +// or derive shared secrets (but not both). KMS keys with ECC_SECG_P256K1 can +// be used only to sign and verify messages. KMS keys with SM2 key pairs (China +// Regions only) can be used to either encrypt and decrypt data, sign and verify +// messages, or derive shared secrets (you must choose one key usage type). +// For information about asymmetric KMS keys, see Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) // in the Key Management Service Developer Guide. // // # HMAC KMS key @@ -1554,7 +1558,8 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -2068,6 +2073,219 @@ func (c *KMS) DeleteImportedKeyMaterialWithContext(ctx aws.Context, input *Delet return out, req.Send() } +const opDeriveSharedSecret = "DeriveSharedSecret" + +// DeriveSharedSecretRequest generates a "aws/request.Request" representing the +// client's request for the DeriveSharedSecret operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeriveSharedSecret for more information on using the DeriveSharedSecret +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the DeriveSharedSecretRequest method. +// req, resp := client.DeriveSharedSecretRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeriveSharedSecret +func (c *KMS) DeriveSharedSecretRequest(input *DeriveSharedSecretInput) (req *request.Request, output *DeriveSharedSecretOutput) { + op := &request.Operation{ + Name: opDeriveSharedSecret, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeriveSharedSecretInput{} + } + + output = &DeriveSharedSecretOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeriveSharedSecret API operation for AWS Key Management Service. +// +// Derives a shared secret using a key agreement algorithm. +// +// You must use an asymmetric NIST-recommended elliptic curve (ECC) or SM2 (China +// Regions only) KMS key pair with a KeyUsage value of KEY_AGREEMENT to call +// DeriveSharedSecret. +// +// DeriveSharedSecret uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman +// Primitive (https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60) +// (ECDH) to establish a key agreement between two peers by deriving a shared +// secret from their elliptic curve public-private key pairs. You can use the +// raw shared secret that DeriveSharedSecret returns to derive a symmetric key +// that can encrypt and decrypt data that is sent between the two peers, or +// that can generate and verify HMACs. KMS recommends that you follow NIST recommendations +// for key derivation (https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf) +// when using the raw shared secret to derive a symmetric key. +// +// The following workflow demonstrates how to establish key agreement over an +// insecure communication channel using DeriveSharedSecret. +// +// Alice calls CreateKey to create an asymmetric KMS key pair with a KeyUsage +// value of KEY_AGREEMENT. +// +// The asymmetric KMS key must use a NIST-recommended elliptic curve (ECC) or +// SM2 (China Regions only) key spec. +// +// Bob creates an elliptic curve key pair. +// +// Bob can call CreateKey to create an asymmetric KMS key pair or generate a +// key pair outside of KMS. Bob's key pair must use the same NIST-recommended +// elliptic curve (ECC) or SM2 (China Regions ony) curve as Alice. +// +// Alice and Bob exchange their public keys through an insecure communication +// channel (like the internet). +// +// Use GetPublicKey to download the public key of your asymmetric KMS key pair. +// +// KMS strongly recommends verifying that the public key you receive came from +// the expected party before using it to derive a shared secret. +// +// Alice calls DeriveSharedSecret. +// +// KMS uses the private key from the KMS key pair generated in Step 1, Bob's +// public key, and the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive +// to derive the shared secret. The private key in your KMS key pair never leaves +// KMS unencrypted. DeriveSharedSecret returns the raw shared secret. +// +// Bob uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive +// to calculate the same raw secret using his private key and Alice's public +// key. +// +// To derive a shared secret you must provide a key agreement algorithm, the +// private key of the caller's asymmetric NIST-recommended elliptic curve or +// SM2 (China Regions only) KMS key pair, and the public key from your peer's +// NIST-recommended elliptic curve or SM2 (China Regions only) key pair. The +// public key can be from another asymmetric KMS key pair or from a key pair +// generated outside of KMS, but both key pairs must be on the same elliptic +// curve. +// +// The KMS key that you use for this operation must be in a compatible key state. +// For details, see Key states of KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the Key Management Service Developer Guide. +// +// Cross-account use: Yes. To perform this operation with a KMS key in a different +// Amazon Web Services account, specify the key ARN or alias ARN in the value +// of the KeyId parameter. +// +// Required permissions: kms:DeriveSharedSecret (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// - CreateKey +// +// - GetPublicKey +// +// - DescribeKey +// +// Eventual consistency: The KMS API follows an eventual consistency model. +// For more information, see KMS eventual consistency (https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Key Management Service's +// API operation DeriveSharedSecret for usage and error information. +// +// Returned Error Types: +// +// - NotFoundException +// The request was rejected because the specified entity or resource could not +// be found. +// +// - DisabledException +// The request was rejected because the specified KMS key is not enabled. +// +// - KeyUnavailableException +// The request was rejected because the specified KMS key was not available. +// You can retry the request. +// +// - DependencyTimeoutException +// The system timed out while trying to fulfill the request. You can retry the +// request. +// +// - InvalidGrantTokenException +// The request was rejected because the specified grant token is not valid. +// +// - InvalidKeyUsageException +// The request was rejected for one of the following reasons: +// +// - The KeyUsage value of the KMS key is incompatible with the API operation. +// +// - The encryption algorithm or signing algorithm specified for the operation +// is incompatible with the type of key material in the KMS key (KeySpec). +// +// For encrypting, decrypting, re-encrypting, and generating data keys, the +// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the +// KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage +// of a KMS key, use the DescribeKey operation. +// +// To find the encryption or signing algorithms supported for a particular KMS +// key, use the DescribeKey operation. +// +// - InternalException +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// - InvalidStateException +// The request was rejected because the state of the specified resource is not +// valid for this request. +// +// This exceptions means one of the following: +// +// - The key state of the KMS key is not compatible with the operation. To +// find the key state, use the DescribeKey operation. For more information +// about which key states are compatible with each KMS operation, see Key +// states of KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the Key Management Service Developer Guide . +// +// - For cryptographic operations on KMS keys in custom key stores, this +// exception represents a general failure with many possible causes. To identify +// the cause, see the error message that accompanies the exception. +// +// - DryRunOperationException +// The request was rejected because the DryRun parameter was specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeriveSharedSecret +func (c *KMS) DeriveSharedSecret(input *DeriveSharedSecretInput) (*DeriveSharedSecretOutput, error) { + req, out := c.DeriveSharedSecretRequest(input) + return out, req.Send() +} + +// DeriveSharedSecretWithContext is the same as DeriveSharedSecret with the addition of +// the ability to pass a context and additional request options. +// +// See DeriveSharedSecret for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *KMS) DeriveSharedSecretWithContext(ctx aws.Context, input *DeriveSharedSecretInput, opts ...request.Option) (*DeriveSharedSecretOutput, error) { + req, out := c.DeriveSharedSecretRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeCustomKeyStores = "DescribeCustomKeyStores" // DescribeCustomKeyStoresRequest generates a "aws/request.Request" representing the @@ -3326,7 +3544,8 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -3554,7 +3773,8 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -3772,7 +3992,8 @@ func (c *KMS) GenerateDataKeyPairRequest(input *GenerateDataKeyPairInput) (req * // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -3969,7 +4190,8 @@ func (c *KMS) GenerateDataKeyPairWithoutPlaintextRequest(input *GenerateDataKeyP // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -4178,7 +4400,8 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -4343,7 +4566,8 @@ func (c *KMS) GenerateMacRequest(input *GenerateMacInput) (req *request.Request, // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -4911,9 +5135,9 @@ func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) // GetParametersForImport returns the items that you need to import your key // material. // -// - The public key (or "wrapping key") of an asymmetric key pair that KMS -// generates. You will use this public key to encrypt ("wrap") your key material -// while it's in transit to KMS. +// - The public key (or "wrapping key") of an RSA key pair that KMS generates. +// You will use this public key to encrypt ("wrap") your key material while +// it's in transit to KMS. // // - A import token that ensures that KMS can decrypt your key material and // associate it with the correct KMS key. @@ -5089,7 +5313,8 @@ func (c *KMS) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Reques // The type of key material in the public key, such as RSA_4096 or ECC_NIST_P521. // // - KeyUsage (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage): -// Whether the key is used for encryption or signing. +// Whether the key is used for encryption, signing, or deriving a shared +// secret. // // - EncryptionAlgorithms (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms) // or SigningAlgorithms (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms): @@ -5170,7 +5395,8 @@ func (c *KMS) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Reques // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -7082,7 +7308,8 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -8134,7 +8361,8 @@ func (c *KMS) SignRequest(input *SignInput) (req *request.Request, output *SignO // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -9412,7 +9640,8 @@ func (c *KMS) VerifyRequest(input *VerifyInput) (req *request.Request, output *V // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -9576,7 +9805,8 @@ func (c *KMS) VerifyMacRequest(input *VerifyMacInput) (req *request.Request, out // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -11140,15 +11370,18 @@ type CreateKeyInput struct { // // * HMAC keys (symmetric) HMAC_224 HMAC_256 HMAC_384 HMAC_512 // - // * Asymmetric RSA key pairs RSA_2048 RSA_3072 RSA_4096 + // * Asymmetric RSA key pairs (encryption and decryption -or- signing and + // verification) RSA_2048 RSA_3072 RSA_4096 // - // * Asymmetric NIST-recommended elliptic curve key pairs ECC_NIST_P256 (secp256r1) - // ECC_NIST_P384 (secp384r1) ECC_NIST_P521 (secp521r1) + // * Asymmetric NIST-recommended elliptic curve key pairs (signing and verification + // -or- deriving shared secrets) ECC_NIST_P256 (secp256r1) ECC_NIST_P384 + // (secp384r1) ECC_NIST_P521 (secp521r1) // - // * Other asymmetric elliptic curve key pairs ECC_SECG_P256K1 (secp256k1), - // commonly used for cryptocurrencies. + // * Other asymmetric elliptic curve key pairs (signing and verification) + // ECC_SECG_P256K1 (secp256k1), commonly used for cryptocurrencies. // - // * SM2 key pairs (China Regions only) SM2 + // * SM2 key pairs (encryption and decryption -or- signing and verification + // -or- deriving shared secrets) SM2 (China Regions only) KeySpec *string `type:"string" enum:"KeySpec"` // Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) @@ -11163,13 +11396,16 @@ type CreateKeyInput struct { // // * For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC. // - // * For asymmetric KMS keys with RSA key material, specify ENCRYPT_DECRYPT + // * For asymmetric KMS keys with RSA key pairs, specify ENCRYPT_DECRYPT // or SIGN_VERIFY. // - // * For asymmetric KMS keys with ECC key material, specify SIGN_VERIFY. + // * For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, + // specify SIGN_VERIFY or KEY_AGREEMENT. // - // * For asymmetric KMS keys with SM2 key material (China Regions only), - // specify ENCRYPT_DECRYPT or SIGN_VERIFY. + // * For asymmetric KMS keys with ECC_SECG_P256K1 key pairs specify SIGN_VERIFY. + // + // * For asymmetric KMS keys with SM2 key pairs (China Regions only), specify + // ENCRYPT_DECRYPT, SIGN_VERIFY, or KEY_AGREEMENT. KeyUsage *string `type:"string" enum:"KeyUsageType"` // Creates a multi-Region primary key that you can replicate into other Amazon @@ -12555,6 +12791,282 @@ func (s *DependencyTimeoutException) RequestID() string { return s.RespMetadata.RequestID } +type DeriveSharedSecretInput struct { + _ struct{} `type:"structure"` + + // Checks if your request will succeed. DryRun is an optional parameter. + // + // To learn more about how to use this parameter, see Testing your KMS API calls + // (https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html) + // in the Key Management Service Developer Guide. + DryRun *bool `type:"boolean"` + + // A list of grant tokens. + // + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) + // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token) + // in the Key Management Service Developer Guide. + GrantTokens []*string `type:"list"` + + // Specifies the key agreement algorithm used to derive the shared secret. The + // only valid value is ECDH. + // + // KeyAgreementAlgorithm is a required field + KeyAgreementAlgorithm *string `type:"string" required:"true" enum:"KeyAgreementAlgorithmSpec"` + + // Identifies an asymmetric NIST-recommended ECC or SM2 (China Regions only) + // KMS key. KMS uses the private key in the specified key pair to derive the + // shared secret. The key usage of the KMS key must be KEY_AGREEMENT. To find + // the KeyUsage of a KMS key, use the DescribeKey operation. + // + // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. + // When using an alias name, prefix it with "alias/". To specify a KMS key in + // a different Amazon Web Services account, you must use the key ARN or alias + // ARN. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Alias name: alias/ExampleAlias + // + // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias + // + // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. + // To get the alias name and alias ARN, use ListAliases. + // + // KeyId is a required field + KeyId *string `min:"1" type:"string" required:"true"` + + // Specifies the public key in your peer's NIST-recommended elliptic curve (ECC) + // or SM2 (China Regions only) key pair. + // + // The public key must be a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo + // (SPKI), as defined in RFC 5280 (https://tools.ietf.org/html/rfc5280). + // + // GetPublicKey returns the public key of an asymmetric KMS key pair in the + // required DER-encoded format. + // + // If you use Amazon Web Services CLI version 1 (https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-welcome.html), + // you must provide the DER-encoded X.509 public key in a file. Otherwise, the + // Amazon Web Services CLI Base64-encodes the public key a second time, resulting + // in a ValidationException. + // + // You can specify the public key as binary data in a file using fileb (fileb://) + // or in-line using a Base64 encoded string. + // PublicKey is automatically base64 encoded/decoded by the SDK. + // + // PublicKey is a required field + PublicKey []byte `min:"1" type:"blob" required:"true"` + + // A signed attestation document (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc) + // from an Amazon Web Services Nitro enclave and the encryption algorithm to + // use with the enclave's public key. The only valid encryption algorithm is + // RSAES_OAEP_SHA_256. + // + // This parameter only supports attestation documents for Amazon Web Services + // Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro + // Enclaves, use the Amazon Web Services Nitro Enclaves SDK (https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk) + // to generate the attestation document and then use the Recipient parameter + // from any Amazon Web Services SDK to provide the attestation document for + // the enclave. + // + // When you use this parameter, instead of returning a plaintext copy of the + // shared secret, KMS encrypts the plaintext shared secret under the public + // key in the attestation document, and returns the resulting ciphertext in + // the CiphertextForRecipient field in the response. This ciphertext can be + // decrypted only with the private key in the enclave. The CiphertextBlob field + // in the response contains the encrypted shared secret derived from the KMS + // key specified by the KeyId parameter and public key specified by the PublicKey + // parameter. The SharedSecret field in the response is null or empty. + // + // For information about the interaction between KMS and Amazon Web Services + // Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html) + // in the Key Management Service Developer Guide. + Recipient *RecipientInfo `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeriveSharedSecretInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeriveSharedSecretInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeriveSharedSecretInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeriveSharedSecretInput"} + if s.KeyAgreementAlgorithm == nil { + invalidParams.Add(request.NewErrParamRequired("KeyAgreementAlgorithm")) + } + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.PublicKey == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKey")) + } + if s.PublicKey != nil && len(s.PublicKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PublicKey", 1)) + } + if s.Recipient != nil { + if err := s.Recipient.Validate(); err != nil { + invalidParams.AddNested("Recipient", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeriveSharedSecretInput) SetDryRun(v bool) *DeriveSharedSecretInput { + s.DryRun = &v + return s +} + +// SetGrantTokens sets the GrantTokens field's value. +func (s *DeriveSharedSecretInput) SetGrantTokens(v []*string) *DeriveSharedSecretInput { + s.GrantTokens = v + return s +} + +// SetKeyAgreementAlgorithm sets the KeyAgreementAlgorithm field's value. +func (s *DeriveSharedSecretInput) SetKeyAgreementAlgorithm(v string) *DeriveSharedSecretInput { + s.KeyAgreementAlgorithm = &v + return s +} + +// SetKeyId sets the KeyId field's value. +func (s *DeriveSharedSecretInput) SetKeyId(v string) *DeriveSharedSecretInput { + s.KeyId = &v + return s +} + +// SetPublicKey sets the PublicKey field's value. +func (s *DeriveSharedSecretInput) SetPublicKey(v []byte) *DeriveSharedSecretInput { + s.PublicKey = v + return s +} + +// SetRecipient sets the Recipient field's value. +func (s *DeriveSharedSecretInput) SetRecipient(v *RecipientInfo) *DeriveSharedSecretInput { + s.Recipient = v + return s +} + +type DeriveSharedSecretOutput struct { + _ struct{} `type:"structure"` + + // The plaintext shared secret encrypted with the public key in the attestation + // document. + // + // This field is included in the response only when the Recipient parameter + // in the request includes a valid attestation document from an Amazon Web Services + // Nitro enclave. For information about the interaction between KMS and Amazon + // Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses + // KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html) + // in the Key Management Service Developer Guide. + // CiphertextForRecipient is automatically base64 encoded/decoded by the SDK. + CiphertextForRecipient []byte `min:"1" type:"blob"` + + // Identifies the key agreement algorithm used to derive the shared secret. + KeyAgreementAlgorithm *string `type:"string" enum:"KeyAgreementAlgorithmSpec"` + + // Identifies the KMS key used to derive the shared secret. + KeyId *string `min:"1" type:"string"` + + // The source of the key material for the specified KMS key. + // + // When this value is AWS_KMS, KMS created the key material. When this value + // is EXTERNAL, the key material was imported or the KMS key doesn't have any + // key material. + // + // The only valid values for DeriveSharedSecret are AWS_KMS and EXTERNAL. DeriveSharedSecret + // does not support KMS keys with a KeyOrigin value of AWS_CLOUDHSM or EXTERNAL_KEY_STORE. + KeyOrigin *string `type:"string" enum:"OriginType"` + + // The raw secret derived from the specified key agreement algorithm, private + // key in the asymmetric KMS key, and your peer's public key. + // + // If the response includes the CiphertextForRecipient field, the SharedSecret + // field is null or empty. + // + // SharedSecret is a sensitive parameter and its value will be + // replaced with "sensitive" in string returned by DeriveSharedSecretOutput's + // String and GoString methods. + // + // SharedSecret is automatically base64 encoded/decoded by the SDK. + SharedSecret []byte `min:"1" type:"blob" sensitive:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeriveSharedSecretOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeriveSharedSecretOutput) GoString() string { + return s.String() +} + +// SetCiphertextForRecipient sets the CiphertextForRecipient field's value. +func (s *DeriveSharedSecretOutput) SetCiphertextForRecipient(v []byte) *DeriveSharedSecretOutput { + s.CiphertextForRecipient = v + return s +} + +// SetKeyAgreementAlgorithm sets the KeyAgreementAlgorithm field's value. +func (s *DeriveSharedSecretOutput) SetKeyAgreementAlgorithm(v string) *DeriveSharedSecretOutput { + s.KeyAgreementAlgorithm = &v + return s +} + +// SetKeyId sets the KeyId field's value. +func (s *DeriveSharedSecretOutput) SetKeyId(v string) *DeriveSharedSecretOutput { + s.KeyId = &v + return s +} + +// SetKeyOrigin sets the KeyOrigin field's value. +func (s *DeriveSharedSecretOutput) SetKeyOrigin(v string) *DeriveSharedSecretOutput { + s.KeyOrigin = &v + return s +} + +// SetSharedSecret sets the SharedSecret field's value. +func (s *DeriveSharedSecretOutput) SetSharedSecret(v []byte) *DeriveSharedSecretOutput { + s.SharedSecret = v + return s +} + type DescribeCustomKeyStoresInput struct { _ struct{} `type:"structure"` @@ -14006,9 +14518,11 @@ type GenerateDataKeyPairInput struct { // RSAES_OAEP_SHA_256. // // This parameter only supports attestation documents for Amazon Web Services - // Nitro Enclaves. To include this parameter, use the Amazon Web Services Nitro - // Enclaves SDK (https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk) - // or any Amazon Web Services SDK. + // Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro + // Enclaves, use the Amazon Web Services Nitro Enclaves SDK (https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk) + // to generate the attestation document and then use the Recipient parameter + // from any Amazon Web Services SDK to provide the attestation document for + // the enclave. // // When you use this parameter, instead of returning a plaintext copy of the // private data key, KMS encrypts the plaintext private data key under the public @@ -15199,25 +15713,19 @@ type GetParametersForImportInput struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // The algorithm you will use with the asymmetric public key (PublicKey) in - // the response to protect your key material during import. For more information, - // see Select a wrapping algorithm (kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm) + // The algorithm you will use with the RSA public key (PublicKey) in the response + // to protect your key material during import. For more information, see Select + // a wrapping algorithm (kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm) // in the Key Management Service Developer Guide. // // For RSA_AES wrapping algorithms, you encrypt your key material with an AES // key that you generate, then encrypt your AES key with the RSA public key // from KMS. For RSAES wrapping algorithms, you encrypt your key material directly - // with the RSA public key from KMS. For SM2PKE wrapping algorithms, you encrypt - // your key material directly with the SM2 public key from KMS. + // with the RSA public key from KMS. // // The wrapping algorithms that you can use depend on the type of key material // that you are importing. To import an RSA private key, you must use an RSA_AES - // wrapping algorithm, except in China Regions, where you must use the SM2PKE - // wrapping algorithm to import an RSA private key. - // - // The SM2PKE wrapping algorithm is available only in China Regions. The RSA_AES_KEY_WRAP_SHA_256 - // and RSA_AES_KEY_WRAP_SHA_1 wrapping algorithms are not supported in China - // Regions. + // wrapping algorithm. // // * RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key // material. @@ -15237,24 +15745,19 @@ type GetParametersForImportInput struct { // * RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not // support the RSAES_PKCS1_V1_5 wrapping algorithm. // - // * SM2PKE (China Regions only) — supported for wrapping RSA, ECC, and - // SM2 key material. - // // WrappingAlgorithm is a required field WrappingAlgorithm *string `type:"string" required:"true" enum:"AlgorithmSpec"` - // The type of public key to return in the response. You will use this wrapping + // The type of RSA public key to return in the response. You will use this wrapping // key with the specified wrapping algorithm to protect your key material during // import. // - // Use the longest wrapping key that is practical. + // Use the longest RSA wrapping key that is practical. // // You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private // key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public // key. // - // The SM2 wrapping key spec is available only in China Regions. - // // WrappingKeySpec is a required field WrappingKeySpec *string `type:"string" required:"true" enum:"WrappingKeySpec"` } @@ -15490,6 +15993,10 @@ type GetPublicKeyOutput struct { // is ENCRYPT_DECRYPT. EncryptionAlgorithms []*string `type:"list" enum:"EncryptionAlgorithmSpec"` + // The key agreement algorithm used to derive a shared secret. This field is + // present only when the KMS key has a KeyUsage value of KEY_AGREEMENT. + KeyAgreementAlgorithms []*string `type:"list" enum:"KeyAgreementAlgorithmSpec"` + // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) // of the asymmetric KMS key from which the public key was downloaded. KeyId *string `min:"1" type:"string"` @@ -15497,11 +16004,11 @@ type GetPublicKeyOutput struct { // The type of the of the public key that was downloaded. KeySpec *string `type:"string" enum:"KeySpec"` - // The permitted use of the public key. Valid values are ENCRYPT_DECRYPT or - // SIGN_VERIFY. + // The permitted use of the public key. Valid values for asymmetric key pairs + // are ENCRYPT_DECRYPT, SIGN_VERIFY, and KEY_AGREEMENT. // - // This information is critical. If a public key with SIGN_VERIFY key usage - // encrypts data outside of KMS, the ciphertext cannot be decrypted. + // This information is critical. For example, if a public key with SIGN_VERIFY + // key usage encrypts data outside of KMS, the ciphertext cannot be decrypted. KeyUsage *string `type:"string" enum:"KeyUsageType"` // The exported public key. @@ -15550,6 +16057,12 @@ func (s *GetPublicKeyOutput) SetEncryptionAlgorithms(v []*string) *GetPublicKeyO return s } +// SetKeyAgreementAlgorithms sets the KeyAgreementAlgorithms field's value. +func (s *GetPublicKeyOutput) SetKeyAgreementAlgorithms(v []*string) *GetPublicKeyOutput { + s.KeyAgreementAlgorithms = v + return s +} + // SetKeyId sets the KeyId field's value. func (s *GetPublicKeyOutput) SetKeyId(v string) *GetPublicKeyOutput { s.KeyId = &v @@ -16603,7 +17116,8 @@ func (s *InvalidImportTokenException) RequestID() string { // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication -// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage +// codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key +// agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS @@ -17052,6 +17566,9 @@ type KeyMetadata struct { // only when Origin is EXTERNAL, otherwise this value is omitted. ExpirationModel *string `type:"string" enum:"ExpirationModelType"` + // The key agreement algorithm used to derive a shared secret. + KeyAgreementAlgorithms []*string `type:"list" enum:"KeyAgreementAlgorithmSpec"` + // The globally unique identifier for the KMS key. // // KeyId is a required field @@ -17232,6 +17749,12 @@ func (s *KeyMetadata) SetExpirationModel(v string) *KeyMetadata { return s } +// SetKeyAgreementAlgorithms sets the KeyAgreementAlgorithms field's value. +func (s *KeyMetadata) SetKeyAgreementAlgorithms(v []*string) *KeyMetadata { + s.KeyAgreementAlgorithms = v + return s +} + // SetKeyId sets the KeyId field's value. func (s *KeyMetadata) SetKeyId(v string) *KeyMetadata { s.KeyId = &v @@ -23034,6 +23557,9 @@ const ( // GrantOperationVerifyMac is a GrantOperation enum value GrantOperationVerifyMac = "VerifyMac" + + // GrantOperationDeriveSharedSecret is a GrantOperation enum value + GrantOperationDeriveSharedSecret = "DeriveSharedSecret" ) // GrantOperation_Values returns all elements of the GrantOperation enum @@ -23055,6 +23581,19 @@ func GrantOperation_Values() []string { GrantOperationGenerateDataKeyPairWithoutPlaintext, GrantOperationGenerateMac, GrantOperationVerifyMac, + GrantOperationDeriveSharedSecret, + } +} + +const ( + // KeyAgreementAlgorithmSpecEcdh is a KeyAgreementAlgorithmSpec enum value + KeyAgreementAlgorithmSpecEcdh = "ECDH" +) + +// KeyAgreementAlgorithmSpec_Values returns all elements of the KeyAgreementAlgorithmSpec enum +func KeyAgreementAlgorithmSpec_Values() []string { + return []string{ + KeyAgreementAlgorithmSpecEcdh, } } @@ -23195,6 +23734,9 @@ const ( // KeyUsageTypeGenerateVerifyMac is a KeyUsageType enum value KeyUsageTypeGenerateVerifyMac = "GENERATE_VERIFY_MAC" + + // KeyUsageTypeKeyAgreement is a KeyUsageType enum value + KeyUsageTypeKeyAgreement = "KEY_AGREEMENT" ) // KeyUsageType_Values returns all elements of the KeyUsageType enum @@ -23203,6 +23745,7 @@ func KeyUsageType_Values() []string { KeyUsageTypeSignVerify, KeyUsageTypeEncryptDecrypt, KeyUsageTypeGenerateVerifyMac, + KeyUsageTypeKeyAgreement, } } diff --git a/service/kms/errors.go b/service/kms/errors.go index 170e2335d1d..5cce759a066 100644 --- a/service/kms/errors.go +++ b/service/kms/errors.go @@ -279,7 +279,8 @@ const ( // For encrypting, decrypting, re-encrypting, and generating data keys, the // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying messages, the // KeyUsage must be SIGN_VERIFY. For generating and verifying message authentication - // codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. To find the KeyUsage + // codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC. For deriving key + // agreement secrets, the KeyUsage must be KEY_AGREEMENT. To find the KeyUsage // of a KMS key, use the DescribeKey operation. // // To find the encryption or signing algorithms supported for a particular KMS diff --git a/service/kms/examples_test.go b/service/kms/examples_test.go index f03fcc10b59..444ed032fea 100644 --- a/service/kms/examples_test.go +++ b/service/kms/examples_test.go @@ -1099,6 +1099,52 @@ func ExampleKMS_DeleteImportedKeyMaterial_shared00() { fmt.Println(result) } +// To derive a shared secret +// The following example derives a shared secret using a key agreement algorithm. +func ExampleKMS_DeriveSharedSecret_shared00() { + svc := kms.New(session.New()) + input := &kms.DeriveSharedSecretInput{ + KeyAgreementAlgorithm: aws.String("ECDH"), + KeyId: aws.String("1234abcd-12ab-34cd-56ef-1234567890ab"), + PublicKey: []byte("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH3Yj0wbkLEpUl95Cv1cJVjsVNSjwGq3tCLnzXfhVwVvmzGN8pYj3U8nKwgouaHbBWNJYjP5VutbbkKS4Kv4GojwZBJyHN17kmxo8yTjRmjR15SKIQ8cqRA2uaERMLnpztIXdZp232PQPbWGxDyXYJ0aJ5EFSag+iSK341kr2kFTpINN7T1ZaX9vfXBdGR+VtkRKMWoHQeWzHrPZ+3irvpXNCKxGUxmPNsJSjPUhuSXT5+0VrY/LEYLQ5lUTrhU6z5/OK0kzaCc66DXc5ipSloS4Xyg+QcYSMxe9xuqO5HtzFImUSKBm1W6eDT6lHnSbpi7vXzNbIX7pWxKw9nmQvQIDAQAB"), + } + + result, err := svc.DeriveSharedSecret(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case kms.ErrCodeNotFoundException: + fmt.Println(kms.ErrCodeNotFoundException, aerr.Error()) + case kms.ErrCodeDisabledException: + fmt.Println(kms.ErrCodeDisabledException, aerr.Error()) + case kms.ErrCodeKeyUnavailableException: + fmt.Println(kms.ErrCodeKeyUnavailableException, aerr.Error()) + case kms.ErrCodeDependencyTimeoutException: + fmt.Println(kms.ErrCodeDependencyTimeoutException, aerr.Error()) + case kms.ErrCodeInvalidGrantTokenException: + fmt.Println(kms.ErrCodeInvalidGrantTokenException, aerr.Error()) + case kms.ErrCodeInvalidKeyUsageException: + fmt.Println(kms.ErrCodeInvalidKeyUsageException, aerr.Error()) + case kms.ErrCodeInternalException: + fmt.Println(kms.ErrCodeInternalException, aerr.Error()) + case kms.ErrCodeInvalidStateException: + fmt.Println(kms.ErrCodeInvalidStateException, aerr.Error()) + case kms.ErrCodeDryRunOperationException: + fmt.Println(kms.ErrCodeDryRunOperationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + // To get detailed information about custom key stores in the account and Region // 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 diff --git a/service/kms/kmsiface/interface.go b/service/kms/kmsiface/interface.go index c160d6273eb..5d360176495 100644 --- a/service/kms/kmsiface/interface.go +++ b/service/kms/kmsiface/interface.go @@ -100,6 +100,10 @@ type KMSAPI interface { DeleteImportedKeyMaterialWithContext(aws.Context, *kms.DeleteImportedKeyMaterialInput, ...request.Option) (*kms.DeleteImportedKeyMaterialOutput, error) DeleteImportedKeyMaterialRequest(*kms.DeleteImportedKeyMaterialInput) (*request.Request, *kms.DeleteImportedKeyMaterialOutput) + DeriveSharedSecret(*kms.DeriveSharedSecretInput) (*kms.DeriveSharedSecretOutput, error) + DeriveSharedSecretWithContext(aws.Context, *kms.DeriveSharedSecretInput, ...request.Option) (*kms.DeriveSharedSecretOutput, error) + DeriveSharedSecretRequest(*kms.DeriveSharedSecretInput) (*request.Request, *kms.DeriveSharedSecretOutput) + DescribeCustomKeyStores(*kms.DescribeCustomKeyStoresInput) (*kms.DescribeCustomKeyStoresOutput, error) DescribeCustomKeyStoresWithContext(aws.Context, *kms.DescribeCustomKeyStoresInput, ...request.Option) (*kms.DescribeCustomKeyStoresOutput, error) DescribeCustomKeyStoresRequest(*kms.DescribeCustomKeyStoresInput) (*request.Request, *kms.DescribeCustomKeyStoresOutput) diff --git a/service/mediapackagev2/api.go b/service/mediapackagev2/api.go index 4ecaf698089..dd33142571b 100644 --- a/service/mediapackagev2/api.go +++ b/service/mediapackagev2/api.go @@ -2692,6 +2692,19 @@ type ChannelListConfiguration struct { // identification purposes. Description *string `type:"string"` + // The input type will be an immutable field which will be used to define whether + // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will + // default to HLS to preserve current behavior. + // + // The allowed values are: + // + // * HLS - The HLS streaming specification (which defines M3U8 manifests + // and TS segments). + // + // * CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments + // with optional DASH manifests). + InputType *string `type:"string" enum:"InputType"` + // The date and time the channel was modified. // // ModifiedAt is a required field @@ -2746,6 +2759,12 @@ func (s *ChannelListConfiguration) SetDescription(v string) *ChannelListConfigur return s } +// SetInputType sets the InputType field's value. +func (s *ChannelListConfiguration) SetInputType(v string) *ChannelListConfiguration { + s.InputType = &v + return s +} + // SetModifiedAt sets the ModifiedAt field's value. func (s *ChannelListConfiguration) SetModifiedAt(v time.Time) *ChannelListConfiguration { s.ModifiedAt = &v @@ -3036,6 +3055,19 @@ type CreateChannelInput struct { // Enter any descriptive text that helps you to identify the channel. Description *string `type:"string"` + // The input type will be an immutable field which will be used to define whether + // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will + // default to HLS to preserve current behavior. + // + // The allowed values are: + // + // * HLS - The HLS streaming specification (which defines M3U8 manifests + // and TS segments). + // + // * CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments + // with optional DASH manifests). + InputType *string `type:"string" enum:"InputType"` + // A comma-separated list of tag key:value pairs that you define. For example: // // "Key1": "Value1", @@ -3111,6 +3143,12 @@ func (s *CreateChannelInput) SetDescription(v string) *CreateChannelInput { return s } +// SetInputType sets the InputType field's value. +func (s *CreateChannelInput) SetInputType(v string) *CreateChannelInput { + s.InputType = &v + return s +} + // SetTags sets the Tags field's value. func (s *CreateChannelInput) SetTags(v map[string]*string) *CreateChannelInput { s.Tags = v @@ -3153,6 +3191,19 @@ type CreateChannelOutput struct { // The list of ingest endpoints. IngestEndpoints []*IngestEndpoint `type:"list"` + // The input type will be an immutable field which will be used to define whether + // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will + // default to HLS to preserve current behavior. + // + // The allowed values are: + // + // * HLS - The HLS streaming specification (which defines M3U8 manifests + // and TS segments). + // + // * CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments + // with optional DASH manifests). + InputType *string `type:"string" enum:"InputType"` + // The date and time the channel was modified. // // ModifiedAt is a required field @@ -3222,6 +3273,12 @@ func (s *CreateChannelOutput) SetIngestEndpoints(v []*IngestEndpoint) *CreateCha return s } +// SetInputType sets the InputType field's value. +func (s *CreateChannelOutput) SetInputType(v string) *CreateChannelOutput { + s.InputType = &v + return s +} + // SetModifiedAt sets the ModifiedAt field's value. func (s *CreateChannelOutput) SetModifiedAt(v time.Time) *CreateChannelOutput { s.ModifiedAt = &v @@ -3703,6 +3760,9 @@ type CreateOriginEndpointInput struct { // Enter any descriptive text that helps you to identify the origin endpoint. Description *string `type:"string"` + // The failover settings for the endpoint. + ForceEndpointErrorConfiguration *ForceEndpointErrorConfiguration `type:"structure"` + // An HTTP live streaming (HLS) manifest configuration. HlsManifests []*CreateHlsManifestConfiguration `type:"list"` @@ -3861,6 +3921,12 @@ func (s *CreateOriginEndpointInput) SetDescription(v string) *CreateOriginEndpoi return s } +// SetForceEndpointErrorConfiguration sets the ForceEndpointErrorConfiguration field's value. +func (s *CreateOriginEndpointInput) SetForceEndpointErrorConfiguration(v *ForceEndpointErrorConfiguration) *CreateOriginEndpointInput { + s.ForceEndpointErrorConfiguration = v + return s +} + // SetHlsManifests sets the HlsManifests field's value. func (s *CreateOriginEndpointInput) SetHlsManifests(v []*CreateHlsManifestConfiguration) *CreateOriginEndpointInput { s.HlsManifests = v @@ -3938,6 +4004,9 @@ type CreateOriginEndpointOutput struct { // can be used to safely make concurrent updates to the resource. ETag *string `min:"1" type:"string"` + // The failover settings for the endpoint. + ForceEndpointErrorConfiguration *ForceEndpointErrorConfiguration `type:"structure"` + // An HTTP live streaming (HLS) manifest configuration. HlsManifests []*GetHlsManifestConfiguration `type:"list"` @@ -4037,6 +4106,12 @@ func (s *CreateOriginEndpointOutput) SetETag(v string) *CreateOriginEndpointOutp return s } +// SetForceEndpointErrorConfiguration sets the ForceEndpointErrorConfiguration field's value. +func (s *CreateOriginEndpointOutput) SetForceEndpointErrorConfiguration(v *ForceEndpointErrorConfiguration) *CreateOriginEndpointOutput { + s.ForceEndpointErrorConfiguration = v + return s +} + // SetHlsManifests sets the HlsManifests field's value. func (s *CreateOriginEndpointOutput) SetHlsManifests(v []*GetHlsManifestConfiguration) *CreateOriginEndpointOutput { s.HlsManifests = v @@ -4955,6 +5030,49 @@ func (s *FilterConfiguration) SetTimeDelaySeconds(v int64) *FilterConfiguration return s } +// The failover settings for the endpoint. +type ForceEndpointErrorConfiguration struct { + _ struct{} `type:"structure"` + + // The failover conditions for the endpoint. The options are: + // + // * STALE_MANIFEST - The manifest stalled and there are no new segments + // or parts. + // + // * INCOMPLETE_MANIFEST - There is a gap in the manifest. + // + // * MISSING_DRM_KEY - Key rotation is enabled but we're unable to fetch + // the key for the current key period. + // + // * SLATE_INPUT - The segments which contain slate content are considered + // to be missing content. + EndpointErrorConditions []*string `type:"list" enum:"EndpointErrorCondition"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ForceEndpointErrorConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ForceEndpointErrorConfiguration) GoString() string { + return s.String() +} + +// SetEndpointErrorConditions sets the EndpointErrorConditions field's value. +func (s *ForceEndpointErrorConfiguration) SetEndpointErrorConditions(v []*string) *ForceEndpointErrorConfiguration { + s.EndpointErrorConditions = v + return s +} + type GetChannelGroupInput struct { _ struct{} `type:"structure" nopayload:"true"` @@ -5217,6 +5335,19 @@ type GetChannelOutput struct { // The list of ingest endpoints. IngestEndpoints []*IngestEndpoint `type:"list"` + // The input type will be an immutable field which will be used to define whether + // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will + // default to HLS to preserve current behavior. + // + // The allowed values are: + // + // * HLS - The HLS streaming specification (which defines M3U8 manifests + // and TS segments). + // + // * CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments + // with optional DASH manifests). + InputType *string `type:"string" enum:"InputType"` + // The date and time the channel was modified. // // ModifiedAt is a required field @@ -5286,6 +5417,12 @@ func (s *GetChannelOutput) SetIngestEndpoints(v []*IngestEndpoint) *GetChannelOu return s } +// SetInputType sets the InputType field's value. +func (s *GetChannelOutput) SetInputType(v string) *GetChannelOutput { + s.InputType = &v + return s +} + // SetModifiedAt sets the ModifiedAt field's value. func (s *GetChannelOutput) SetModifiedAt(v time.Time) *GetChannelOutput { s.ModifiedAt = &v @@ -5927,6 +6064,9 @@ type GetOriginEndpointOutput struct { // can be used to safely make concurrent updates to the resource. ETag *string `min:"1" type:"string"` + // The failover settings for the endpoint. + ForceEndpointErrorConfiguration *ForceEndpointErrorConfiguration `type:"structure"` + // An HTTP live streaming (HLS) manifest configuration. HlsManifests []*GetHlsManifestConfiguration `type:"list"` @@ -6026,6 +6166,12 @@ func (s *GetOriginEndpointOutput) SetETag(v string) *GetOriginEndpointOutput { return s } +// SetForceEndpointErrorConfiguration sets the ForceEndpointErrorConfiguration field's value. +func (s *GetOriginEndpointOutput) SetForceEndpointErrorConfiguration(v *ForceEndpointErrorConfiguration) *GetOriginEndpointOutput { + s.ForceEndpointErrorConfiguration = v + return s +} + // SetHlsManifests sets the HlsManifests field's value. func (s *GetOriginEndpointOutput) SetHlsManifests(v []*GetHlsManifestConfiguration) *GetOriginEndpointOutput { s.HlsManifests = v @@ -6959,6 +7105,9 @@ type OriginEndpointListConfiguration struct { // future identification purposes. Description *string `type:"string"` + // The failover settings for the endpoint. + ForceEndpointErrorConfiguration *ForceEndpointErrorConfiguration `type:"structure"` + // An HTTP live streaming (HLS) manifest configuration. HlsManifests []*ListHlsManifestConfiguration `type:"list"` @@ -7036,6 +7185,12 @@ func (s *OriginEndpointListConfiguration) SetDescription(v string) *OriginEndpoi return s } +// SetForceEndpointErrorConfiguration sets the ForceEndpointErrorConfiguration field's value. +func (s *OriginEndpointListConfiguration) SetForceEndpointErrorConfiguration(v *ForceEndpointErrorConfiguration) *OriginEndpointListConfiguration { + s.ForceEndpointErrorConfiguration = v + return s +} + // SetHlsManifests sets the HlsManifests field's value. func (s *OriginEndpointListConfiguration) SetHlsManifests(v []*ListHlsManifestConfiguration) *OriginEndpointListConfiguration { s.HlsManifests = v @@ -8344,6 +8499,19 @@ type UpdateChannelOutput struct { // The list of ingest endpoints. IngestEndpoints []*IngestEndpoint `type:"list"` + // The input type will be an immutable field which will be used to define whether + // the channel will allow CMAF ingest or HLS ingest. If unprovided, it will + // default to HLS to preserve current behavior. + // + // The allowed values are: + // + // * HLS - The HLS streaming specification (which defines M3U8 manifests + // and TS segments). + // + // * CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments + // with optional DASH manifests). + InputType *string `type:"string" enum:"InputType"` + // The date and time the channel was modified. // // ModifiedAt is a required field @@ -8413,6 +8581,12 @@ func (s *UpdateChannelOutput) SetIngestEndpoints(v []*IngestEndpoint) *UpdateCha return s } +// SetInputType sets the InputType field's value. +func (s *UpdateChannelOutput) SetInputType(v string) *UpdateChannelOutput { + s.InputType = &v + return s +} + // SetModifiedAt sets the ModifiedAt field's value. func (s *UpdateChannelOutput) SetModifiedAt(v time.Time) *UpdateChannelOutput { s.ModifiedAt = &v @@ -8460,6 +8634,9 @@ type UpdateOriginEndpointInput struct { // will be rejected. ETag *string `location:"header" locationName:"x-amzn-update-if-match" min:"1" type:"string"` + // The failover settings for the endpoint. + ForceEndpointErrorConfiguration *ForceEndpointErrorConfiguration `type:"structure"` + // An HTTP live streaming (HLS) manifest configuration. HlsManifests []*CreateHlsManifestConfiguration `type:"list"` @@ -8610,6 +8787,12 @@ func (s *UpdateOriginEndpointInput) SetETag(v string) *UpdateOriginEndpointInput return s } +// SetForceEndpointErrorConfiguration sets the ForceEndpointErrorConfiguration field's value. +func (s *UpdateOriginEndpointInput) SetForceEndpointErrorConfiguration(v *ForceEndpointErrorConfiguration) *UpdateOriginEndpointInput { + s.ForceEndpointErrorConfiguration = v + return s +} + // SetHlsManifests sets the HlsManifests field's value. func (s *UpdateOriginEndpointInput) SetHlsManifests(v []*CreateHlsManifestConfiguration) *UpdateOriginEndpointInput { s.HlsManifests = v @@ -8681,6 +8864,9 @@ type UpdateOriginEndpointOutput struct { // can be used to safely make concurrent updates to the resource. ETag *string `min:"1" type:"string"` + // The failover settings for the endpoint. + ForceEndpointErrorConfiguration *ForceEndpointErrorConfiguration `type:"structure"` + // An HTTP live streaming (HLS) manifest configuration. HlsManifests []*GetHlsManifestConfiguration `type:"list"` @@ -8780,6 +8966,12 @@ func (s *UpdateOriginEndpointOutput) SetETag(v string) *UpdateOriginEndpointOutp return s } +// SetForceEndpointErrorConfiguration sets the ForceEndpointErrorConfiguration field's value. +func (s *UpdateOriginEndpointOutput) SetForceEndpointErrorConfiguration(v *ForceEndpointErrorConfiguration) *UpdateOriginEndpointOutput { + s.ForceEndpointErrorConfiguration = v + return s +} + // SetHlsManifests sets the HlsManifests field's value. func (s *UpdateOriginEndpointOutput) SetHlsManifests(v []*GetHlsManifestConfiguration) *UpdateOriginEndpointOutput { s.HlsManifests = v @@ -9077,6 +9269,46 @@ func DrmSystem_Values() []string { } } +const ( + // EndpointErrorConditionStaleManifest is a EndpointErrorCondition enum value + EndpointErrorConditionStaleManifest = "STALE_MANIFEST" + + // EndpointErrorConditionIncompleteManifest is a EndpointErrorCondition enum value + EndpointErrorConditionIncompleteManifest = "INCOMPLETE_MANIFEST" + + // EndpointErrorConditionMissingDrmKey is a EndpointErrorCondition enum value + EndpointErrorConditionMissingDrmKey = "MISSING_DRM_KEY" + + // EndpointErrorConditionSlateInput is a EndpointErrorCondition enum value + EndpointErrorConditionSlateInput = "SLATE_INPUT" +) + +// EndpointErrorCondition_Values returns all elements of the EndpointErrorCondition enum +func EndpointErrorCondition_Values() []string { + return []string{ + EndpointErrorConditionStaleManifest, + EndpointErrorConditionIncompleteManifest, + EndpointErrorConditionMissingDrmKey, + EndpointErrorConditionSlateInput, + } +} + +const ( + // InputTypeHls is a InputType enum value + InputTypeHls = "HLS" + + // InputTypeCmaf is a InputType enum value + InputTypeCmaf = "CMAF" +) + +// InputType_Values returns all elements of the InputType enum +func InputType_Values() []string { + return []string{ + InputTypeHls, + InputTypeCmaf, + } +} + const ( // PresetSpeke20AudioPresetAudio1 is a PresetSpeke20Audio enum value PresetSpeke20AudioPresetAudio1 = "PRESET_AUDIO_1" @@ -9368,6 +9600,12 @@ const ( // ValidationExceptionTypeDrmSignalingMismatchSegmentEncryptionStatus is a ValidationExceptionType enum value ValidationExceptionTypeDrmSignalingMismatchSegmentEncryptionStatus = "DRM_SIGNALING_MISMATCH_SEGMENT_ENCRYPTION_STATUS" + + // ValidationExceptionTypeOnlyCmafInputTypeAllowForceEndpointErrorConfiguration is a ValidationExceptionType enum value + ValidationExceptionTypeOnlyCmafInputTypeAllowForceEndpointErrorConfiguration = "ONLY_CMAF_INPUT_TYPE_ALLOW_FORCE_ENDPOINT_ERROR_CONFIGURATION" + + // ValidationExceptionTypeSourceDisruptionsEnabledIncorrectly is a ValidationExceptionType enum value + ValidationExceptionTypeSourceDisruptionsEnabledIncorrectly = "SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY" ) // ValidationExceptionType_Values returns all elements of the ValidationExceptionType enum @@ -9418,5 +9656,7 @@ func ValidationExceptionType_Values() []string { ValidationExceptionTypeUpdatePeriodSmallerThanSegmentDuration, ValidationExceptionTypePeriodTriggersNoneSpecifiedWithAdditionalValues, ValidationExceptionTypeDrmSignalingMismatchSegmentEncryptionStatus, + ValidationExceptionTypeOnlyCmafInputTypeAllowForceEndpointErrorConfiguration, + ValidationExceptionTypeSourceDisruptionsEnabledIncorrectly, } } diff --git a/service/mediapackagev2/examples_test.go b/service/mediapackagev2/examples_test.go new file mode 100644 index 00000000000..b8e851e89c6 --- /dev/null +++ b/service/mediapackagev2/examples_test.go @@ -0,0 +1,1285 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediapackagev2_test + +import ( + "fmt" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/mediapackagev2" +) + +var _ time.Duration +var _ strings.Reader +var _ aws.Config + +func parseTime(layout, value string) *time.Time { + t, err := time.Parse(layout, value) + if err != nil { + panic(err) + } + return &t +} + +// Creating a Channel +// + +func ExampleMediaPackageV2_CreateChannel_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.CreateChannelInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + Description: aws.String("Description for exampleChannel"), + InputType: aws.String("HLS"), + Tags: map[string]*string{ + "key1": aws.String("value1"), + "key2": aws.String("value2"), + }, + } + + result, err := svc.CreateChannel(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + case mediapackagev2.ErrCodeServiceQuotaExceededException: + fmt.Println(mediapackagev2.ErrCodeServiceQuotaExceededException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Creating a Channel Group +// + +func ExampleMediaPackageV2_CreateChannelGroup_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.CreateChannelGroupInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + Description: aws.String("Description for exampleChannelGroup"), + Tags: map[string]*string{ + "key1": aws.String("value1"), + "key2": aws.String("value2"), + }, + } + + result, err := svc.CreateChannelGroup(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + case mediapackagev2.ErrCodeServiceQuotaExceededException: + fmt.Println(mediapackagev2.ErrCodeServiceQuotaExceededException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Creating an OriginEndpoint with container type TS, and encryption enabled +// + +func ExampleMediaPackageV2_CreateOriginEndpoint_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.CreateOriginEndpointInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + ContainerType: aws.String("TS"), + Description: aws.String("Description for exampleOriginEndpointTS"), + ForceEndpointErrorConfiguration: &mediapackagev2.ForceEndpointErrorConfiguration{ + EndpointErrorConditions: []*string{ + aws.String("STALE_MANIFEST"), + aws.String("INCOMPLETE_MANIFEST"), + aws.String("MISSING_DRM_KEY"), + aws.String("SLATE_INPUT"), + }, + }, + HlsManifests: []*mediapackagev2.CreateHlsManifestConfiguration{ + { + ChildManifestName: aws.String("exampleChildManifest1"), + ManifestName: aws.String("exampleManifest1"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + { + ChildManifestName: aws.String("exampleManifest2"), + ManifestName: aws.String("exampleManifest2"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + }, + LowLatencyHlsManifests: []*mediapackagev2.CreateLowLatencyHlsManifestConfiguration{ + { + ChildManifestName: aws.String("exampleLLChildManifest1"), + ManifestName: aws.String("exampleLLManifest1"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + { + ChildManifestName: aws.String("exampleLLManifest2"), + ManifestName: aws.String("exampleLLManifest2"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + }, + OriginEndpointName: aws.String("exampleOriginEndpointTS"), + Segment: &mediapackagev2.Segment{ + Encryption: &mediapackagev2.Encryption{ + ConstantInitializationVector: aws.String("A382A901F3C1F7718512266CFFBB0B7E"), + EncryptionMethod: &mediapackagev2.EncryptionMethod{ + TsEncryptionMethod: aws.String("AES_128"), + }, + KeyRotationIntervalSeconds: aws.Int64(300), + SpekeKeyProvider: &mediapackagev2.SpekeKeyProvider{ + DrmSystems: []*string{ + aws.String("CLEAR_KEY_AES_128"), + }, + EncryptionContractConfiguration: &mediapackagev2.EncryptionContractConfiguration{ + PresetSpeke20Audio: aws.String("SHARED"), + PresetSpeke20Video: aws.String("SHARED"), + }, + ResourceId: aws.String("ResourceId"), + RoleArn: aws.String("arn:aws:iam::123456789012:role/empRole"), + Url: aws.String("https://foo.com"), + }, + }, + IncludeIframeOnlyStreams: aws.Bool(true), + Scte: &mediapackagev2.Scte{ + ScteFilter: []*string{ + aws.String("SPLICE_INSERT"), + aws.String("BREAK"), + }, + }, + SegmentDurationSeconds: aws.Int64(6), + SegmentName: aws.String("segmentName"), + TsIncludeDvbSubtitles: aws.Bool(true), + TsUseAudioRenditionGroup: aws.Bool(true), + }, + StartoverWindowSeconds: aws.Int64(300), + Tags: map[string]*string{ + "key1": aws.String("value1"), + "key2": aws.String("value2"), + }, + } + + result, err := svc.CreateOriginEndpoint(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + case mediapackagev2.ErrCodeServiceQuotaExceededException: + fmt.Println(mediapackagev2.ErrCodeServiceQuotaExceededException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Creating an OriginEndpoint with container type CMAF, and encryption enabled +// + +func ExampleMediaPackageV2_CreateOriginEndpoint_shared01() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.CreateOriginEndpointInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + ContainerType: aws.String("CMAF"), + DashManifests: []*mediapackagev2.CreateDashManifestConfiguration{ + { + DrmSignaling: aws.String("INDIVIDUAL"), + ManifestName: aws.String("exampleDashManifest1"), + ManifestWindowSeconds: aws.Int64(300), + MinBufferTimeSeconds: aws.Int64(30), + MinUpdatePeriodSeconds: aws.Int64(5), + PeriodTriggers: []*string{ + aws.String("AVAILS"), + }, + ScteDash: &mediapackagev2.ScteDash{ + AdMarkerDash: aws.String("XML"), + }, + SegmentTemplateFormat: aws.String("NUMBER_WITH_TIMELINE"), + SuggestedPresentationDelaySeconds: aws.Int64(2), + }, + { + DrmSignaling: aws.String("INDIVIDUAL"), + ManifestName: aws.String("exampleDashManifest2"), + ManifestWindowSeconds: aws.Int64(60), + MinBufferTimeSeconds: aws.Int64(9), + MinUpdatePeriodSeconds: aws.Int64(3), + PeriodTriggers: []*string{ + aws.String("AVAILS"), + aws.String("DRM_KEY_ROTATION"), + aws.String("SOURCE_CHANGES"), + aws.String("SOURCE_DISRUPTIONS"), + }, + ScteDash: &mediapackagev2.ScteDash{ + AdMarkerDash: aws.String("XML"), + }, + SegmentTemplateFormat: aws.String("NUMBER_WITH_TIMELINE"), + SuggestedPresentationDelaySeconds: aws.Int64(12), + }, + }, + ForceEndpointErrorConfiguration: &mediapackagev2.ForceEndpointErrorConfiguration{ + EndpointErrorConditions: []*string{ + aws.String("STALE_MANIFEST"), + aws.String("INCOMPLETE_MANIFEST"), + aws.String("MISSING_DRM_KEY"), + aws.String("SLATE_INPUT"), + }, + }, + HlsManifests: []*mediapackagev2.CreateHlsManifestConfiguration{ + { + ChildManifestName: aws.String("exampleChildManifest1"), + ManifestName: aws.String("exampleManifest1"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + { + ChildManifestName: aws.String("exampleManifest2"), + ManifestName: aws.String("exampleManifest2"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + }, + LowLatencyHlsManifests: []*mediapackagev2.CreateLowLatencyHlsManifestConfiguration{ + { + ChildManifestName: aws.String("exampleLLChildManifest1"), + ManifestName: aws.String("exampleLLManifest1"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + { + ChildManifestName: aws.String("exampleLLManifest2"), + ManifestName: aws.String("exampleLLManifest2"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + }, + OriginEndpointName: aws.String("exampleOriginEndpointCMAF"), + Segment: &mediapackagev2.Segment{ + Encryption: &mediapackagev2.Encryption{ + ConstantInitializationVector: aws.String("A382A901F3C1F7718512266CFFBB0B9F"), + EncryptionMethod: &mediapackagev2.EncryptionMethod{ + CmafEncryptionMethod: aws.String("CBCS"), + }, + KeyRotationIntervalSeconds: aws.Int64(300), + SpekeKeyProvider: &mediapackagev2.SpekeKeyProvider{ + DrmSystems: []*string{ + aws.String("PLAYREADY"), + aws.String("WIDEVINE"), + }, + EncryptionContractConfiguration: &mediapackagev2.EncryptionContractConfiguration{ + PresetSpeke20Audio: aws.String("PRESET_AUDIO_1"), + PresetSpeke20Video: aws.String("PRESET_VIDEO_1"), + }, + ResourceId: aws.String("ResourceId"), + RoleArn: aws.String("arn:aws:iam::123456789012:role/empRole"), + Url: aws.String("https://foo.com"), + }, + }, + IncludeIframeOnlyStreams: aws.Bool(true), + Scte: &mediapackagev2.Scte{ + ScteFilter: []*string{ + aws.String("SPLICE_INSERT"), + aws.String("BREAK"), + }, + }, + SegmentDurationSeconds: aws.Int64(6), + SegmentName: aws.String("segmentName"), + }, + StartoverWindowSeconds: aws.Int64(300), + Tags: map[string]*string{ + "key1": aws.String("value1"), + "key2": aws.String("value2"), + }, + } + + result, err := svc.CreateOriginEndpoint(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + case mediapackagev2.ErrCodeServiceQuotaExceededException: + fmt.Println(mediapackagev2.ErrCodeServiceQuotaExceededException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Deleting a Channel +// + +func ExampleMediaPackageV2_DeleteChannel_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.DeleteChannelInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + } + + result, err := svc.DeleteChannel(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Deleting a Channel Group +// + +func ExampleMediaPackageV2_DeleteChannelGroup_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.DeleteChannelGroupInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + } + + result, err := svc.DeleteChannelGroup(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Deleting a Channel Policy +// + +func ExampleMediaPackageV2_DeleteChannelPolicy_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.DeleteChannelPolicyInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + } + + result, err := svc.DeleteChannelPolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Deleting an OriginEndpoint +// + +func ExampleMediaPackageV2_DeleteOriginEndpoint_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.DeleteOriginEndpointInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + OriginEndpointName: aws.String("exampleOriginEndpointTS"), + } + + result, err := svc.DeleteOriginEndpoint(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Deleting an Origin Endpoint Policy +// + +func ExampleMediaPackageV2_DeleteOriginEndpointPolicy_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.DeleteOriginEndpointPolicyInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + OriginEndpointName: aws.String("exampleOriginEndpoint"), + } + + result, err := svc.DeleteOriginEndpointPolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Getting a Channel +// + +func ExampleMediaPackageV2_GetChannel_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.GetChannelInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + } + + result, err := svc.GetChannel(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Getting a Channel Group +// + +func ExampleMediaPackageV2_GetChannelGroup_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.GetChannelGroupInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + } + + result, err := svc.GetChannelGroup(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Getting a Channel Policy +// + +func ExampleMediaPackageV2_GetChannelPolicy_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.GetChannelPolicyInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + } + + result, err := svc.GetChannelPolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Getting an OriginEndpoint +// + +func ExampleMediaPackageV2_GetOriginEndpoint_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.GetOriginEndpointInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + OriginEndpointName: aws.String("exampleOriginEndpointTS"), + } + + result, err := svc.GetOriginEndpoint(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Getting an Origin Endpoint Policy +// + +func ExampleMediaPackageV2_GetOriginEndpointPolicy_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.GetOriginEndpointPolicyInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + OriginEndpointName: aws.String("exampleOriginEndpoint"), + } + + result, err := svc.GetOriginEndpointPolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Listing all Channel Groups +// + +func ExampleMediaPackageV2_ListChannelGroups_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.ListChannelGroupsInput{} + + result, err := svc.ListChannelGroups(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Listing all Channels +// + +func ExampleMediaPackageV2_ListChannels_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.ListChannelsInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + } + + result, err := svc.ListChannels(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Listing all OriginEndpoints +// + +func ExampleMediaPackageV2_ListOriginEndpoints_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.ListOriginEndpointsInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + } + + result, err := svc.ListOriginEndpoints(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// List all tags for a resource +// + +func ExampleMediaPackageV2_ListTagsForResource_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.ListTagsForResourceInput{ + ResourceArn: aws.String("arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel"), + } + + result, err := svc.ListTagsForResource(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Creating a Channel Policy +// + +func ExampleMediaPackageV2_PutChannelPolicy_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.PutChannelPolicyInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + Policy: aws.String("{...}"), + } + + result, err := svc.PutChannelPolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Creating an Origin Endpoint Policy +// + +func ExampleMediaPackageV2_PutOriginEndpointPolicy_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.PutOriginEndpointPolicyInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + OriginEndpointName: aws.String("exampleOriginEndpoint"), + Policy: aws.String("{...}"), + } + + result, err := svc.PutOriginEndpointPolicy(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Add tags to a resource +// + +func ExampleMediaPackageV2_TagResource_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.TagResourceInput{ + ResourceArn: aws.String("arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel"), + Tags: map[string]*string{ + "key3": aws.String("value3"), + "key4": aws.String("value4"), + }, + } + + result, err := svc.TagResource(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Remove tags from a resource +// + +func ExampleMediaPackageV2_UntagResource_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.UntagResourceInput{ + ResourceArn: aws.String("arn:aws:mediapackagev2:us-west-2:123456789012:channelGroup/exampleChannelGroup/channel/exampleChannel"), + TagKeys: []*string{ + aws.String("key3"), + aws.String("key4"), + }, + } + + result, err := svc.UntagResource(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Updating a Channel +// + +func ExampleMediaPackageV2_UpdateChannel_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.UpdateChannelInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + Description: aws.String("Updated description for exampleChannel"), + } + + result, err := svc.UpdateChannel(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Updating a Channel Group +// + +func ExampleMediaPackageV2_UpdateChannelGroup_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.UpdateChannelGroupInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + Description: aws.String("Updated description for exampleChannelGroup"), + } + + result, err := svc.UpdateChannelGroup(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// Updating an OriginEndpoint +// + +func ExampleMediaPackageV2_UpdateOriginEndpoint_shared00() { + svc := mediapackagev2.New(session.New()) + input := &mediapackagev2.UpdateOriginEndpointInput{ + ChannelGroupName: aws.String("exampleChannelGroup"), + ChannelName: aws.String("exampleChannel"), + ContainerType: aws.String("TS"), + Description: aws.String("Updated description for exampleOriginEndpointTS"), + ForceEndpointErrorConfiguration: &mediapackagev2.ForceEndpointErrorConfiguration{ + EndpointErrorConditions: []*string{ + aws.String("STALE_MANIFEST"), + aws.String("INCOMPLETE_MANIFEST"), + aws.String("MISSING_DRM_KEY"), + aws.String("SLATE_INPUT"), + }, + }, + HlsManifests: []*mediapackagev2.CreateHlsManifestConfiguration{ + { + ChildManifestName: aws.String("exampleChildManifest1"), + ManifestName: aws.String("exampleManifest1"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + { + ChildManifestName: aws.String("exampleManifest2"), + ManifestName: aws.String("exampleManifest2"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + }, + LowLatencyHlsManifests: []*mediapackagev2.CreateLowLatencyHlsManifestConfiguration{ + { + ChildManifestName: aws.String("exampleLLChildManifest1"), + ManifestName: aws.String("exampleLLManifest1"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + { + ChildManifestName: aws.String("exampleLLManifest2"), + ManifestName: aws.String("exampleLLManifest2"), + ManifestWindowSeconds: aws.Int64(30), + ProgramDateTimeIntervalSeconds: aws.Int64(60), + ScteHls: &mediapackagev2.ScteHls{ + AdMarkerHls: aws.String("DATERANGE"), + }, + }, + }, + OriginEndpointName: aws.String("exampleOriginEndpointTS"), + Segment: &mediapackagev2.Segment{ + Encryption: &mediapackagev2.Encryption{ + ConstantInitializationVector: aws.String("A382A901F3C1F7718512266CFFBB0B7E"), + EncryptionMethod: &mediapackagev2.EncryptionMethod{ + TsEncryptionMethod: aws.String("AES_128"), + }, + KeyRotationIntervalSeconds: aws.Int64(300), + SpekeKeyProvider: &mediapackagev2.SpekeKeyProvider{ + DrmSystems: []*string{ + aws.String("CLEAR_KEY_AES_128"), + }, + EncryptionContractConfiguration: &mediapackagev2.EncryptionContractConfiguration{ + PresetSpeke20Audio: aws.String("SHARED"), + PresetSpeke20Video: aws.String("SHARED"), + }, + ResourceId: aws.String("ResourceId"), + RoleArn: aws.String("arn:aws:iam::123456789012:role/empRole"), + Url: aws.String("https://foo.com"), + }, + }, + IncludeIframeOnlyStreams: aws.Bool(false), + Scte: &mediapackagev2.Scte{ + ScteFilter: []*string{ + aws.String("SPLICE_INSERT"), + }, + }, + SegmentDurationSeconds: aws.Int64(7), + SegmentName: aws.String("segmentName2"), + TsIncludeDvbSubtitles: aws.Bool(false), + TsUseAudioRenditionGroup: aws.Bool(true), + }, + StartoverWindowSeconds: aws.Int64(600), + } + + result, err := svc.UpdateOriginEndpoint(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case mediapackagev2.ErrCodeThrottlingException: + fmt.Println(mediapackagev2.ErrCodeThrottlingException, aerr.Error()) + case mediapackagev2.ErrCodeConflictException: + fmt.Println(mediapackagev2.ErrCodeConflictException, aerr.Error()) + case mediapackagev2.ErrCodeInternalServerException: + fmt.Println(mediapackagev2.ErrCodeInternalServerException, aerr.Error()) + case mediapackagev2.ErrCodeAccessDeniedException: + fmt.Println(mediapackagev2.ErrCodeAccessDeniedException, aerr.Error()) + case mediapackagev2.ErrCodeValidationException: + fmt.Println(mediapackagev2.ErrCodeValidationException, aerr.Error()) + case mediapackagev2.ErrCodeResourceNotFoundException: + fmt.Println(mediapackagev2.ErrCodeResourceNotFoundException, aerr.Error()) + case mediapackagev2.ErrCodeServiceQuotaExceededException: + fmt.Println(mediapackagev2.ErrCodeServiceQuotaExceededException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +}