You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docgenerator/AWSSDKDocSamples/KeyManagementService.GeneratedSamples.extra.xml
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,7 @@
181
181
<value>
182
182
<example>
183
183
<para>
184
-
This example creates a KMS key that contains an asymmetric elliptic curve (ECC) key pair for signing and verification. The key usage is required even though "SIGN_VERIFY" is the only valid value for ECC KMS keys. The key spec and key usage can't be changed after the key is created.
184
+
This example creates a KMS key that contains an asymmetric elliptic curve (ECC) key pair for signing and verification. The key spec and key usage can't be changed after the key is created.
185
185
</para>
186
186
<code
187
187
title="To create an asymmetric elliptic curve KMS key for signing and verification"
This example creates a module-lattice digital signature algorithm (ML-DSA) key for signing and verification. The key-usage parameter is required even though SIGN_VERIFY is the only valid value for ML-DSA keys.
223
+
</para>
224
+
<code
225
+
title="To create an asymmetric ML-DSA KMS key for signing and verification"
@@ -279,6 +295,7 @@ public void KeyManagementServiceDecrypt()
279
295
280
296
stringencryptionAlgorithm=response.EncryptionAlgorithm;// The encryption algorithm that was used to decrypt the ciphertext. SYMMETRIC_DEFAULT is the only valid value for symmetric encryption in AWS KMS.
281
297
stringkeyId=response.KeyId;// The Amazon Resource Name (ARN) of the KMS key that was used to decrypt the data.
298
+
stringkeyMaterialId=response.KeyMaterialId;// The identifier of the key material used to decrypt the ciphertext.
282
299
MemoryStreamplaintext=response.Plaintext;// The decrypted (plaintext) data.
283
300
284
301
#endregion
@@ -360,7 +377,8 @@ public void KeyManagementServiceDeleteImportedKeyMaterial()
KeyId="1234abcd-12ab-34cd-56ef-1234567890ab"// The identifier of the KMS key whose imported key material you are deleting. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
380
+
KeyId="1234abcd-12ab-34cd-56ef-1234567890ab",// The identifier of the KMS key whose imported key material you are deleting. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
381
+
KeyMaterialId="0b7fd7ddbac6eef27907413567cad8c810e2883dc8a7534067a82ee1142fc1e6"// Identifies the deleted key material.
364
382
});
365
383
366
384
@@ -657,6 +675,7 @@ public void KeyManagementServiceGenerateDataKey()
657
675
658
676
MemoryStreamciphertextBlob=response.CiphertextBlob;// The encrypted data key.
659
677
stringkeyId=response.KeyId;// The ARN of the KMS key that was used to encrypt the data key.
678
+
stringkeyMaterialId=response.KeyMaterialId;// The identifier of the key material used to encrypt the data key.
660
679
MemoryStreamplaintext=response.Plaintext;// The unencrypted (plaintext) data key.
661
680
662
681
#endregion
@@ -697,6 +716,7 @@ public void KeyManagementServiceGenerateDataKeyPair()
697
716
});
698
717
699
718
stringkeyId=response.KeyId;// The key ARN of the symmetric encryption KMS key that was used to encrypt the private key.
719
+
stringkeyMaterialId=response.KeyMaterialId;// The identifier of the key material used to encrypt the private key.
700
720
stringkeyPairSpec=response.KeyPairSpec;// The actual key spec of the RSA data key pair.
701
721
MemoryStreamprivateKeyCiphertextBlob=response.PrivateKeyCiphertextBlob;// The encrypted private key of the RSA data key pair.
702
722
MemoryStreamprivateKeyPlaintext=response.PrivateKeyPlaintext;// The plaintext private key of the RSA data key pair.
@@ -722,6 +742,7 @@ public void KeyManagementServiceGenerateDataKeyPair()
722
742
723
743
MemoryStreamciphertextForRecipient=response.CiphertextForRecipient;// The private key of the RSA data key pair encrypted by the public key from the attestation document
724
744
stringkeyId=response.KeyId;// The key ARN of the symmetric encryption KMS key that was used to encrypt the PrivateKeyCiphertextBlob.
745
+
stringkeyMaterialId=response.KeyMaterialId;// The identifier of the key material used to encrypt the private key.
725
746
stringkeyPairSpec=response.KeyPairSpec;// The actual key spec of the RSA data key pair.
726
747
MemoryStreamprivateKeyCiphertextBlob=response.PrivateKeyCiphertextBlob;// The private key of the RSA data key pair encrypted by the KMS key.
727
748
MemoryStreamprivateKeyPlaintext=response.PrivateKeyPlaintext;// This field is null or empty
@@ -742,6 +763,7 @@ public void KeyManagementServiceGenerateDataKeyPairWithoutPlaintext()
742
763
});
743
764
744
765
stringkeyId=response.KeyId;// The key ARN of the symmetric encryption KMS key that encrypted the private key in the ECC asymmetric data key pair.
766
+
stringkeyMaterialId=response.KeyMaterialId;// The identifier of the key material used to encrypt the private key.
745
767
stringkeyPairSpec=response.KeyPairSpec;// The actual key spec of the ECC asymmetric data key pair.
746
768
MemoryStreamprivateKeyCiphertextBlob=response.PrivateKeyCiphertextBlob;// The encrypted private key of the asymmetric ECC data key pair.
747
769
MemoryStreampublicKey=response.PublicKey;// The public key (plaintext).
@@ -762,6 +784,7 @@ public void KeyManagementServiceGenerateDataKeyWithoutPlaintext()
762
784
763
785
MemoryStreamciphertextBlob=response.CiphertextBlob;// The encrypted data key.
764
786
stringkeyId=response.KeyId;// The ARN of the KMS key that was used to encrypt the data key.
787
+
stringkeyMaterialId=response.KeyMaterialId;// The identifier of the key material used to encrypt the data key.
765
788
766
789
#endregion
767
790
}
@@ -967,6 +990,8 @@ public void KeyManagementServiceImportKeyMaterial()
967
990
KeyId="1234abcd-12ab-34cd-56ef-1234567890ab"// The identifier of the KMS key to import the key material into. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
968
991
});
969
992
993
+
stringkeyId=response.KeyId;// The Amazon Resource Name (ARN) of the KMS key into which key material was imported.
994
+
stringkeyMaterialId=response.KeyMaterialId;// Identifies the imported key material.
970
995
971
996
#endregion
972
997
}
@@ -985,6 +1010,8 @@ public void KeyManagementServiceImportKeyMaterial()
985
1010
ValidTo=newDateTime(2023,9,30,12,0,0,DateTimeKind.Utc)// Specifies the date and time when the imported key material expires.
986
1011
});
987
1012
1013
+
stringkeyId=response.KeyId;// The Amazon Resource Name (ARN) of the KMS key into which key material was imported.
1014
+
stringkeyMaterialId=response.KeyMaterialId;// Identifies the imported key material.
988
1015
989
1016
#endregion
990
1017
}
@@ -1200,8 +1227,12 @@ public void KeyManagementServiceReEncrypt()
1200
1227
});
1201
1228
1202
1229
MemoryStream ciphertextBlob =response.CiphertextBlob;// The reencrypted data.
1230
+
stringdestinationEncryptionAlgorithm=response.DestinationEncryptionAlgorithm;// The encryption algorithm that was used to reencrypt the data.
1231
+
stringdestinationKeyMaterialId=response.DestinationKeyMaterialId;// The identifier of the key material used to reencrypt the data.
1203
1232
stringkeyId=response.KeyId;// The ARN of the KMS key that was used to reencrypt the data.
1233
+
stringsourceEncryptionAlgorithm=response.SourceEncryptionAlgorithm;// The encryption algorithm that was used to decrypt the ciphertext before it was reencrypted.
1204
1234
stringsourceKeyId=response.SourceKeyId;// The ARN of the KMS key that was originally used to encrypt the data.
1235
+
stringsourceKeyMaterialId=response.SourceKeyMaterialId;// The identifier of the key material used to originally encrypt the data.
0 commit comments