@aws-sdk/client-kms 3.288.0 → 3.289.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-types/commands/CancelKeyDeletionCommand.d.ts +16 -0
- package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +11 -0
- package/dist-types/commands/CreateAliasCommand.d.ts +12 -0
- package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +68 -0
- package/dist-types/commands/CreateGrantCommand.d.ts +22 -0
- package/dist-types/commands/CreateKeyCommand.d.ts +283 -0
- package/dist-types/commands/DecryptCommand.d.ts +18 -0
- package/dist-types/commands/DeleteAliasCommand.d.ts +11 -0
- package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +11 -0
- package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +11 -0
- package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +101 -0
- package/dist-types/commands/DescribeKeyCommand.d.ts +228 -0
- package/dist-types/commands/DisableKeyCommand.d.ts +11 -0
- package/dist-types/commands/DisableKeyRotationCommand.d.ts +11 -0
- package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +11 -0
- package/dist-types/commands/EnableKeyCommand.d.ts +11 -0
- package/dist-types/commands/EnableKeyRotationCommand.d.ts +11 -0
- package/dist-types/commands/EncryptCommand.d.ts +18 -0
- package/dist-types/commands/GenerateDataKeyCommand.d.ts +19 -0
- package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +21 -0
- package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +20 -0
- package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +18 -0
- package/dist-types/commands/GenerateMacCommand.d.ts +20 -0
- package/dist-types/commands/GenerateRandomCommand.d.ts +16 -0
- package/dist-types/commands/GetKeyPolicyCommand.d.ts +17 -0
- package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +16 -0
- package/dist-types/commands/GetParametersForImportCommand.d.ts +21 -0
- package/dist-types/commands/GetPublicKeyCommand.d.ts +23 -0
- package/dist-types/commands/ImportKeyMaterialCommand.d.ts +14 -0
- package/dist-types/commands/ListAliasesCommand.d.ts +56 -0
- package/dist-types/commands/ListGrantsCommand.d.ts +69 -0
- package/dist-types/commands/ListKeyPoliciesCommand.d.ts +19 -0
- package/dist-types/commands/ListKeysCommand.d.ts +44 -0
- package/dist-types/commands/ListResourceTagsCommand.d.ts +30 -0
- package/dist-types/commands/ListRetirableGrantsCommand.d.ts +30 -0
- package/dist-types/commands/PutKeyPolicyCommand.d.ts +13 -0
- package/dist-types/commands/ReEncryptCommand.d.ts +19 -0
- package/dist-types/commands/ReplicateKeyCommand.d.ts +48 -0
- package/dist-types/commands/RetireGrantCommand.d.ts +12 -0
- package/dist-types/commands/RevokeGrantCommand.d.ts +12 -0
- package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +18 -0
- package/dist-types/commands/SignCommand.d.ts +42 -0
- package/dist-types/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +15 -0
- package/dist-types/commands/UpdateAliasCommand.d.ts +12 -0
- package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +77 -0
- package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +12 -0
- package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +16 -0
- package/dist-types/commands/VerifyCommand.d.ts +44 -0
- package/dist-types/commands/VerifyMacCommand.d.ts +21 -0
- package/package.json +29 -29
|
@@ -69,6 +69,62 @@ export interface ListAliasesCommandOutput extends ListAliasesResponse, __Metadat
|
|
|
69
69
|
* @see {@link ListAliasesCommandOutput} for command's `response` shape.
|
|
70
70
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
71
71
|
*
|
|
72
|
+
* @example To list aliases
|
|
73
|
+
* ```javascript
|
|
74
|
+
* // The following example lists aliases.
|
|
75
|
+
* const input = undefined;
|
|
76
|
+
* const command = new ListAliasesCommand(input);
|
|
77
|
+
* const response = await client.send(command);
|
|
78
|
+
* /* response ==
|
|
79
|
+
* {
|
|
80
|
+
* "Aliases": [
|
|
81
|
+
* {
|
|
82
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/acm",
|
|
83
|
+
* "AliasName": "alias/aws/acm",
|
|
84
|
+
* "TargetKeyId": "da03f6f7-d279-427a-9cae-de48d07e5b66"
|
|
85
|
+
* },
|
|
86
|
+
* {
|
|
87
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/ebs",
|
|
88
|
+
* "AliasName": "alias/aws/ebs",
|
|
89
|
+
* "TargetKeyId": "25a217e7-7170-4b8c-8bf6-045ea5f70e5b"
|
|
90
|
+
* },
|
|
91
|
+
* {
|
|
92
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/rds",
|
|
93
|
+
* "AliasName": "alias/aws/rds",
|
|
94
|
+
* "TargetKeyId": "7ec3104e-c3f2-4b5c-bf42-bfc4772c6685"
|
|
95
|
+
* },
|
|
96
|
+
* {
|
|
97
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/redshift",
|
|
98
|
+
* "AliasName": "alias/aws/redshift",
|
|
99
|
+
* "TargetKeyId": "08f7a25a-69e2-4fb5-8f10-393db27326fa"
|
|
100
|
+
* },
|
|
101
|
+
* {
|
|
102
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/s3",
|
|
103
|
+
* "AliasName": "alias/aws/s3",
|
|
104
|
+
* "TargetKeyId": "d2b0f1a3-580d-4f79-b836-bc983be8cfa5"
|
|
105
|
+
* },
|
|
106
|
+
* {
|
|
107
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example1",
|
|
108
|
+
* "AliasName": "alias/example1",
|
|
109
|
+
* "TargetKeyId": "4da1e216-62d0-46c5-a7c0-5f3a3d2f8046"
|
|
110
|
+
* },
|
|
111
|
+
* {
|
|
112
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example2",
|
|
113
|
+
* "AliasName": "alias/example2",
|
|
114
|
+
* "TargetKeyId": "f32fef59-2cc2-445b-8573-2d73328acbee"
|
|
115
|
+
* },
|
|
116
|
+
* {
|
|
117
|
+
* "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example3",
|
|
118
|
+
* "AliasName": "alias/example3",
|
|
119
|
+
* "TargetKeyId": "1374ef38-d34e-4d5f-b2c9-4e0daee38855"
|
|
120
|
+
* }
|
|
121
|
+
* ],
|
|
122
|
+
* "Truncated": false
|
|
123
|
+
* }
|
|
124
|
+
* *\/
|
|
125
|
+
* // example id: to-list-aliases-1480729693349
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
72
128
|
*/
|
|
73
129
|
export declare class ListAliasesCommand extends $Command<ListAliasesCommandInput, ListAliasesCommandOutput, KMSClientResolvedConfig> {
|
|
74
130
|
readonly input: ListAliasesCommandInput;
|
|
@@ -73,6 +73,75 @@ export interface ListGrantsCommandOutput extends ListGrantsResponse, __MetadataB
|
|
|
73
73
|
* @see {@link ListGrantsCommandOutput} for command's `response` shape.
|
|
74
74
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
75
75
|
*
|
|
76
|
+
* @example To list grants for a KMS key
|
|
77
|
+
* ```javascript
|
|
78
|
+
* // The following example lists grants for the specified KMS key.
|
|
79
|
+
* const input = {
|
|
80
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
81
|
+
* };
|
|
82
|
+
* const command = new ListGrantsCommand(input);
|
|
83
|
+
* const response = await client.send(command);
|
|
84
|
+
* /* response ==
|
|
85
|
+
* {
|
|
86
|
+
* "Grants": [
|
|
87
|
+
* {
|
|
88
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
89
|
+
* "GrantId": "91ad875e49b04a9d1f3bdeb84d821f9db6ea95e1098813f6d47f0c65fbe2a172",
|
|
90
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
91
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
92
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
93
|
+
* "Operations": [
|
|
94
|
+
* "Encrypt",
|
|
95
|
+
* "ReEncryptFrom",
|
|
96
|
+
* "ReEncryptTo"
|
|
97
|
+
* ],
|
|
98
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
99
|
+
* },
|
|
100
|
+
* {
|
|
101
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
102
|
+
* "GrantId": "a5d67d3e207a8fc1f4928749ee3e52eb0440493a8b9cf05bbfad91655b056200",
|
|
103
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
104
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
105
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
106
|
+
* "Operations": [
|
|
107
|
+
* "ReEncryptFrom",
|
|
108
|
+
* "ReEncryptTo"
|
|
109
|
+
* ],
|
|
110
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
111
|
+
* },
|
|
112
|
+
* {
|
|
113
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
114
|
+
* "GrantId": "c541aaf05d90cb78846a73b346fc43e65be28b7163129488c738e0c9e0628f4f",
|
|
115
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
116
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
117
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
118
|
+
* "Operations": [
|
|
119
|
+
* "Encrypt",
|
|
120
|
+
* "ReEncryptFrom",
|
|
121
|
+
* "ReEncryptTo"
|
|
122
|
+
* ],
|
|
123
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
124
|
+
* },
|
|
125
|
+
* {
|
|
126
|
+
* "CreationDate": "2016-10-25T14:37:41-07:00",
|
|
127
|
+
* "GrantId": "dd2052c67b4c76ee45caf1dc6a1e2d24e8dc744a51b36ae2f067dc540ce0105c",
|
|
128
|
+
* "GranteePrincipal": "acm.us-east-2.amazonaws.com",
|
|
129
|
+
* "IssuingAccount": "arn:aws:iam::111122223333:root",
|
|
130
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
131
|
+
* "Operations": [
|
|
132
|
+
* "Encrypt",
|
|
133
|
+
* "ReEncryptFrom",
|
|
134
|
+
* "ReEncryptTo"
|
|
135
|
+
* ],
|
|
136
|
+
* "RetiringPrincipal": "acm.us-east-2.amazonaws.com"
|
|
137
|
+
* }
|
|
138
|
+
* ],
|
|
139
|
+
* "Truncated": true
|
|
140
|
+
* }
|
|
141
|
+
* *\/
|
|
142
|
+
* // example id: to-list-grants-for-a-cmk-1481067365389
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
76
145
|
*/
|
|
77
146
|
export declare class ListGrantsCommand extends $Command<ListGrantsCommandInput, ListGrantsCommandOutput, KMSClientResolvedConfig> {
|
|
78
147
|
readonly input: ListGrantsCommandInput;
|
|
@@ -50,6 +50,25 @@ export interface ListKeyPoliciesCommandOutput extends ListKeyPoliciesResponse, _
|
|
|
50
50
|
* @see {@link ListKeyPoliciesCommandOutput} for command's `response` shape.
|
|
51
51
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
52
52
|
*
|
|
53
|
+
* @example To list key policies for a KMS key
|
|
54
|
+
* ```javascript
|
|
55
|
+
* // The following example lists key policies for the specified KMS key.
|
|
56
|
+
* const input = {
|
|
57
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
58
|
+
* };
|
|
59
|
+
* const command = new ListKeyPoliciesCommand(input);
|
|
60
|
+
* const response = await client.send(command);
|
|
61
|
+
* /* response ==
|
|
62
|
+
* {
|
|
63
|
+
* "PolicyNames": [
|
|
64
|
+
* "default"
|
|
65
|
+
* ],
|
|
66
|
+
* "Truncated": false
|
|
67
|
+
* }
|
|
68
|
+
* *\/
|
|
69
|
+
* // example id: to-list-key-policies-for-a-cmk-1481069780998
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
53
72
|
*/
|
|
54
73
|
export declare class ListKeyPoliciesCommand extends $Command<ListKeyPoliciesCommandInput, ListKeyPoliciesCommandOutput, KMSClientResolvedConfig> {
|
|
55
74
|
readonly input: ListKeyPoliciesCommandInput;
|
|
@@ -58,6 +58,50 @@ export interface ListKeysCommandOutput extends ListKeysResponse, __MetadataBeare
|
|
|
58
58
|
* @see {@link ListKeysCommandOutput} for command's `response` shape.
|
|
59
59
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
60
60
|
*
|
|
61
|
+
* @example To list KMS keys
|
|
62
|
+
* ```javascript
|
|
63
|
+
* // The following example lists KMS keys.
|
|
64
|
+
* const input = undefined;
|
|
65
|
+
* const command = new ListKeysCommand(input);
|
|
66
|
+
* const response = await client.send(command);
|
|
67
|
+
* /* response ==
|
|
68
|
+
* {
|
|
69
|
+
* "Keys": [
|
|
70
|
+
* {
|
|
71
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/0d990263-018e-4e65-a703-eff731de951e",
|
|
72
|
+
* "KeyId": "0d990263-018e-4e65-a703-eff731de951e"
|
|
73
|
+
* },
|
|
74
|
+
* {
|
|
75
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/144be297-0ae1-44ac-9c8f-93cd8c82f841",
|
|
76
|
+
* "KeyId": "144be297-0ae1-44ac-9c8f-93cd8c82f841"
|
|
77
|
+
* },
|
|
78
|
+
* {
|
|
79
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/21184251-b765-428e-b852-2c7353e72571",
|
|
80
|
+
* "KeyId": "21184251-b765-428e-b852-2c7353e72571"
|
|
81
|
+
* },
|
|
82
|
+
* {
|
|
83
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/214fe92f-5b03-4ae1-b350-db2a45dbe10c",
|
|
84
|
+
* "KeyId": "214fe92f-5b03-4ae1-b350-db2a45dbe10c"
|
|
85
|
+
* },
|
|
86
|
+
* {
|
|
87
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/339963f2-e523-49d3-af24-a0fe752aa458",
|
|
88
|
+
* "KeyId": "339963f2-e523-49d3-af24-a0fe752aa458"
|
|
89
|
+
* },
|
|
90
|
+
* {
|
|
91
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/b776a44b-df37-4438-9be4-a27494e4271a",
|
|
92
|
+
* "KeyId": "b776a44b-df37-4438-9be4-a27494e4271a"
|
|
93
|
+
* },
|
|
94
|
+
* {
|
|
95
|
+
* "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/deaf6c9e-cf2c-46a6-bf6d-0b6d487cffbb",
|
|
96
|
+
* "KeyId": "deaf6c9e-cf2c-46a6-bf6d-0b6d487cffbb"
|
|
97
|
+
* }
|
|
98
|
+
* ],
|
|
99
|
+
* "Truncated": false
|
|
100
|
+
* }
|
|
101
|
+
* *\/
|
|
102
|
+
* // example id: to-list-cmks-1481071643069
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
61
105
|
*/
|
|
62
106
|
export declare class ListKeysCommand extends $Command<ListKeysCommandInput, ListKeysCommandOutput, KMSClientResolvedConfig> {
|
|
63
107
|
readonly input: ListKeysCommandInput;
|
|
@@ -62,6 +62,36 @@ export interface ListResourceTagsCommandOutput extends ListResourceTagsResponse,
|
|
|
62
62
|
* @see {@link ListResourceTagsCommandOutput} for command's `response` shape.
|
|
63
63
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
64
64
|
*
|
|
65
|
+
* @example To list tags for a KMS key
|
|
66
|
+
* ```javascript
|
|
67
|
+
* // The following example lists tags for a KMS key.
|
|
68
|
+
* const input = {
|
|
69
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
70
|
+
* };
|
|
71
|
+
* const command = new ListResourceTagsCommand(input);
|
|
72
|
+
* const response = await client.send(command);
|
|
73
|
+
* /* response ==
|
|
74
|
+
* {
|
|
75
|
+
* "Tags": [
|
|
76
|
+
* {
|
|
77
|
+
* "TagKey": "CostCenter",
|
|
78
|
+
* "TagValue": "87654"
|
|
79
|
+
* },
|
|
80
|
+
* {
|
|
81
|
+
* "TagKey": "CreatedBy",
|
|
82
|
+
* "TagValue": "ExampleUser"
|
|
83
|
+
* },
|
|
84
|
+
* {
|
|
85
|
+
* "TagKey": "Purpose",
|
|
86
|
+
* "TagValue": "Test"
|
|
87
|
+
* }
|
|
88
|
+
* ],
|
|
89
|
+
* "Truncated": false
|
|
90
|
+
* }
|
|
91
|
+
* *\/
|
|
92
|
+
* // example id: to-list-tags-for-a-cmk-1483996855796
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
65
95
|
*/
|
|
66
96
|
export declare class ListResourceTagsCommand extends $Command<ListResourceTagsCommandInput, ListResourceTagsCommandOutput, KMSClientResolvedConfig> {
|
|
67
97
|
readonly input: ListResourceTagsCommandInput;
|
|
@@ -71,6 +71,36 @@ export interface ListRetirableGrantsCommandOutput extends ListGrantsResponse, __
|
|
|
71
71
|
* @see {@link ListRetirableGrantsCommandOutput} for command's `response` shape.
|
|
72
72
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
73
73
|
*
|
|
74
|
+
* @example To list grants that the specified principal can retire
|
|
75
|
+
* ```javascript
|
|
76
|
+
* // The following example lists the grants that the specified principal (identity) can retire.
|
|
77
|
+
* const input = {
|
|
78
|
+
* "RetiringPrincipal": "arn:aws:iam::111122223333:role/ExampleRole"
|
|
79
|
+
* };
|
|
80
|
+
* const command = new ListRetirableGrantsCommand(input);
|
|
81
|
+
* const response = await client.send(command);
|
|
82
|
+
* /* response ==
|
|
83
|
+
* {
|
|
84
|
+
* "Grants": [
|
|
85
|
+
* {
|
|
86
|
+
* "CreationDate": "2016-12-07T11:09:35-08:00",
|
|
87
|
+
* "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
|
|
88
|
+
* "GranteePrincipal": "arn:aws:iam::111122223333:role/ExampleRole",
|
|
89
|
+
* "IssuingAccount": "arn:aws:iam::444455556666:root",
|
|
90
|
+
* "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
91
|
+
* "Operations": [
|
|
92
|
+
* "Decrypt",
|
|
93
|
+
* "Encrypt"
|
|
94
|
+
* ],
|
|
95
|
+
* "RetiringPrincipal": "arn:aws:iam::111122223333:role/ExampleRole"
|
|
96
|
+
* }
|
|
97
|
+
* ],
|
|
98
|
+
* "Truncated": false
|
|
99
|
+
* }
|
|
100
|
+
* *\/
|
|
101
|
+
* // example id: to-list-grants-that-the-specified-principal-can-retire-1481140499620
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
74
104
|
*/
|
|
75
105
|
export declare class ListRetirableGrantsCommand extends $Command<ListRetirableGrantsCommandInput, ListRetirableGrantsCommandOutput, KMSClientResolvedConfig> {
|
|
76
106
|
readonly input: ListRetirableGrantsCommandInput;
|
|
@@ -41,6 +41,19 @@ export interface PutKeyPolicyCommandOutput extends __MetadataBearer {
|
|
|
41
41
|
* @see {@link PutKeyPolicyCommandOutput} for command's `response` shape.
|
|
42
42
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
43
43
|
*
|
|
44
|
+
* @example To attach a key policy to a KMS key
|
|
45
|
+
* ```javascript
|
|
46
|
+
* // The following example attaches a key policy to the specified KMS key.
|
|
47
|
+
* const input = {
|
|
48
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
49
|
+
* "Policy": "{\n \"Version\": \"2012-10-17\",\n \"Id\": \"custom-policy-2016-12-07\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:root\"\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow access for Key Administrators\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": [\n \"arn:aws:iam::111122223333:user/ExampleAdminUser\",\n \"arn:aws:iam::111122223333:role/ExampleAdminRole\"\n ]\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:role/ExamplePowerUserRole\"\n },\n \"Action\": [\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey*\",\n \"kms:DescribeKey\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow attachment of persistent resources\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:role/ExamplePowerUserRole\"\n },\n \"Action\": [\n \"kms:CreateGrant\",\n \"kms:ListGrants\",\n \"kms:RevokeGrant\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\"\n }\n }\n }\n ]\n}\n",
|
|
50
|
+
* "PolicyName": "default"
|
|
51
|
+
* };
|
|
52
|
+
* const command = new PutKeyPolicyCommand(input);
|
|
53
|
+
* await client.send(command);
|
|
54
|
+
* // example id: to-attach-a-key-policy-to-a-cmk-1481147345018
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
44
57
|
*/
|
|
45
58
|
export declare class PutKeyPolicyCommand extends $Command<PutKeyPolicyCommandInput, PutKeyPolicyCommandOutput, KMSClientResolvedConfig> {
|
|
46
59
|
readonly input: PutKeyPolicyCommandInput;
|
|
@@ -123,6 +123,25 @@ export interface ReEncryptCommandOutput extends ReEncryptResponse, __MetadataBea
|
|
|
123
123
|
* @see {@link ReEncryptCommandOutput} for command's `response` shape.
|
|
124
124
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
125
125
|
*
|
|
126
|
+
* @example To reencrypt data
|
|
127
|
+
* ```javascript
|
|
128
|
+
* // The following example reencrypts data with the specified KMS key.
|
|
129
|
+
* const input = {
|
|
130
|
+
* "CiphertextBlob": "<binary data>",
|
|
131
|
+
* "DestinationKeyId": "0987dcba-09fe-87dc-65ba-ab0987654321"
|
|
132
|
+
* };
|
|
133
|
+
* const command = new ReEncryptCommand(input);
|
|
134
|
+
* const response = await client.send(command);
|
|
135
|
+
* /* response ==
|
|
136
|
+
* {
|
|
137
|
+
* "CiphertextBlob": "<binary data>",
|
|
138
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
139
|
+
* "SourceKeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
140
|
+
* }
|
|
141
|
+
* *\/
|
|
142
|
+
* // example id: to-reencrypt-data-1481230358001
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
126
145
|
*/
|
|
127
146
|
export declare class ReEncryptCommand extends $Command<ReEncryptCommandInput, ReEncryptCommandOutput, KMSClientResolvedConfig> {
|
|
128
147
|
readonly input: ReEncryptCommandInput;
|
|
@@ -111,6 +111,54 @@ export interface ReplicateKeyCommandOutput extends ReplicateKeyResponse, __Metad
|
|
|
111
111
|
* @see {@link ReplicateKeyCommandOutput} for command's `response` shape.
|
|
112
112
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
113
113
|
*
|
|
114
|
+
* @example To replicate a multi-Region key in a different AWS Region
|
|
115
|
+
* ```javascript
|
|
116
|
+
* // This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.
|
|
117
|
+
* const input = {
|
|
118
|
+
* "KeyId": "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
|
|
119
|
+
* "ReplicaRegion": "us-west-2"
|
|
120
|
+
* };
|
|
121
|
+
* const command = new ReplicateKeyCommand(input);
|
|
122
|
+
* const response = await client.send(command);
|
|
123
|
+
* /* response ==
|
|
124
|
+
* {
|
|
125
|
+
* "ReplicaKeyMetadata": {
|
|
126
|
+
* "AWSAccountId": "111122223333",
|
|
127
|
+
* "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
|
|
128
|
+
* "CreationDate": 1607472987.918,
|
|
129
|
+
* "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
|
|
130
|
+
* "Description": "",
|
|
131
|
+
* "Enabled": true,
|
|
132
|
+
* "EncryptionAlgorithms": [
|
|
133
|
+
* "SYMMETRIC_DEFAULT"
|
|
134
|
+
* ],
|
|
135
|
+
* "KeyId": "mrk-1234abcd12ab34cd56ef1234567890ab",
|
|
136
|
+
* "KeyManager": "CUSTOMER",
|
|
137
|
+
* "KeyState": "Enabled",
|
|
138
|
+
* "KeyUsage": "ENCRYPT_DECRYPT",
|
|
139
|
+
* "MultiRegion": true,
|
|
140
|
+
* "MultiRegionConfiguration": {
|
|
141
|
+
* "MultiRegionKeyType": "REPLICA",
|
|
142
|
+
* "PrimaryKey": {
|
|
143
|
+
* "Arn": "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
|
|
144
|
+
* "Region": "us-east-1"
|
|
145
|
+
* },
|
|
146
|
+
* "ReplicaKeys": [
|
|
147
|
+
* {
|
|
148
|
+
* "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab",
|
|
149
|
+
* "Region": "us-west-2"
|
|
150
|
+
* }
|
|
151
|
+
* ]
|
|
152
|
+
* },
|
|
153
|
+
* "Origin": "AWS_KMS"
|
|
154
|
+
* },
|
|
155
|
+
* "ReplicaPolicy": "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"key-default-1\",...}",
|
|
156
|
+
* "ReplicaTags": []
|
|
157
|
+
* }
|
|
158
|
+
* *\/
|
|
159
|
+
* // example id: to-replicate-a-multi-region-key-in-a-different-aws-region-1628622402887
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
114
162
|
*/
|
|
115
163
|
export declare class ReplicateKeyCommand extends $Command<ReplicateKeyCommandInput, ReplicateKeyCommandOutput, KMSClientResolvedConfig> {
|
|
116
164
|
readonly input: ReplicateKeyCommandInput;
|
|
@@ -74,6 +74,18 @@ export interface RetireGrantCommandOutput extends __MetadataBearer {
|
|
|
74
74
|
* @see {@link RetireGrantCommandOutput} for command's `response` shape.
|
|
75
75
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
76
76
|
*
|
|
77
|
+
* @example To retire a grant
|
|
78
|
+
* ```javascript
|
|
79
|
+
* // The following example retires a grant.
|
|
80
|
+
* const input = {
|
|
81
|
+
* "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
|
|
82
|
+
* "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
83
|
+
* };
|
|
84
|
+
* const command = new RetireGrantCommand(input);
|
|
85
|
+
* await client.send(command);
|
|
86
|
+
* // example id: to-retire-a-grant-1481327028297
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
77
89
|
*/
|
|
78
90
|
export declare class RetireGrantCommand extends $Command<RetireGrantCommandInput, RetireGrantCommandOutput, KMSClientResolvedConfig> {
|
|
79
91
|
readonly input: RetireGrantCommandInput;
|
|
@@ -72,6 +72,18 @@ export interface RevokeGrantCommandOutput extends __MetadataBearer {
|
|
|
72
72
|
* @see {@link RevokeGrantCommandOutput} for command's `response` shape.
|
|
73
73
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
74
74
|
*
|
|
75
|
+
* @example To revoke a grant
|
|
76
|
+
* ```javascript
|
|
77
|
+
* // The following example revokes a grant.
|
|
78
|
+
* const input = {
|
|
79
|
+
* "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60",
|
|
80
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
81
|
+
* };
|
|
82
|
+
* const command = new RevokeGrantCommand(input);
|
|
83
|
+
* await client.send(command);
|
|
84
|
+
* // example id: to-revoke-a-grant-1481329549302
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
75
87
|
*/
|
|
76
88
|
export declare class RevokeGrantCommand extends $Command<RevokeGrantCommandInput, RevokeGrantCommandOutput, KMSClientResolvedConfig> {
|
|
77
89
|
readonly input: RevokeGrantCommandInput;
|
|
@@ -84,6 +84,24 @@ export interface ScheduleKeyDeletionCommandOutput extends ScheduleKeyDeletionRes
|
|
|
84
84
|
* @see {@link ScheduleKeyDeletionCommandOutput} for command's `response` shape.
|
|
85
85
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
86
86
|
*
|
|
87
|
+
* @example To schedule a KMS key for deletion
|
|
88
|
+
* ```javascript
|
|
89
|
+
* // The following example schedules the specified KMS key for deletion.
|
|
90
|
+
* const input = {
|
|
91
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
92
|
+
* "PendingWindowInDays": 7
|
|
93
|
+
* };
|
|
94
|
+
* const command = new ScheduleKeyDeletionCommand(input);
|
|
95
|
+
* const response = await client.send(command);
|
|
96
|
+
* /* response ==
|
|
97
|
+
* {
|
|
98
|
+
* "DeletionDate": "2016-12-17T16:00:00-08:00",
|
|
99
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
100
|
+
* }
|
|
101
|
+
* *\/
|
|
102
|
+
* // example id: to-schedule-a-cmk-for-deletion-1481331111094
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
87
105
|
*/
|
|
88
106
|
export declare class ScheduleKeyDeletionCommand extends $Command<ScheduleKeyDeletionCommandInput, ScheduleKeyDeletionCommandOutput, KMSClientResolvedConfig> {
|
|
89
107
|
readonly input: ScheduleKeyDeletionCommandInput;
|
|
@@ -80,6 +80,48 @@ export interface SignCommandOutput extends SignResponse, __MetadataBearer {
|
|
|
80
80
|
* @see {@link SignCommandOutput} for command's `response` shape.
|
|
81
81
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
82
82
|
*
|
|
83
|
+
* @example To digitally sign a message with an asymmetric KMS key.
|
|
84
|
+
* ```javascript
|
|
85
|
+
* // This operation uses the private key in an asymmetric elliptic curve (ECC) KMS key to generate a digital signature for a given message.
|
|
86
|
+
* const input = {
|
|
87
|
+
* "KeyId": "alias/ECC_signing_key",
|
|
88
|
+
* "Message": "<message to be signed>",
|
|
89
|
+
* "MessageType": "RAW",
|
|
90
|
+
* "SigningAlgorithm": "ECDSA_SHA_384"
|
|
91
|
+
* };
|
|
92
|
+
* const command = new SignCommand(input);
|
|
93
|
+
* const response = await client.send(command);
|
|
94
|
+
* /* response ==
|
|
95
|
+
* {
|
|
96
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
97
|
+
* "Signature": "<binary data>",
|
|
98
|
+
* "SigningAlgorithm": "ECDSA_SHA_384"
|
|
99
|
+
* }
|
|
100
|
+
* *\/
|
|
101
|
+
* // example id: to-digitally-sign-a-message-with-an-asymmetric-kms-key-1
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @example To digitally sign a message digest with an asymmetric KMS key.
|
|
105
|
+
* ```javascript
|
|
106
|
+
* // This operation uses the private key in an asymmetric RSA signing KMS key to generate a digital signature for a message digest. In this example, a large message was hashed and the resulting digest is provided in the Message parameter. To tell KMS not to hash the message again, the MessageType field is set to DIGEST
|
|
107
|
+
* const input = {
|
|
108
|
+
* "KeyId": "alias/RSA_signing_key",
|
|
109
|
+
* "Message": "<message digest to be signed>",
|
|
110
|
+
* "MessageType": "DIGEST",
|
|
111
|
+
* "SigningAlgorithm": "RSASSA_PKCS1_V1_5_SHA_256"
|
|
112
|
+
* };
|
|
113
|
+
* const command = new SignCommand(input);
|
|
114
|
+
* const response = await client.send(command);
|
|
115
|
+
* /* response ==
|
|
116
|
+
* {
|
|
117
|
+
* "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
118
|
+
* "Signature": "<binary data>",
|
|
119
|
+
* "SigningAlgorithm": "RSASSA_PKCS1_V1_5_SHA_256"
|
|
120
|
+
* }
|
|
121
|
+
* *\/
|
|
122
|
+
* // example id: to-digitally-sign-a-message-digest-with-an-asymmetric-kms-key-2
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
83
125
|
*/
|
|
84
126
|
export declare class SignCommand extends $Command<SignCommandInput, SignCommandOutput, KMSClientResolvedConfig> {
|
|
85
127
|
readonly input: SignCommandInput;
|
|
@@ -75,6 +75,23 @@ export interface TagResourceCommandOutput extends __MetadataBearer {
|
|
|
75
75
|
* @see {@link TagResourceCommandOutput} for command's `response` shape.
|
|
76
76
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
77
77
|
*
|
|
78
|
+
* @example To tag a KMS key
|
|
79
|
+
* ```javascript
|
|
80
|
+
* // The following example tags a KMS key.
|
|
81
|
+
* const input = {
|
|
82
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
83
|
+
* "Tags": [
|
|
84
|
+
* {
|
|
85
|
+
* "TagKey": "Purpose",
|
|
86
|
+
* "TagValue": "Test"
|
|
87
|
+
* }
|
|
88
|
+
* ]
|
|
89
|
+
* };
|
|
90
|
+
* const command = new TagResourceCommand(input);
|
|
91
|
+
* await client.send(command);
|
|
92
|
+
* // example id: to-tag-a-cmk-1483997246518
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
78
95
|
*/
|
|
79
96
|
export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, KMSClientResolvedConfig> {
|
|
80
97
|
readonly input: TagResourceCommandInput;
|
|
@@ -70,6 +70,21 @@ export interface UntagResourceCommandOutput extends __MetadataBearer {
|
|
|
70
70
|
* @see {@link UntagResourceCommandOutput} for command's `response` shape.
|
|
71
71
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
72
72
|
*
|
|
73
|
+
* @example To remove tags from a KMS key
|
|
74
|
+
* ```javascript
|
|
75
|
+
* // The following example removes tags from a KMS key.
|
|
76
|
+
* const input = {
|
|
77
|
+
* "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
78
|
+
* "TagKeys": [
|
|
79
|
+
* "Purpose",
|
|
80
|
+
* "CostCenter"
|
|
81
|
+
* ]
|
|
82
|
+
* };
|
|
83
|
+
* const command = new UntagResourceCommand(input);
|
|
84
|
+
* await client.send(command);
|
|
85
|
+
* // example id: to-remove-tags-from-a-cmk-1483997590962
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
73
88
|
*/
|
|
74
89
|
export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, KMSClientResolvedConfig> {
|
|
75
90
|
readonly input: UntagResourceCommandInput;
|
|
@@ -91,6 +91,18 @@ export interface UpdateAliasCommandOutput extends __MetadataBearer {
|
|
|
91
91
|
* @see {@link UpdateAliasCommandOutput} for command's `response` shape.
|
|
92
92
|
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
93
93
|
*
|
|
94
|
+
* @example To update an alias
|
|
95
|
+
* ```javascript
|
|
96
|
+
* // The following example updates the specified alias to refer to the specified KMS key.
|
|
97
|
+
* const input = {
|
|
98
|
+
* "AliasName": "alias/ExampleAlias",
|
|
99
|
+
* "TargetKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
|
|
100
|
+
* };
|
|
101
|
+
* const command = new UpdateAliasCommand(input);
|
|
102
|
+
* await client.send(command);
|
|
103
|
+
* // example id: to-update-an-alias-1481572726920
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
94
106
|
*/
|
|
95
107
|
export declare class UpdateAliasCommand extends $Command<UpdateAliasCommandInput, UpdateAliasCommandOutput, KMSClientResolvedConfig> {
|
|
96
108
|
readonly input: UpdateAliasCommandInput;
|