Skip to content

Commit 93257dc

Browse files
author
awstools
committed
docs(client-kms): This release updates AWS CLI examples for KMS APIs.
1 parent e92f7fb commit 93257dc

File tree

9 files changed

+191
-175
lines changed

9 files changed

+191
-175
lines changed

clients/client-kms/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/">
1616
<note>
1717
<p>KMS has replaced the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
1818
<p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
19-
languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a
20-
convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,
21-
the SDKs take care of tasks such as signing requests (see below), managing errors, and
22-
retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to
23-
download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
24-
Services</a>.</p>
19+
languages and platforms (Java, Rust, Python, Ruby, .Net, macOS, Android, etc.). The SDKs
20+
provide a convenient way to create programmatic access to KMS and other Amazon Web Services services.
21+
For example, the SDKs take care of tasks such as signing requests (see below), managing
22+
errors, and retrying requests automatically. For more information about the Amazon Web Services SDKs,
23+
including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
24+
for Amazon Web Services</a>.</p>
2525
</note>
2626
<p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
2727
<p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
28-
Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
29-
available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of
30-
the <i>Amazon Web Services General Reference</i>.</p>
28+
Amazon Web Services, use one of the FIPS endpoints in your preferred Amazon Web Services Region. If you need communicate
29+
over IPv6, use the dual-stack endpoint in your preferred Amazon Web Services Region. For more information
30+
see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service
31+
endpoints</a> in the Key Management Service topic of the <i>Amazon Web Services General Reference</i> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/ipv6-kms.html">Dual-stack endpoint
32+
support</a> in the KMS Developer Guide.</p>
3133
<p>All KMS API calls must be signed and be transmitted using Transport Layer Security
3234
(TLS). KMS recommends you always use the latest supported TLS version. Clients must also
3335
support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman

clients/client-kms/src/KMS.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -991,18 +991,20 @@ export interface KMS {
991991
* <note>
992992
* <p>KMS has replaced the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
993993
* <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
994-
* languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a
995-
* convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,
996-
* the SDKs take care of tasks such as signing requests (see below), managing errors, and
997-
* retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to
998-
* download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
999-
* Services</a>.</p>
994+
* languages and platforms (Java, Rust, Python, Ruby, .Net, macOS, Android, etc.). The SDKs
995+
* provide a convenient way to create programmatic access to KMS and other Amazon Web Services services.
996+
* For example, the SDKs take care of tasks such as signing requests (see below), managing
997+
* errors, and retrying requests automatically. For more information about the Amazon Web Services SDKs,
998+
* including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
999+
* for Amazon Web Services</a>.</p>
10001000
* </note>
10011001
* <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
10021002
* <p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
1003-
* Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
1004-
* available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of
1005-
* the <i>Amazon Web Services General Reference</i>.</p>
1003+
* Amazon Web Services, use one of the FIPS endpoints in your preferred Amazon Web Services Region. If you need communicate
1004+
* over IPv6, use the dual-stack endpoint in your preferred Amazon Web Services Region. For more information
1005+
* see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service
1006+
* endpoints</a> in the Key Management Service topic of the <i>Amazon Web Services General Reference</i> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/ipv6-kms.html">Dual-stack endpoint
1007+
* support</a> in the KMS Developer Guide.</p>
10061008
* <p>All KMS API calls must be signed and be transmitted using Transport Layer Security
10071009
* (TLS). KMS recommends you always use the latest supported TLS version. Clients must also
10081010
* support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman

clients/client-kms/src/KMSClient.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -481,18 +481,20 @@ export interface KMSClientResolvedConfig extends KMSClientResolvedConfigType {}
481481
* <note>
482482
* <p>KMS has replaced the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
483483
* <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
484-
* languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a
485-
* convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,
486-
* the SDKs take care of tasks such as signing requests (see below), managing errors, and
487-
* retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to
488-
* download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
489-
* Services</a>.</p>
484+
* languages and platforms (Java, Rust, Python, Ruby, .Net, macOS, Android, etc.). The SDKs
485+
* provide a convenient way to create programmatic access to KMS and other Amazon Web Services services.
486+
* For example, the SDKs take care of tasks such as signing requests (see below), managing
487+
* errors, and retrying requests automatically. For more information about the Amazon Web Services SDKs,
488+
* including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools
489+
* for Amazon Web Services</a>.</p>
490490
* </note>
491491
* <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
492492
* <p>If you need to use FIPS 140-2 validated cryptographic modules when communicating with
493-
* Amazon Web Services, use the FIPS endpoint in your preferred Amazon Web Services Region. For more information about the
494-
* available FIPS endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service endpoints</a> in the Key Management Service topic of
495-
* the <i>Amazon Web Services General Reference</i>.</p>
493+
* Amazon Web Services, use one of the FIPS endpoints in your preferred Amazon Web Services Region. If you need communicate
494+
* over IPv6, use the dual-stack endpoint in your preferred Amazon Web Services Region. For more information
495+
* see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">Service
496+
* endpoints</a> in the Key Management Service topic of the <i>Amazon Web Services General Reference</i> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/ipv6-kms.html">Dual-stack endpoint
497+
* support</a> in the KMS Developer Guide.</p>
496498
* <p>All KMS API calls must be signed and be transmitted using Transport Layer Security
497499
* (TLS). KMS recommends you always use the latest supported TLS version. Clients must also
498500
* support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman

clients/client-kms/src/commands/ImportKeyMaterialCommand.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,36 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
2929

3030
/**
3131
* <p>Imports or reimports key material into an existing KMS key that was created without key
32-
* material. You can also use this operation to set or update the expiration model and expiration date of
33-
* the imported key material.</p>
34-
* <p>By default, KMS creates KMS keys with key material that it generates. You can also generate and
35-
* import your own key material. For more information about importing key material, see
36-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing key
32+
* material. You can also use this operation to set or update the expiration model and expiration
33+
* date of the imported key material.</p>
34+
* <p>By default, KMS creates KMS keys with key material that it generates. You can also
35+
* generate and import your own key material. For more information about importing key material,
36+
* see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing key
3737
* material</a>.</p>
38-
* <p>For asymmetric, HMAC and multi-Region keys, you cannot change the key material after the initial import.
39-
* You can import multiple key materials into single-Region, symmetric encryption keys and rotate the key material
40-
* on demand using <code>RotateKeyOnDemand</code>.</p>
38+
* <p>For asymmetric, HMAC and multi-Region keys, you cannot change the key material after the
39+
* initial import. You can import multiple key materials into single-Region, symmetric encryption
40+
* keys and rotate the key material on demand using <code>RotateKeyOnDemand</code>.</p>
4141
* <p>After you import key material, you can <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#reimport-key-material">reimport
42-
* the same key material</a> into that KMS key or, if the key supports on-demand rotation,
43-
* import new key material. You can use the <code>ImportType</code> parameter to indicate
44-
* whether you are importing new key material or re-importing previously imported key material.
45-
* You might reimport key material to replace key material that expired or key material
46-
* that you deleted. You might also reimport key material to change the expiration model or
47-
* expiration date of the key material.</p>
42+
* the same key material</a> into that KMS key or, if the key supports on-demand rotation,
43+
* import new key material. You can use the <code>ImportType</code> parameter to indicate whether
44+
* you are importing new key material or re-importing previously imported key material. You might
45+
* reimport key material to replace key material that expired or key material that you deleted.
46+
* You might also reimport key material to change the expiration model or expiration date of the
47+
* key material.</p>
4848
* <p>Each time you import key material into KMS, you can determine whether
4949
* (<code>ExpirationModel</code>) and when (<code>ValidTo</code>) the key material expires. To
5050
* change the expiration of your key material, you must import it again, either by calling
5151
* <code>ImportKeyMaterial</code> or using the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-import-key-material.html#importing-keys-import-key-material-console">import features</a> of the KMS console.</p>
5252
* <p>Before you call <code>ImportKeyMaterial</code>, complete these steps:</p>
5353
* <ul>
5454
* <li>
55-
* <p>Create or identify a KMS key with <code>EXTERNAL</code> origin, which indicates that the KMS key is
56-
* designed for imported key material. </p>
55+
* <p>Create or identify a KMS key with <code>EXTERNAL</code> origin, which indicates that
56+
* the KMS key is designed for imported key material. </p>
5757
* <p>To create a new KMS key for imported key material, call the <a>CreateKey</a> operation with an <code>Origin</code> value of <code>EXTERNAL</code>. You can create a
58-
* symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, asymmetric key agreement key,
59-
* or asymmetric signing KMS key. You can also import key material into a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">multi-Region key</a> of any
60-
* supported type. However, you can't import key material into a KMS key in a
61-
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html">custom key store</a>.</p>
58+
* symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, asymmetric key
59+
* agreement key, or asymmetric signing KMS key. You can also import key material into a
60+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">multi-Region key</a> of any supported type. However, you can't import key material
61+
* into a KMS key in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html">custom key store</a>.</p>
6262
* </li>
6363
* <li>
6464
* <p>Call the <a>GetParametersForImport</a> operation to get a public key and
@@ -100,9 +100,9 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
100100
* <p>When this operation is successful, the key state of the KMS key changes from
101101
* <code>PendingImport</code> to <code>Enabled</code>, and you can use the KMS key in
102102
* cryptographic operations. For single-Region, symmetric encryption keys, you will need to
103-
* import all of the key materials associated with the KMS key to change its state to <code>Enabled</code>.
104-
* Use the <code>ListKeyRotations</code> operation to list the ID and import state of each key material
105-
* associated with a KMS key.</p>
103+
* import all of the key materials associated with the KMS key to change its state to
104+
* <code>Enabled</code>. Use the <code>ListKeyRotations</code> operation to list the ID and
105+
* import state of each key material associated with a KMS key.</p>
106106
* <p>If this operation fails, use the exception to help determine the problem. If the error is
107107
* 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
108108
* and repeat the import procedure. For help, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-conceptual.html">Create a KMS key with imported key
@@ -182,9 +182,9 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
182182
*
183183
* @throws {@link IncorrectKeyMaterialException} (client fault)
184184
* <p>The request was rejected because the key material in the request is, expired, invalid, or
185-
* does not meet expectations. For example, it is not the same key material that was previously imported or
186-
* KMS expected new key material but the key material being imported is already associated with
187-
* the KMS key.</p>
185+
* does not meet expectations. For example, it is not the same key material that was previously
186+
* imported or KMS expected new key material but the key material being imported is already
187+
* associated with the KMS key.</p>
188188
*
189189
* @throws {@link InvalidArnException} (client fault)
190190
* <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not

clients/client-kms/src/commands/ListKeyRotationsCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export interface ListKeyRotationsCommandInput extends ListKeyRotationsRequest {}
2828
export interface ListKeyRotationsCommandOutput extends ListKeyRotationsResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Returns information about the key materials associated with the specified KMS
32-
* key. You can use the optional <code>IncludeKeyMaterial</code> parameter to control which key materials
33-
* are included in the response.</p>
31+
* <p>Returns information about the key materials associated with the specified KMS key. You can
32+
* use the optional <code>IncludeKeyMaterial</code> parameter to control which key materials are
33+
* included in the response.</p>
3434
* <p>You must specify the KMS key in all requests. You can refine the key rotations list by
3535
* limiting the number of rotations returned.</p>
3636
* <p>For detailed information about automatic and on-demand key rotations, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">Rotate KMS keys</a> in the

0 commit comments

Comments
 (0)