@aws-sdk/client-kms 3.36.0 → 3.39.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.
Files changed (131) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist-cjs/KMS.js +0 -92
  3. package/dist-cjs/KMSClient.js +0 -97
  4. package/dist-cjs/commands/CancelKeyDeletionCommand.js +0 -37
  5. package/dist-cjs/commands/ConnectCustomKeyStoreCommand.js +0 -85
  6. package/dist-cjs/commands/CreateAliasCommand.js +0 -81
  7. package/dist-cjs/commands/CreateCustomKeyStoreCommand.js +0 -73
  8. package/dist-cjs/commands/CreateGrantCommand.js +0 -86
  9. package/dist-cjs/commands/CreateKeyCommand.js +0 -148
  10. package/dist-cjs/commands/DecryptCommand.js +0 -112
  11. package/dist-cjs/commands/DeleteAliasCommand.js +0 -71
  12. package/dist-cjs/commands/DeleteCustomKeyStoreCommand.js +0 -78
  13. package/dist-cjs/commands/DeleteImportedKeyMaterialCommand.js +0 -53
  14. package/dist-cjs/commands/DescribeCustomKeyStoresCommand.js +0 -77
  15. package/dist-cjs/commands/DescribeKeyCommand.js +0 -103
  16. package/dist-cjs/commands/DisableKeyCommand.js +0 -39
  17. package/dist-cjs/commands/DisableKeyRotationCommand.js +0 -49
  18. package/dist-cjs/commands/DisconnectCustomKeyStoreCommand.js +0 -76
  19. package/dist-cjs/commands/EnableKeyCommand.js +0 -36
  20. package/dist-cjs/commands/EnableKeyRotationCommand.js +0 -49
  21. package/dist-cjs/commands/EncryptCommand.js +0 -148
  22. package/dist-cjs/commands/GenerateDataKeyCommand.js +0 -121
  23. package/dist-cjs/commands/GenerateDataKeyPairCommand.js +0 -100
  24. package/dist-cjs/commands/GenerateDataKeyPairWithoutPlaintextCommand.js +0 -90
  25. package/dist-cjs/commands/GenerateDataKeyWithoutPlaintextCommand.js +0 -95
  26. package/dist-cjs/commands/GenerateRandomCommand.js +0 -33
  27. package/dist-cjs/commands/GetKeyPolicyCommand.js +0 -32
  28. package/dist-cjs/commands/GetKeyRotationStatusCommand.js +0 -61
  29. package/dist-cjs/commands/GetParametersForImportCommand.js +0 -58
  30. package/dist-cjs/commands/GetPublicKeyCommand.js +0 -70
  31. package/dist-cjs/commands/ImportKeyMaterialCommand.js +0 -87
  32. package/dist-cjs/commands/ListAliasesCommand.js +0 -66
  33. package/dist-cjs/commands/ListGrantsCommand.js +0 -69
  34. package/dist-cjs/commands/ListKeyPoliciesCommand.js +0 -46
  35. package/dist-cjs/commands/ListKeysCommand.js +0 -54
  36. package/dist-cjs/commands/ListResourceTagsCommand.js +0 -58
  37. package/dist-cjs/commands/ListRetirableGrantsCommand.js +0 -67
  38. package/dist-cjs/commands/PutKeyPolicyCommand.js +0 -37
  39. package/dist-cjs/commands/ReEncryptCommand.js +0 -122
  40. package/dist-cjs/commands/ReplicateKeyCommand.js +0 -101
  41. package/dist-cjs/commands/RetireGrantCommand.js +0 -70
  42. package/dist-cjs/commands/RevokeGrantCommand.js +0 -67
  43. package/dist-cjs/commands/ScheduleKeyDeletionCommand.js +0 -78
  44. package/dist-cjs/commands/SignCommand.js +0 -69
  45. package/dist-cjs/commands/TagResourceCommand.js +0 -71
  46. package/dist-cjs/commands/UntagResourceCommand.js +0 -67
  47. package/dist-cjs/commands/UpdateAliasCommand.js +0 -86
  48. package/dist-cjs/commands/UpdateCustomKeyStoreCommand.js +0 -96
  49. package/dist-cjs/commands/UpdateKeyDescriptionCommand.js +0 -47
  50. package/dist-cjs/commands/UpdatePrimaryRegionCommand.js +0 -89
  51. package/dist-cjs/commands/VerifyCommand.js +0 -54
  52. package/dist-cjs/commands/index.js +51 -0
  53. package/dist-cjs/endpoints.js +6 -1
  54. package/dist-cjs/index.js +4 -55
  55. package/dist-cjs/models/models_0.js +0 -366
  56. package/dist-cjs/pagination/ListAliasesPaginator.js +0 -10
  57. package/dist-cjs/pagination/ListGrantsPaginator.js +0 -10
  58. package/dist-cjs/pagination/ListKeyPoliciesPaginator.js +0 -10
  59. package/dist-cjs/pagination/ListKeysPaginator.js +0 -10
  60. package/dist-cjs/pagination/index.js +8 -0
  61. package/dist-cjs/protocols/Aws_json1_1.js +0 -5
  62. package/dist-cjs/runtimeConfig.browser.js +1 -5
  63. package/dist-cjs/runtimeConfig.js +1 -5
  64. package/dist-cjs/runtimeConfig.native.js +0 -3
  65. package/dist-cjs/runtimeConfig.shared.js +0 -3
  66. package/dist-es/commands/index.js +48 -0
  67. package/dist-es/endpoints.js +6 -1
  68. package/dist-es/index.js +4 -55
  69. package/dist-es/pagination/index.js +5 -0
  70. package/dist-types/commands/index.d.ts +48 -0
  71. package/dist-types/index.d.ts +4 -55
  72. package/dist-types/pagination/index.d.ts +5 -0
  73. package/dist-types/ts3.4/KMS.d.ts +49 -2646
  74. package/dist-types/ts3.4/KMSClient.d.ts +24 -178
  75. package/dist-types/ts3.4/commands/CancelKeyDeletionCommand.d.ts +2 -33
  76. package/dist-types/ts3.4/commands/ConnectCustomKeyStoreCommand.d.ts +2 -81
  77. package/dist-types/ts3.4/commands/CreateAliasCommand.d.ts +2 -77
  78. package/dist-types/ts3.4/commands/CreateCustomKeyStoreCommand.d.ts +2 -69
  79. package/dist-types/ts3.4/commands/CreateGrantCommand.d.ts +2 -82
  80. package/dist-types/ts3.4/commands/CreateKeyCommand.d.ts +2 -144
  81. package/dist-types/ts3.4/commands/DecryptCommand.d.ts +2 -108
  82. package/dist-types/ts3.4/commands/DeleteAliasCommand.d.ts +2 -67
  83. package/dist-types/ts3.4/commands/DeleteCustomKeyStoreCommand.d.ts +2 -74
  84. package/dist-types/ts3.4/commands/DeleteImportedKeyMaterialCommand.d.ts +2 -49
  85. package/dist-types/ts3.4/commands/DescribeCustomKeyStoresCommand.d.ts +2 -73
  86. package/dist-types/ts3.4/commands/DescribeKeyCommand.d.ts +2 -99
  87. package/dist-types/ts3.4/commands/DisableKeyCommand.d.ts +2 -35
  88. package/dist-types/ts3.4/commands/DisableKeyRotationCommand.d.ts +2 -45
  89. package/dist-types/ts3.4/commands/DisconnectCustomKeyStoreCommand.d.ts +2 -72
  90. package/dist-types/ts3.4/commands/EnableKeyCommand.d.ts +2 -32
  91. package/dist-types/ts3.4/commands/EnableKeyRotationCommand.d.ts +2 -45
  92. package/dist-types/ts3.4/commands/EncryptCommand.d.ts +2 -144
  93. package/dist-types/ts3.4/commands/GenerateDataKeyCommand.d.ts +2 -117
  94. package/dist-types/ts3.4/commands/GenerateDataKeyPairCommand.d.ts +2 -96
  95. package/dist-types/ts3.4/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +2 -86
  96. package/dist-types/ts3.4/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +2 -91
  97. package/dist-types/ts3.4/commands/GenerateRandomCommand.d.ts +2 -29
  98. package/dist-types/ts3.4/commands/GetKeyPolicyCommand.d.ts +2 -28
  99. package/dist-types/ts3.4/commands/GetKeyRotationStatusCommand.d.ts +2 -57
  100. package/dist-types/ts3.4/commands/GetParametersForImportCommand.d.ts +2 -54
  101. package/dist-types/ts3.4/commands/GetPublicKeyCommand.d.ts +2 -66
  102. package/dist-types/ts3.4/commands/ImportKeyMaterialCommand.d.ts +2 -83
  103. package/dist-types/ts3.4/commands/ListAliasesCommand.d.ts +2 -62
  104. package/dist-types/ts3.4/commands/ListGrantsCommand.d.ts +2 -65
  105. package/dist-types/ts3.4/commands/ListKeyPoliciesCommand.d.ts +2 -42
  106. package/dist-types/ts3.4/commands/ListKeysCommand.d.ts +2 -50
  107. package/dist-types/ts3.4/commands/ListResourceTagsCommand.d.ts +2 -54
  108. package/dist-types/ts3.4/commands/ListRetirableGrantsCommand.d.ts +2 -63
  109. package/dist-types/ts3.4/commands/PutKeyPolicyCommand.d.ts +2 -33
  110. package/dist-types/ts3.4/commands/ReEncryptCommand.d.ts +2 -118
  111. package/dist-types/ts3.4/commands/ReplicateKeyCommand.d.ts +2 -97
  112. package/dist-types/ts3.4/commands/RetireGrantCommand.d.ts +2 -66
  113. package/dist-types/ts3.4/commands/RevokeGrantCommand.d.ts +2 -63
  114. package/dist-types/ts3.4/commands/ScheduleKeyDeletionCommand.d.ts +2 -74
  115. package/dist-types/ts3.4/commands/SignCommand.d.ts +2 -65
  116. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -67
  117. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -63
  118. package/dist-types/ts3.4/commands/UpdateAliasCommand.d.ts +2 -82
  119. package/dist-types/ts3.4/commands/UpdateCustomKeyStoreCommand.d.ts +2 -92
  120. package/dist-types/ts3.4/commands/UpdateKeyDescriptionCommand.d.ts +2 -43
  121. package/dist-types/ts3.4/commands/UpdatePrimaryRegionCommand.d.ts +2 -85
  122. package/dist-types/ts3.4/commands/VerifyCommand.d.ts +2 -50
  123. package/dist-types/ts3.4/commands/index.d.ts +48 -0
  124. package/dist-types/ts3.4/index.d.ts +4 -55
  125. package/dist-types/ts3.4/models/models_0.d.ts +445 -2963
  126. package/dist-types/ts3.4/pagination/index.d.ts +5 -0
  127. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  128. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  129. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  130. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  131. package/package.json +32 -32
@@ -5,78 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Deletes the specified grant. You revoke a grant to terminate the permissions that the
10
- * grant allows. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete">Retiring and revoking grants</a> in
11
- * the <i>
12
- * <i>Key Management Service Developer Guide</i>
13
- * </i>.</p>
14
- * <p>When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as <i>eventual consistency</i>. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency">Eventual consistency</a> in
15
- * the <i>
16
- * <i>Key Management Service Developer Guide</i>
17
- * </i>. </p>
18
- * <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
19
- * <i>
20
- * <i>Key Management Service Developer Guide</i>
21
- * </i>. For examples of working with grants in several
22
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
23
- * <p>
24
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
25
- * ARN in the value of the <code>KeyId</code> parameter.</p>
26
- * <p>
27
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:RevokeGrant</a> (key policy).</p>
28
- * <p>
29
- * <b>Related operations:</b>
30
- * </p>
31
- * <ul>
32
- * <li>
33
- * <p>
34
- * <a>CreateGrant</a>
35
- * </p>
36
- * </li>
37
- * <li>
38
- * <p>
39
- * <a>ListGrants</a>
40
- * </p>
41
- * </li>
42
- * <li>
43
- * <p>
44
- * <a>ListRetirableGrants</a>
45
- * </p>
46
- * </li>
47
- * <li>
48
- * <p>
49
- * <a>RetireGrant</a>
50
- * </p>
51
- * </li>
52
- * </ul>
53
- * @example
54
- * Use a bare-bones client and the command you need to make an API call.
55
- * ```javascript
56
- * import { KMSClient, RevokeGrantCommand } from "@aws-sdk/client-kms"; // ES Modules import
57
- * // const { KMSClient, RevokeGrantCommand } = require("@aws-sdk/client-kms"); // CommonJS import
58
- * const client = new KMSClient(config);
59
- * const command = new RevokeGrantCommand(input);
60
- * const response = await client.send(command);
61
- * ```
62
- *
63
- * @see {@link RevokeGrantCommandInput} for command's `input` shape.
64
- * @see {@link RevokeGrantCommandOutput} for command's `response` shape.
65
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
66
- *
67
- */
68
8
  class RevokeGrantCommand extends smithy_client_1.Command {
69
- // Start section: command_properties
70
- // End section: command_properties
71
9
  constructor(input) {
72
- // Start section: command_constructor
73
10
  super();
74
11
  this.input = input;
75
- // End section: command_constructor
76
12
  }
77
- /**
78
- * @internal
79
- */
80
13
  resolveMiddleware(clientStack, configuration, options) {
81
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
82
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,89 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Schedules the deletion of a KMS key. By default, KMS applies a waiting period of 30
10
- * days, but you can specify a waiting period of 7-30 days. When this operation is successful,
11
- * the key state of the KMS key changes to <code>PendingDeletion</code> and the key can't be used
12
- * in any cryptographic operations. It remains in this state for the duration of the waiting
13
- * period. Before the waiting period ends, you can use <a>CancelKeyDeletion</a> to
14
- * cancel the deletion of the KMS key. After the waiting period ends, KMS deletes the KMS key,
15
- * its key material, and all KMS data associated with it, including all aliases that refer to
16
- * it.</p>
17
- * <important>
18
- * <p>Deleting a KMS key is a destructive and potentially dangerous operation. When a KMS key
19
- * is deleted, all data that was encrypted under the KMS key is unrecoverable. (The only
20
- * exception is a multi-Region replica key.) To prevent the use of a KMS key without deleting
21
- * it, use <a>DisableKey</a>. </p>
22
- * </important>
23
- * <p>If you schedule deletion of a KMS key from a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, when the waiting period
24
- * expires, <code>ScheduleKeyDeletion</code> deletes the KMS key from KMS. Then KMS makes a
25
- * best effort to delete the key material from the associated CloudHSM cluster. However, you might
26
- * need to manually <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key">delete the orphaned key
27
- * material</a> from the cluster and its backups.</p>
28
- * <p>You can schedule the deletion of a multi-Region primary key and its replica keys at any
29
- * time. However, KMS will not delete a multi-Region primary key with existing replica keys. If
30
- * you schedule the deletion of a primary key with replicas, its key state changes to
31
- * <code>PendingReplicaDeletion</code> and it cannot be replicated or used in cryptographic
32
- * operations. This status can continue indefinitely. When the last of its replicas keys is
33
- * deleted (not just scheduled), the key state of the primary key changes to
34
- * <code>PendingDeletion</code> and its waiting period (<code>PendingWindowInDays</code>)
35
- * begins. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html">Deleting multi-Region keys</a> in the
36
- * <i>Key Management Service Developer Guide</i>. </p>
37
- * <p>For more information about scheduling a KMS key for deletion, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the
38
- * <i>Key Management Service Developer Guide</i>.</p>
39
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
40
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
41
- * <p>
42
- * <b>Cross-account
43
- * use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
44
- *
45
- *
46
- * <p>
47
- * <b>Required permissions</b>: kms:ScheduleKeyDeletion (key
48
- * policy)</p>
49
- * <p>
50
- * <b>Related operations</b>
51
- * </p>
52
- * <ul>
53
- * <li>
54
- * <p>
55
- * <a>CancelKeyDeletion</a>
56
- * </p>
57
- * </li>
58
- * <li>
59
- * <p>
60
- * <a>DisableKey</a>
61
- * </p>
62
- * </li>
63
- * </ul>
64
- * @example
65
- * Use a bare-bones client and the command you need to make an API call.
66
- * ```javascript
67
- * import { KMSClient, ScheduleKeyDeletionCommand } from "@aws-sdk/client-kms"; // ES Modules import
68
- * // const { KMSClient, ScheduleKeyDeletionCommand } = require("@aws-sdk/client-kms"); // CommonJS import
69
- * const client = new KMSClient(config);
70
- * const command = new ScheduleKeyDeletionCommand(input);
71
- * const response = await client.send(command);
72
- * ```
73
- *
74
- * @see {@link ScheduleKeyDeletionCommandInput} for command's `input` shape.
75
- * @see {@link ScheduleKeyDeletionCommandOutput} for command's `response` shape.
76
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
77
- *
78
- */
79
8
  class ScheduleKeyDeletionCommand extends smithy_client_1.Command {
80
- // Start section: command_properties
81
- // End section: command_properties
82
9
  constructor(input) {
83
- // Start section: command_constructor
84
10
  super();
85
11
  this.input = input;
86
- // End section: command_constructor
87
12
  }
88
- /**
89
- * @internal
90
- */
91
13
  resolveMiddleware(clientStack, configuration, options) {
92
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
93
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,80 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Creates a <a href="https://en.wikipedia.org/wiki/Digital_signature">digital
10
- * signature</a> for a message or message digest by using the private key in an asymmetric
11
- * KMS key. To verify the signature, use the <a>Verify</a> operation, or use the
12
- * public key in the same asymmetric KMS key outside of KMS. For information about symmetric and asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
13
- * <p>Digital signatures are generated and verified by using asymmetric key pair, such as an RSA
14
- * or ECC pair that is represented by an asymmetric KMS key. The key owner (or an authorized
15
- * user) uses their private key to sign a message. Anyone with the public key can verify that the
16
- * message was signed with that particular private key and that the message hasn't changed since
17
- * it was signed. </p>
18
- * <p>To use the <code>Sign</code> operation, provide the following information:</p>
19
- * <ul>
20
- * <li>
21
- * <p>Use the <code>KeyId</code> parameter to identify an asymmetric KMS key with a
22
- * <code>KeyUsage</code> value of <code>SIGN_VERIFY</code>. To get the
23
- * <code>KeyUsage</code> value of a KMS key, use the <a>DescribeKey</a>
24
- * operation. The caller must have <code>kms:Sign</code> permission on the KMS key.</p>
25
- * </li>
26
- * <li>
27
- * <p>Use the <code>Message</code> parameter to specify the message or message digest to
28
- * sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a
29
- * hash digest of the message, and then provide the hash digest in the <code>Message</code>
30
- * parameter. To indicate whether the message is a full message or a digest, use the
31
- * <code>MessageType</code> parameter.</p>
32
- * </li>
33
- * <li>
34
- * <p>Choose a signing algorithm that is compatible with the KMS key. </p>
35
- * </li>
36
- * </ul>
37
- * <important>
38
- * <p>When signing a message, be sure to record the KMS key and the signing algorithm. This
39
- * information is required to verify the signature.</p>
40
- * </important>
41
- * <p>To verify the signature that this operation generates, use the <a>Verify</a>
42
- * operation. Or use the <a>GetPublicKey</a> operation to download the public key and
43
- * then use the public key to verify the signature outside of KMS. </p>
44
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
45
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
46
- * <p>
47
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
48
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
49
- *
50
- * <p>
51
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Sign</a> (key policy)</p>
52
- * <p>
53
- * <b>Related operations</b>: <a>Verify</a>
54
- * </p>
55
- * @example
56
- * Use a bare-bones client and the command you need to make an API call.
57
- * ```javascript
58
- * import { KMSClient, SignCommand } from "@aws-sdk/client-kms"; // ES Modules import
59
- * // const { KMSClient, SignCommand } = require("@aws-sdk/client-kms"); // CommonJS import
60
- * const client = new KMSClient(config);
61
- * const command = new SignCommand(input);
62
- * const response = await client.send(command);
63
- * ```
64
- *
65
- * @see {@link SignCommandInput} for command's `input` shape.
66
- * @see {@link SignCommandOutput} for command's `response` shape.
67
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
68
- *
69
- */
70
8
  class SignCommand extends smithy_client_1.Command {
71
- // Start section: command_properties
72
- // End section: command_properties
73
9
  constructor(input) {
74
- // Start section: command_constructor
75
10
  super();
76
11
  this.input = input;
77
- // End section: command_constructor
78
12
  }
79
- /**
80
- * @internal
81
- */
82
13
  resolveMiddleware(clientStack, configuration, options) {
83
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
84
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,82 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Adds or edits tags on a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>.</p>
10
- * <note>
11
- * <p>Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
12
- * </note>
13
- * <p>Each tag consists of a tag key and a tag value, both of which are case-sensitive strings.
14
- * The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag
15
- * value. To edit a tag, specify an existing tag key and a new tag value.</p>
16
- * <p>You can use this operation to tag a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>, but you cannot
17
- * tag an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services
18
- * managed key</a>, an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a>, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept">custom key
19
- * store</a>, or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept">alias</a>.</p>
20
- * <p>You can also add tags to a KMS key while creating it (<a>CreateKey</a>) or
21
- * replicating it (<a>ReplicateKey</a>).</p>
22
- * <p>For information about using tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging keys</a>. For general information about
23
- * tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon
24
- * Web Services General Reference</i>. </p>
25
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
26
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
27
- * <p>
28
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
29
- *
30
- * <p>
31
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> (key policy)</p>
32
- * <p>
33
- * <b>Related operations</b>
34
- * </p>
35
- * <ul>
36
- * <li>
37
- * <p>
38
- * <a>CreateKey</a>
39
- * </p>
40
- * </li>
41
- * <li>
42
- * <p>
43
- * <a>ListResourceTags</a>
44
- * </p>
45
- * </li>
46
- * <li>
47
- * <p>
48
- * <a>ReplicateKey</a>
49
- * </p>
50
- * </li>
51
- * <li>
52
- * <p>
53
- * <a>UntagResource</a>
54
- * </p>
55
- * </li>
56
- * </ul>
57
- * @example
58
- * Use a bare-bones client and the command you need to make an API call.
59
- * ```javascript
60
- * import { KMSClient, TagResourceCommand } from "@aws-sdk/client-kms"; // ES Modules import
61
- * // const { KMSClient, TagResourceCommand } = require("@aws-sdk/client-kms"); // CommonJS import
62
- * const client = new KMSClient(config);
63
- * const command = new TagResourceCommand(input);
64
- * const response = await client.send(command);
65
- * ```
66
- *
67
- * @see {@link TagResourceCommandInput} for command's `input` shape.
68
- * @see {@link TagResourceCommandOutput} for command's `response` shape.
69
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
70
- *
71
- */
72
8
  class TagResourceCommand extends smithy_client_1.Command {
73
- // Start section: command_properties
74
- // End section: command_properties
75
9
  constructor(input) {
76
- // Start section: command_constructor
77
10
  super();
78
11
  this.input = input;
79
- // End section: command_constructor
80
12
  }
81
- /**
82
- * @internal
83
- */
84
13
  resolveMiddleware(clientStack, configuration, options) {
85
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
86
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,78 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Deletes tags from a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>. To delete a tag,
10
- * specify the tag key and the KMS key.</p>
11
- * <note>
12
- * <p>Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
13
- * </note>
14
- * <p>When it succeeds, the <code>UntagResource</code> operation doesn't return any output.
15
- * Also, if the specified tag key isn't found on the KMS key, it doesn't throw an exception or
16
- * return a response. To confirm that the operation worked, use the <a>ListResourceTags</a> operation.</p>
17
- *
18
- * <p>For information about using tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging keys</a>. For general information about
19
- * tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon
20
- * Web Services General Reference</i>. </p>
21
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
22
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
23
- * <p>
24
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
25
- *
26
- * <p>
27
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UntagResource</a> (key policy)</p>
28
- * <p>
29
- * <b>Related operations</b>
30
- * </p>
31
- * <ul>
32
- * <li>
33
- * <p>
34
- * <a>CreateKey</a>
35
- * </p>
36
- * </li>
37
- * <li>
38
- * <p>
39
- * <a>ListResourceTags</a>
40
- * </p>
41
- * </li>
42
- * <li>
43
- * <p>
44
- * <a>ReplicateKey</a>
45
- * </p>
46
- * </li>
47
- * <li>
48
- * <p>
49
- * <a>TagResource</a>
50
- * </p>
51
- * </li>
52
- * </ul>
53
- * @example
54
- * Use a bare-bones client and the command you need to make an API call.
55
- * ```javascript
56
- * import { KMSClient, UntagResourceCommand } from "@aws-sdk/client-kms"; // ES Modules import
57
- * // const { KMSClient, UntagResourceCommand } = require("@aws-sdk/client-kms"); // CommonJS import
58
- * const client = new KMSClient(config);
59
- * const command = new UntagResourceCommand(input);
60
- * const response = await client.send(command);
61
- * ```
62
- *
63
- * @see {@link UntagResourceCommandInput} for command's `input` shape.
64
- * @see {@link UntagResourceCommandOutput} for command's `response` shape.
65
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
66
- *
67
- */
68
8
  class UntagResourceCommand extends smithy_client_1.Command {
69
- // Start section: command_properties
70
- // End section: command_properties
71
9
  constructor(input) {
72
- // Start section: command_constructor
73
10
  super();
74
11
  this.input = input;
75
- // End section: command_constructor
76
12
  }
77
- /**
78
- * @internal
79
- */
80
13
  resolveMiddleware(clientStack, configuration, options) {
81
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
82
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,97 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Associates an existing KMS alias with a different KMS key. Each alias is associated with
10
- * only one KMS key at a time, although a KMS key can have multiple aliases. The alias and the
11
- * KMS key must be in the same Amazon Web Services account and Region.</p>
12
- * <note>
13
- * <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
14
- * </note>
15
- * <p>The current and new KMS key must be the same type (both symmetric or both asymmetric), and
16
- * they must have the same key usage (<code>ENCRYPT_DECRYPT</code> or <code>SIGN_VERIFY</code>).
17
- * This restriction prevents errors in code that uses aliases. If you must assign an alias to a
18
- * different type of KMS key, use <a>DeleteAlias</a> to delete the old alias and <a>CreateAlias</a> to create a new alias.</p>
19
- * <p>You cannot use <code>UpdateAlias</code> to change an alias name. To change an alias name,
20
- * use <a>DeleteAlias</a> to delete the old alias and <a>CreateAlias</a> to
21
- * create a new alias.</p>
22
- * <p>Because an alias is not a property of a KMS key, you can create, update, and delete the
23
- * aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the
24
- * response from the <a>DescribeKey</a> operation. To get the aliases of all KMS keys
25
- * in the account, use the <a>ListAliases</a> operation. </p>
26
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
27
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
28
- * <p>
29
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
30
- * <p>
31
- * <b>Required permissions</b>
32
- * </p>
33
- * <ul>
34
- * <li>
35
- * <p>
36
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on
37
- * the alias (IAM policy).</p>
38
- * </li>
39
- * <li>
40
- * <p>
41
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on
42
- * the current KMS key (key policy).</p>
43
- * </li>
44
- * <li>
45
- * <p>
46
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on
47
- * the new KMS key (key policy).</p>
48
- * </li>
49
- * </ul>
50
- * <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the
51
- * <i>Key Management Service Developer Guide</i>.</p>
52
- * <p>
53
- * <b>Related operations:</b>
54
- * </p>
55
- * <ul>
56
- * <li>
57
- * <p>
58
- * <a>CreateAlias</a>
59
- * </p>
60
- * </li>
61
- * <li>
62
- * <p>
63
- * <a>DeleteAlias</a>
64
- * </p>
65
- * </li>
66
- * <li>
67
- * <p>
68
- * <a>ListAliases</a>
69
- * </p>
70
- * </li>
71
- * </ul>
72
- * @example
73
- * Use a bare-bones client and the command you need to make an API call.
74
- * ```javascript
75
- * import { KMSClient, UpdateAliasCommand } from "@aws-sdk/client-kms"; // ES Modules import
76
- * // const { KMSClient, UpdateAliasCommand } = require("@aws-sdk/client-kms"); // CommonJS import
77
- * const client = new KMSClient(config);
78
- * const command = new UpdateAliasCommand(input);
79
- * const response = await client.send(command);
80
- * ```
81
- *
82
- * @see {@link UpdateAliasCommandInput} for command's `input` shape.
83
- * @see {@link UpdateAliasCommandOutput} for command's `response` shape.
84
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
85
- *
86
- */
87
8
  class UpdateAliasCommand extends smithy_client_1.Command {
88
- // Start section: command_properties
89
- // End section: command_properties
90
9
  constructor(input) {
91
- // Start section: command_constructor
92
10
  super();
93
11
  this.input = input;
94
- // End section: command_constructor
95
12
  }
96
- /**
97
- * @internal
98
- */
99
13
  resolveMiddleware(clientStack, configuration, options) {
100
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
101
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,107 +5,11 @@ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
- /**
9
- * <p>Changes the properties of a custom key store. Use the <code>CustomKeyStoreId</code>
10
- * parameter to identify the custom key store you want to edit. Use the remaining parameters to
11
- * change the properties of the custom key store.</p>
12
- * <p>You can only update a custom key store that is disconnected. To disconnect the custom key
13
- * store, use <a>DisconnectCustomKeyStore</a>. To reconnect the custom key store after
14
- * the update completes, use <a>ConnectCustomKeyStore</a>. To find the connection
15
- * state of a custom key store, use the <a>DescribeCustomKeyStores</a>
16
- * operation.</p>
17
- * <p>The <code>CustomKeyStoreId</code> parameter is required in all commands. Use the other
18
- * parameters of <code>UpdateCustomKeyStore</code> to edit your key store settings.</p>
19
- * <ul>
20
- * <li>
21
- * <p>Use the <code>NewCustomKeyStoreName</code> parameter to change the friendly name of
22
- * the custom key store to the value that you specify.</p>
23
- * <p> </p>
24
- * </li>
25
- * <li>
26
- * <p>Use the <code>KeyStorePassword</code> parameter tell KMS the current password of the
27
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser">
28
- * <code>kmsuser</code> crypto user (CU)</a> in the associated CloudHSM cluster. You
29
- * can use this parameter to <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-password">fix connection
30
- * failures</a> that occur when KMS cannot log into the associated cluster because
31
- * the <code>kmsuser</code> password has changed. This value does not change the password in
32
- * the CloudHSM cluster.</p>
33
- * <p> </p>
34
- * </li>
35
- * <li>
36
- * <p>Use the <code>CloudHsmClusterId</code> parameter to associate the custom key store
37
- * with a different, but related, CloudHSM cluster. You can use this parameter to repair a
38
- * custom key store if its CloudHSM cluster becomes corrupted or is deleted, or when you need to
39
- * create or restore a cluster from a backup. </p>
40
- * </li>
41
- * </ul>
42
- * <p>If the operation succeeds, it returns a JSON object with no
43
- * properties.</p>
44
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
45
- * combines the convenience and extensive integration of KMS with the isolation and control of a
46
- * single-tenant key store.</p>
47
- * <p>
48
- * <b>Cross-account
49
- * use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account. </p>
50
- * <p>
51
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateCustomKeyStore</a> (IAM policy)</p>
52
- * <p>
53
- * <b>Related operations:</b>
54
- * </p>
55
- * <ul>
56
- * <li>
57
- * <p>
58
- * <a>ConnectCustomKeyStore</a>
59
- * </p>
60
- * </li>
61
- * <li>
62
- * <p>
63
- * <a>CreateCustomKeyStore</a>
64
- * </p>
65
- * </li>
66
- * <li>
67
- * <p>
68
- * <a>DeleteCustomKeyStore</a>
69
- * </p>
70
- * </li>
71
- * <li>
72
- * <p>
73
- * <a>DescribeCustomKeyStores</a>
74
- * </p>
75
- * </li>
76
- * <li>
77
- * <p>
78
- * <a>DisconnectCustomKeyStore</a>
79
- * </p>
80
- * </li>
81
- * </ul>
82
- * @example
83
- * Use a bare-bones client and the command you need to make an API call.
84
- * ```javascript
85
- * import { KMSClient, UpdateCustomKeyStoreCommand } from "@aws-sdk/client-kms"; // ES Modules import
86
- * // const { KMSClient, UpdateCustomKeyStoreCommand } = require("@aws-sdk/client-kms"); // CommonJS import
87
- * const client = new KMSClient(config);
88
- * const command = new UpdateCustomKeyStoreCommand(input);
89
- * const response = await client.send(command);
90
- * ```
91
- *
92
- * @see {@link UpdateCustomKeyStoreCommandInput} for command's `input` shape.
93
- * @see {@link UpdateCustomKeyStoreCommandOutput} for command's `response` shape.
94
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
95
- *
96
- */
97
8
  class UpdateCustomKeyStoreCommand extends smithy_client_1.Command {
98
- // Start section: command_properties
99
- // End section: command_properties
100
9
  constructor(input) {
101
- // Start section: command_constructor
102
10
  super();
103
11
  this.input = input;
104
- // End section: command_constructor
105
12
  }
106
- /**
107
- * @internal
108
- */
109
13
  resolveMiddleware(clientStack, configuration, options) {
110
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
111
15
  const stack = clientStack.concat(this.middlewareStack);