@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,44 +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>Returns a random byte string that is cryptographically secure.</p>
10
- * <p>By default, the random byte string is generated in KMS. To generate the byte string in
11
- * the CloudHSM cluster that is associated with a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, specify the custom key store
12
- * ID.</p>
13
- * <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
14
- * <p>For more information about entropy and random number generation, see
15
- * <a href="https://docs.aws.amazon.com/kms/latest/cryptographic-details/">Key Management Service Cryptographic Details</a>.</p>
16
- *
17
- * <p>
18
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateRandom</a> (IAM policy)</p>
19
- * @example
20
- * Use a bare-bones client and the command you need to make an API call.
21
- * ```javascript
22
- * import { KMSClient, GenerateRandomCommand } from "@aws-sdk/client-kms"; // ES Modules import
23
- * // const { KMSClient, GenerateRandomCommand } = require("@aws-sdk/client-kms"); // CommonJS import
24
- * const client = new KMSClient(config);
25
- * const command = new GenerateRandomCommand(input);
26
- * const response = await client.send(command);
27
- * ```
28
- *
29
- * @see {@link GenerateRandomCommandInput} for command's `input` shape.
30
- * @see {@link GenerateRandomCommandOutput} for command's `response` shape.
31
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
32
- *
33
- */
34
8
  class GenerateRandomCommand extends smithy_client_1.Command {
35
- // Start section: command_properties
36
- // End section: command_properties
37
9
  constructor(input) {
38
- // Start section: command_constructor
39
10
  super();
40
11
  this.input = input;
41
- // End section: command_constructor
42
12
  }
43
- /**
44
- * @internal
45
- */
46
13
  resolveMiddleware(clientStack, configuration, options) {
47
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
48
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,43 +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>Gets a key policy attached to the specified KMS key.</p>
10
- * <p>
11
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
12
- *
13
- * <p>
14
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetKeyPolicy</a> (key policy)</p>
15
- * <p>
16
- * <b>Related operations</b>: <a>PutKeyPolicy</a>
17
- * </p>
18
- * @example
19
- * Use a bare-bones client and the command you need to make an API call.
20
- * ```javascript
21
- * import { KMSClient, GetKeyPolicyCommand } from "@aws-sdk/client-kms"; // ES Modules import
22
- * // const { KMSClient, GetKeyPolicyCommand } = require("@aws-sdk/client-kms"); // CommonJS import
23
- * const client = new KMSClient(config);
24
- * const command = new GetKeyPolicyCommand(input);
25
- * const response = await client.send(command);
26
- * ```
27
- *
28
- * @see {@link GetKeyPolicyCommandInput} for command's `input` shape.
29
- * @see {@link GetKeyPolicyCommandOutput} for command's `response` shape.
30
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
31
- *
32
- */
33
8
  class GetKeyPolicyCommand extends smithy_client_1.Command {
34
- // Start section: command_properties
35
- // End section: command_properties
36
9
  constructor(input) {
37
- // Start section: command_constructor
38
10
  super();
39
11
  this.input = input;
40
- // End section: command_constructor
41
12
  }
42
- /**
43
- * @internal
44
- */
45
13
  resolveMiddleware(clientStack, configuration, options) {
46
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
47
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,72 +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>Gets a Boolean value that indicates whether <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic rotation of the key material</a> is
10
- * enabled for the specified KMS key.</p>
11
- * <p>You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks">asymmetric KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key">multi-Region keys</a>, set the property on the primary key. The key rotation status for these KMS keys is always
12
- * <code>false</code>.</p>
13
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
14
- * 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>
15
- * <ul>
16
- * <li>
17
- * <p>Disabled: The key rotation status does not change when you disable a KMS key. However,
18
- * while the KMS key is disabled, KMS does not rotate the key material.</p>
19
- * </li>
20
- * <li>
21
- * <p>Pending deletion: While a KMS key is pending deletion, its key rotation status is
22
- * <code>false</code> and KMS does not rotate the key material. If you cancel the
23
- * deletion, the original key rotation status is restored.</p>
24
- * </li>
25
- * </ul>
26
- * <p>
27
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
28
- * ARN in the value of the <code>KeyId</code> parameter.</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:GetKeyRotationStatus</a> (key policy)</p>
32
- * <p>
33
- * <b>Related operations:</b>
34
- * </p>
35
- * <ul>
36
- * <li>
37
- * <p>
38
- * <a>DisableKeyRotation</a>
39
- * </p>
40
- * </li>
41
- * <li>
42
- * <p>
43
- * <a>EnableKeyRotation</a>
44
- * </p>
45
- * </li>
46
- * </ul>
47
- * @example
48
- * Use a bare-bones client and the command you need to make an API call.
49
- * ```javascript
50
- * import { KMSClient, GetKeyRotationStatusCommand } from "@aws-sdk/client-kms"; // ES Modules import
51
- * // const { KMSClient, GetKeyRotationStatusCommand } = require("@aws-sdk/client-kms"); // CommonJS import
52
- * const client = new KMSClient(config);
53
- * const command = new GetKeyRotationStatusCommand(input);
54
- * const response = await client.send(command);
55
- * ```
56
- *
57
- * @see {@link GetKeyRotationStatusCommandInput} for command's `input` shape.
58
- * @see {@link GetKeyRotationStatusCommandOutput} for command's `response` shape.
59
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
60
- *
61
- */
62
8
  class GetKeyRotationStatusCommand extends smithy_client_1.Command {
63
- // Start section: command_properties
64
- // End section: command_properties
65
9
  constructor(input) {
66
- // Start section: command_constructor
67
10
  super();
68
11
  this.input = input;
69
- // End section: command_constructor
70
12
  }
71
- /**
72
- * @internal
73
- */
74
13
  resolveMiddleware(clientStack, configuration, options) {
75
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
76
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,69 +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>Returns the items you need to import key material into a symmetric, customer managed KMS
10
- * key. For more information about importing key material into KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a>
11
- * in the <i>Key Management Service Developer Guide</i>.</p>
12
- * <p>This operation returns a public key and an import token. Use the public key to encrypt the
13
- * symmetric key material. Store the import token to send with a subsequent <a>ImportKeyMaterial</a> request.</p>
14
- * <p>You must specify the key ID of the symmetric KMS key into which you will import key
15
- * material. This KMS key's <code>Origin</code> must be <code>EXTERNAL</code>. You must also
16
- * specify the wrapping algorithm and type of wrapping key (public key) that you will use to
17
- * encrypt the key material. You cannot perform this operation on an asymmetric KMS key or on any KMS key in a different Amazon Web Services account.</p>
18
- * <p>To import key material, you must use the public key and import token from the same
19
- * response. These items are valid for 24 hours. The expiration date and time appear in the
20
- * <code>GetParametersForImport</code> response. You cannot use an expired token in an <a>ImportKeyMaterial</a> request. If your key and token expire, send another
21
- * <code>GetParametersForImport</code> request.</p>
22
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
23
- * 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>
24
- * <p>
25
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
26
- *
27
- * <p>
28
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetParametersForImport</a> (key policy)</p>
29
- * <p>
30
- * <b>Related operations:</b>
31
- * </p>
32
- * <ul>
33
- * <li>
34
- * <p>
35
- * <a>ImportKeyMaterial</a>
36
- * </p>
37
- * </li>
38
- * <li>
39
- * <p>
40
- * <a>DeleteImportedKeyMaterial</a>
41
- * </p>
42
- * </li>
43
- * </ul>
44
- * @example
45
- * Use a bare-bones client and the command you need to make an API call.
46
- * ```javascript
47
- * import { KMSClient, GetParametersForImportCommand } from "@aws-sdk/client-kms"; // ES Modules import
48
- * // const { KMSClient, GetParametersForImportCommand } = require("@aws-sdk/client-kms"); // CommonJS import
49
- * const client = new KMSClient(config);
50
- * const command = new GetParametersForImportCommand(input);
51
- * const response = await client.send(command);
52
- * ```
53
- *
54
- * @see {@link GetParametersForImportCommandInput} for command's `input` shape.
55
- * @see {@link GetParametersForImportCommandOutput} for command's `response` shape.
56
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
57
- *
58
- */
59
8
  class GetParametersForImportCommand extends smithy_client_1.Command {
60
- // Start section: command_properties
61
- // End section: command_properties
62
9
  constructor(input) {
63
- // Start section: command_constructor
64
10
  super();
65
11
  this.input = input;
66
- // End section: command_constructor
67
12
  }
68
- /**
69
- * @internal
70
- */
71
13
  resolveMiddleware(clientStack, configuration, options) {
72
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
73
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,81 +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>Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric
10
- * KMS key, which never leaves KMS unencrypted, callers with <code>kms:GetPublicKey</code>
11
- * permission can download the public key of an asymmetric KMS key. You can share the public key
12
- * to allow others to encrypt messages and verify signatures outside of KMS.
13
- * 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>
14
- * <p>You do not need to download the public key. Instead, you can use the public key within
15
- * KMS by calling the <a>Encrypt</a>, <a>ReEncrypt</a>, or <a>Verify</a> operations with the identifier of an asymmetric KMS key. When you use the
16
- * public key within KMS, you benefit from the authentication, authorization, and logging that
17
- * are part of every KMS operation. You also reduce of risk of encrypting data that cannot be
18
- * decrypted. These features are not effective outside of KMS. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/download-public-key.html#download-public-key-considerations">Special
19
- * Considerations for Downloading Public Keys</a>.</p>
20
- * <p>To help you use the public key safely outside of KMS, <code>GetPublicKey</code> returns
21
- * important information about the public key in the response, including:</p>
22
- * <ul>
23
- * <li>
24
- * <p>
25
- * <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec">KeySpec</a>: The type of key material in the public key, such as
26
- * <code>RSA_4096</code> or <code>ECC_NIST_P521</code>.</p>
27
- * </li>
28
- * <li>
29
- * <p>
30
- * <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage">KeyUsage</a>: Whether the key is used for encryption or signing.</p>
31
- * </li>
32
- * <li>
33
- * <p>
34
- * <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms">EncryptionAlgorithms</a> or <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms">SigningAlgorithms</a>: A list of the encryption algorithms or the signing
35
- * algorithms for the key.</p>
36
- * </li>
37
- * </ul>
38
- * <p>Although KMS cannot enforce these restrictions on external operations, it is crucial
39
- * that you use this information to prevent the public key from being used improperly. For
40
- * example, you can prevent a public signing key from being used encrypt data, or prevent a
41
- * public key from being used with an encryption algorithm that is not supported by KMS. You
42
- * can also avoid errors, such as using the wrong signing algorithm in a verification
43
- * operation.</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>:
48
- * Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
49
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
50
- *
51
- * <p>
52
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetPublicKey</a> (key policy)</p>
53
- * <p>
54
- * <b>Related operations</b>: <a>CreateKey</a>
55
- * </p>
56
- * @example
57
- * Use a bare-bones client and the command you need to make an API call.
58
- * ```javascript
59
- * import { KMSClient, GetPublicKeyCommand } from "@aws-sdk/client-kms"; // ES Modules import
60
- * // const { KMSClient, GetPublicKeyCommand } = require("@aws-sdk/client-kms"); // CommonJS import
61
- * const client = new KMSClient(config);
62
- * const command = new GetPublicKeyCommand(input);
63
- * const response = await client.send(command);
64
- * ```
65
- *
66
- * @see {@link GetPublicKeyCommandInput} for command's `input` shape.
67
- * @see {@link GetPublicKeyCommandOutput} for command's `response` shape.
68
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
69
- *
70
- */
71
8
  class GetPublicKeyCommand extends smithy_client_1.Command {
72
- // Start section: command_properties
73
- // End section: command_properties
74
9
  constructor(input) {
75
- // Start section: command_constructor
76
10
  super();
77
11
  this.input = input;
78
- // End section: command_constructor
79
12
  }
80
- /**
81
- * @internal
82
- */
83
13
  resolveMiddleware(clientStack, configuration, options) {
84
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
85
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,98 +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>Imports key material into an existing symmetric KMS KMS key that was created without key
10
- * material. After you successfully import key material into a KMS key, you can <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material">reimport
11
- * the same key material</a> into that KMS key, but you cannot import different key
12
- * material. </p>
13
- * <p>You cannot perform this operation on an asymmetric KMS key or on any KMS key in a different Amazon Web Services account. For more information about creating KMS keys with no key material
14
- * and then importing key material, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a> in the
15
- * <i>Key Management Service Developer Guide</i>.</p>
16
- * <p>Before using this operation, call <a>GetParametersForImport</a>. Its response
17
- * includes a public key and an import token. Use the public key to encrypt the key material.
18
- * Then, submit the import token from the same <code>GetParametersForImport</code>
19
- * response.</p>
20
- * <p>When calling this operation, you must specify the following values:</p>
21
- * <ul>
22
- * <li>
23
- * <p>The key ID or key ARN of a KMS key with no key material. Its <code>Origin</code> must
24
- * be <code>EXTERNAL</code>.</p>
25
- * <p>To create a KMS key with no key material, call <a>CreateKey</a> and set the
26
- * value of its <code>Origin</code> parameter to <code>EXTERNAL</code>. To get the
27
- * <code>Origin</code> of a KMS key, call <a>DescribeKey</a>.)</p>
28
- * </li>
29
- * <li>
30
- * <p>The encrypted key material. To get the public key to encrypt the key material, call
31
- * <a>GetParametersForImport</a>.</p>
32
- * </li>
33
- * <li>
34
- * <p>The import token that <a>GetParametersForImport</a> returned. You must use
35
- * a public key and token from the same <code>GetParametersForImport</code> response.</p>
36
- * </li>
37
- * <li>
38
- * <p>Whether the key material expires and if so, when. If you set an expiration date, KMS
39
- * deletes the key material from the KMS key on the specified date, and the KMS key becomes
40
- * unusable. To use the KMS key again, you must reimport the same key material. The only way
41
- * to change an expiration date is by reimporting the same key material and specifying a new
42
- * expiration date. </p>
43
- * </li>
44
- * </ul>
45
- * <p>When this operation is successful, the key state of the KMS key changes from
46
- * <code>PendingImport</code> to <code>Enabled</code>, and you can use the KMS key.</p>
47
- * <p>If this operation fails, use the exception to help determine the problem. If the error is
48
- * related to the key material, the import token, or wrapping key, use <a>GetParametersForImport</a> to get a new public key and import token for the KMS key
49
- * and repeat the import procedure. For help, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview">How To Import Key
50
- * Material</a> in the <i>Key Management Service Developer Guide</i>.</p>
51
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
52
- * 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>
53
- * <p>
54
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
55
- *
56
- * <p>
57
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ImportKeyMaterial</a> (key policy)</p>
58
- * <p>
59
- * <b>Related operations:</b>
60
- * </p>
61
- * <ul>
62
- * <li>
63
- * <p>
64
- * <a>DeleteImportedKeyMaterial</a>
65
- * </p>
66
- * </li>
67
- * <li>
68
- * <p>
69
- * <a>GetParametersForImport</a>
70
- * </p>
71
- * </li>
72
- * </ul>
73
- * @example
74
- * Use a bare-bones client and the command you need to make an API call.
75
- * ```javascript
76
- * import { KMSClient, ImportKeyMaterialCommand } from "@aws-sdk/client-kms"; // ES Modules import
77
- * // const { KMSClient, ImportKeyMaterialCommand } = require("@aws-sdk/client-kms"); // CommonJS import
78
- * const client = new KMSClient(config);
79
- * const command = new ImportKeyMaterialCommand(input);
80
- * const response = await client.send(command);
81
- * ```
82
- *
83
- * @see {@link ImportKeyMaterialCommandInput} for command's `input` shape.
84
- * @see {@link ImportKeyMaterialCommandOutput} for command's `response` shape.
85
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
86
- *
87
- */
88
8
  class ImportKeyMaterialCommand extends smithy_client_1.Command {
89
- // Start section: command_properties
90
- // End section: command_properties
91
9
  constructor(input) {
92
- // Start section: command_constructor
93
10
  super();
94
11
  this.input = input;
95
- // End section: command_constructor
96
12
  }
97
- /**
98
- * @internal
99
- */
100
13
  resolveMiddleware(clientStack, configuration, options) {
101
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
102
15
  const stack = clientStack.concat(this.middlewareStack);
@@ -5,77 +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>Gets a list of aliases in the caller's Amazon Web Services account and region. For more information
10
- * about aliases, see <a>CreateAlias</a>.</p>
11
- * <p>By default, the <code>ListAliases</code> operation returns all aliases in the account and
12
- * region. To get only the aliases associated with a particular KMS key, use the
13
- * <code>KeyId</code> parameter.</p>
14
- * <p>The <code>ListAliases</code> response can include aliases that you created and associated
15
- * with your customer managed keys, and aliases that Amazon Web Services created and associated with Amazon Web Services
16
- * managed keys in your account. You can recognize Amazon Web Services aliases because their names have the
17
- * format <code>aws/<service-name></code>, such as <code>aws/dynamodb</code>.</p>
18
- * <p>The response might also include aliases that have no <code>TargetKeyId</code> field. These
19
- * are predefined aliases that Amazon Web Services has created but has not yet associated with a KMS key.
20
- * Aliases that Amazon Web Services creates in your account, including predefined aliases, do not count against
21
- * your <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit">KMS aliases
22
- * quota</a>.</p>
23
- * <p>
24
- * <b>Cross-account use</b>: No. <code>ListAliases</code> does not
25
- * return aliases in other Amazon Web Services accounts.</p>
26
- *
27
- *
28
- * <p>
29
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListAliases</a> (IAM policy)</p>
30
- * <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
31
- * <i>Key Management Service Developer Guide</i>.</p>
32
- * <p>
33
- * <b>Related operations:</b>
34
- * </p>
35
- * <ul>
36
- * <li>
37
- * <p>
38
- * <a>CreateAlias</a>
39
- * </p>
40
- * </li>
41
- * <li>
42
- * <p>
43
- * <a>DeleteAlias</a>
44
- * </p>
45
- * </li>
46
- * <li>
47
- * <p>
48
- * <a>UpdateAlias</a>
49
- * </p>
50
- * </li>
51
- * </ul>
52
- * @example
53
- * Use a bare-bones client and the command you need to make an API call.
54
- * ```javascript
55
- * import { KMSClient, ListAliasesCommand } from "@aws-sdk/client-kms"; // ES Modules import
56
- * // const { KMSClient, ListAliasesCommand } = require("@aws-sdk/client-kms"); // CommonJS import
57
- * const client = new KMSClient(config);
58
- * const command = new ListAliasesCommand(input);
59
- * const response = await client.send(command);
60
- * ```
61
- *
62
- * @see {@link ListAliasesCommandInput} for command's `input` shape.
63
- * @see {@link ListAliasesCommandOutput} for command's `response` shape.
64
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
65
- *
66
- */
67
8
  class ListAliasesCommand extends smithy_client_1.Command {
68
- // Start section: command_properties
69
- // End section: command_properties
70
9
  constructor(input) {
71
- // Start section: command_constructor
72
10
  super();
73
11
  this.input = input;
74
- // End section: command_constructor
75
12
  }
76
- /**
77
- * @internal
78
- */
79
13
  resolveMiddleware(clientStack, configuration, options) {
80
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
81
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>Gets a list of all grants for the specified KMS key. </p>
10
- * <p>You must specify the KMS key in all requests. You can filter the grant list by grant ID or
11
- * grantee principal.</p>
12
- * <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
13
- * <i>
14
- * <i>Key Management Service Developer Guide</i>
15
- * </i>. For examples of working with grants in several
16
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
17
- * <note>
18
- * <p>The <code>GranteePrincipal</code> field in the <code>ListGrants</code> response usually contains the
19
- * user or role designated as the grantee principal in the grant. However, when the grantee
20
- * principal in the grant is an Amazon Web Services service, the <code>GranteePrincipal</code> field contains
21
- * the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">service
22
- * principal</a>, which might represent several different grantee principals.</p>
23
- * </note>
24
- * <p>
25
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
26
- * ARN in the value of the <code>KeyId</code> parameter.</p>
27
- *
28
- * <p>
29
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListGrants</a> (key policy)</p>
30
- * <p>
31
- * <b>Related operations:</b>
32
- * </p>
33
- * <ul>
34
- * <li>
35
- * <p>
36
- * <a>CreateGrant</a>
37
- * </p>
38
- * </li>
39
- * <li>
40
- * <p>
41
- * <a>ListRetirableGrants</a>
42
- * </p>
43
- * </li>
44
- * <li>
45
- * <p>
46
- * <a>RetireGrant</a>
47
- * </p>
48
- * </li>
49
- * <li>
50
- * <p>
51
- * <a>RevokeGrant</a>
52
- * </p>
53
- * </li>
54
- * </ul>
55
- * @example
56
- * Use a bare-bones client and the command you need to make an API call.
57
- * ```javascript
58
- * import { KMSClient, ListGrantsCommand } from "@aws-sdk/client-kms"; // ES Modules import
59
- * // const { KMSClient, ListGrantsCommand } = require("@aws-sdk/client-kms"); // CommonJS import
60
- * const client = new KMSClient(config);
61
- * const command = new ListGrantsCommand(input);
62
- * const response = await client.send(command);
63
- * ```
64
- *
65
- * @see {@link ListGrantsCommandInput} for command's `input` shape.
66
- * @see {@link ListGrantsCommandOutput} for command's `response` shape.
67
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
68
- *
69
- */
70
8
  class ListGrantsCommand 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,57 +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>Gets the names of the key policies that are attached to a KMS key. This operation is
10
- * designed to get policy names that you can use in a <a>GetKeyPolicy</a> operation.
11
- * However, the only valid policy name is <code>default</code>. </p>
12
- * <p>
13
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
14
- *
15
- * <p>
16
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListKeyPolicies</a> (key policy)</p>
17
- * <p>
18
- * <b>Related operations:</b>
19
- * </p>
20
- * <ul>
21
- * <li>
22
- * <p>
23
- * <a>GetKeyPolicy</a>
24
- * </p>
25
- * </li>
26
- * <li>
27
- * <p>
28
- * <a>PutKeyPolicy</a>
29
- * </p>
30
- * </li>
31
- * </ul>
32
- * @example
33
- * Use a bare-bones client and the command you need to make an API call.
34
- * ```javascript
35
- * import { KMSClient, ListKeyPoliciesCommand } from "@aws-sdk/client-kms"; // ES Modules import
36
- * // const { KMSClient, ListKeyPoliciesCommand } = require("@aws-sdk/client-kms"); // CommonJS import
37
- * const client = new KMSClient(config);
38
- * const command = new ListKeyPoliciesCommand(input);
39
- * const response = await client.send(command);
40
- * ```
41
- *
42
- * @see {@link ListKeyPoliciesCommandInput} for command's `input` shape.
43
- * @see {@link ListKeyPoliciesCommandOutput} for command's `response` shape.
44
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
45
- *
46
- */
47
8
  class ListKeyPoliciesCommand extends smithy_client_1.Command {
48
- // Start section: command_properties
49
- // End section: command_properties
50
9
  constructor(input) {
51
- // Start section: command_constructor
52
10
  super();
53
11
  this.input = input;
54
- // End section: command_constructor
55
12
  }
56
- /**
57
- * @internal
58
- */
59
13
  resolveMiddleware(clientStack, configuration, options) {
60
14
  this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
61
15
  const stack = clientStack.concat(this.middlewareStack);