aws-sdk-kms 1.79.0 → 1.91.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +60 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-kms/client.rb +428 -83
- data/lib/aws-sdk-kms/client_api.rb +42 -0
- data/lib/aws-sdk-kms/endpoints.rb +63 -208
- data/lib/aws-sdk-kms/plugins/endpoints.rb +12 -1
- data/lib/aws-sdk-kms/types.rb +231 -19
- data/lib/aws-sdk-kms.rb +1 -1
- data/sig/client.rbs +30 -5
- data/sig/resource.rbs +2 -0
- data/sig/types.rbs +28 -7
- metadata +6 -6
data/lib/aws-sdk-kms/client.rb
CHANGED
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
22
22
|
require 'aws-sdk-core/plugins/response_paging.rb'
|
23
23
|
require 'aws-sdk-core/plugins/stub_responses.rb'
|
24
24
|
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id.rb'
|
25
26
|
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
26
27
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
27
28
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
@@ -31,6 +32,7 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
|
31
32
|
require 'aws-sdk-core/plugins/request_compression.rb'
|
32
33
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
33
34
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
35
|
+
require 'aws-sdk-core/plugins/telemetry.rb'
|
34
36
|
require 'aws-sdk-core/plugins/sign.rb'
|
35
37
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
36
38
|
|
@@ -72,6 +74,7 @@ module Aws::KMS
|
|
72
74
|
add_plugin(Aws::Plugins::ResponsePaging)
|
73
75
|
add_plugin(Aws::Plugins::StubResponses)
|
74
76
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
77
|
+
add_plugin(Aws::Plugins::InvocationId)
|
75
78
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
76
79
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
77
80
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
@@ -81,12 +84,18 @@ module Aws::KMS
|
|
81
84
|
add_plugin(Aws::Plugins::RequestCompression)
|
82
85
|
add_plugin(Aws::Plugins::DefaultsMode)
|
83
86
|
add_plugin(Aws::Plugins::RecursionDetection)
|
87
|
+
add_plugin(Aws::Plugins::Telemetry)
|
84
88
|
add_plugin(Aws::Plugins::Sign)
|
85
89
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
86
90
|
add_plugin(Aws::KMS::Plugins::Endpoints)
|
87
91
|
|
88
92
|
# @overload initialize(options)
|
89
93
|
# @param [Hash] options
|
94
|
+
#
|
95
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
96
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
97
|
+
# class name or an instance of a plugin class.
|
98
|
+
#
|
90
99
|
# @option options [required, Aws::CredentialProvider] :credentials
|
91
100
|
# Your AWS credentials. This can be an instance of any one of the
|
92
101
|
# following classes:
|
@@ -196,10 +205,16 @@ module Aws::KMS
|
|
196
205
|
# When set to 'true' the request body will not be compressed
|
197
206
|
# for supported operations.
|
198
207
|
#
|
199
|
-
# @option options [String] :endpoint
|
200
|
-
#
|
201
|
-
#
|
202
|
-
#
|
208
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
209
|
+
# Normally you should not configure the `:endpoint` option
|
210
|
+
# directly. This is normally constructed from the `:region`
|
211
|
+
# option. Configuring `:endpoint` is normally reserved for
|
212
|
+
# connecting to test or custom endpoints. The endpoint should
|
213
|
+
# be a URI formatted like:
|
214
|
+
#
|
215
|
+
# 'http://example.com'
|
216
|
+
# 'https://example.com'
|
217
|
+
# 'http://example.com:123'
|
203
218
|
#
|
204
219
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
205
220
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -289,25 +304,31 @@ module Aws::KMS
|
|
289
304
|
# throttling. This is a provisional mode that may change behavior
|
290
305
|
# in the future.
|
291
306
|
#
|
292
|
-
#
|
293
307
|
# @option options [String] :sdk_ua_app_id
|
294
308
|
# A unique and opaque application ID that is appended to the
|
295
|
-
# User-Agent header as app
|
296
|
-
# maximum length of 50.
|
309
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
310
|
+
# maximum length of 50. This variable is sourced from environment
|
311
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
297
312
|
#
|
298
313
|
# @option options [String] :secret_access_key
|
299
314
|
#
|
300
315
|
# @option options [String] :session_token
|
301
316
|
#
|
317
|
+
# @option options [Array] :sigv4a_signing_region_set
|
318
|
+
# A list of regions that should be signed with SigV4a signing. When
|
319
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
320
|
+
# in the following locations:
|
321
|
+
#
|
322
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
323
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
324
|
+
# * `~/.aws/config`
|
325
|
+
#
|
302
326
|
# @option options [Boolean] :simple_json (false)
|
303
327
|
# Disables request parameter conversion, validation, and formatting.
|
304
|
-
# Also
|
305
|
-
#
|
306
|
-
#
|
307
|
-
# structures.
|
308
|
-
#
|
309
|
-
# When `:simple_json` is enabled, the request parameters hash must
|
310
|
-
# be formatted exactly as the DynamoDB API expects.
|
328
|
+
# Also disables response data type conversions. The request parameters
|
329
|
+
# hash must be formatted exactly as the API expects.This option is useful
|
330
|
+
# when you want to ensure the highest level of performance by avoiding
|
331
|
+
# overhead of walking request parameters and response data structures.
|
311
332
|
#
|
312
333
|
# @option options [Boolean] :stub_responses (false)
|
313
334
|
# Causes the client to return stubbed responses. By default
|
@@ -318,6 +339,16 @@ module Aws::KMS
|
|
318
339
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
319
340
|
# requests are made, and retries are disabled.
|
320
341
|
#
|
342
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
343
|
+
# Allows you to provide a telemetry provider, which is used to
|
344
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
345
|
+
# will not record or emit any telemetry data. The SDK supports the
|
346
|
+
# following telemetry providers:
|
347
|
+
#
|
348
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
349
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
350
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
351
|
+
#
|
321
352
|
# @option options [Aws::TokenProvider] :token_provider
|
322
353
|
# A Bearer Token Provider. This can be an instance of any one of the
|
323
354
|
# following classes:
|
@@ -347,50 +378,71 @@ module Aws::KMS
|
|
347
378
|
# @option options [Aws::KMS::EndpointProvider] :endpoint_provider
|
348
379
|
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::KMS::EndpointParameters`
|
349
380
|
#
|
350
|
-
# @option options [
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
# @option options [Float] :
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
371
|
-
#
|
381
|
+
# @option options [Float] :http_continue_timeout (1)
|
382
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
383
|
+
# request body. This option has no effect unless the request has "Expect"
|
384
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
385
|
+
# behaviour. This value can safely be set per request on the session.
|
386
|
+
#
|
387
|
+
# @option options [Float] :http_idle_timeout (5)
|
388
|
+
# The number of seconds a connection is allowed to sit idle before it
|
389
|
+
# is considered stale. Stale connections are closed and removed from the
|
390
|
+
# pool before making a request.
|
391
|
+
#
|
392
|
+
# @option options [Float] :http_open_timeout (15)
|
393
|
+
# The default number of seconds to wait for response data.
|
394
|
+
# This value can safely be set per-request on the session.
|
395
|
+
#
|
396
|
+
# @option options [URI::HTTP,String] :http_proxy
|
397
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
398
|
+
#
|
399
|
+
# @option options [Float] :http_read_timeout (60)
|
400
|
+
# The default number of seconds to wait for response data.
|
401
|
+
# This value can safely be set per-request on the session.
|
402
|
+
#
|
403
|
+
# @option options [Boolean] :http_wire_trace (false)
|
404
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
405
|
+
#
|
406
|
+
# @option options [Proc] :on_chunk_received
|
407
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
408
|
+
# of the response body is received. It provides three arguments: the chunk,
|
409
|
+
# the number of bytes received, and the total number of
|
410
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
411
|
+
#
|
412
|
+
# @option options [Proc] :on_chunk_sent
|
413
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
414
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
415
|
+
# the number of bytes read from the body, and the total number of
|
416
|
+
# bytes in the body.
|
417
|
+
#
|
418
|
+
# @option options [Boolean] :raise_response_errors (true)
|
419
|
+
# When `true`, response errors are raised.
|
420
|
+
#
|
421
|
+
# @option options [String] :ssl_ca_bundle
|
422
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
423
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
424
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
425
|
+
#
|
426
|
+
# @option options [String] :ssl_ca_directory
|
427
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
428
|
+
# authority files for verifying peer certificates. If you do
|
429
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
430
|
+
# default will be used if available.
|
372
431
|
#
|
373
|
-
# @option options [
|
374
|
-
#
|
432
|
+
# @option options [String] :ssl_ca_store
|
433
|
+
# Sets the X509::Store to verify peer certificate.
|
375
434
|
#
|
376
|
-
# @option options [
|
377
|
-
#
|
435
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
436
|
+
# Sets a client certificate when creating http connections.
|
378
437
|
#
|
379
|
-
# @option options [
|
380
|
-
#
|
381
|
-
# connection.
|
438
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
439
|
+
# Sets a client key when creating http connections.
|
382
440
|
#
|
383
|
-
# @option options [
|
384
|
-
#
|
385
|
-
# verifying peer certificates. If you do not pass
|
386
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
387
|
-
# will be used if available.
|
441
|
+
# @option options [Float] :ssl_timeout
|
442
|
+
# Sets the SSL timeout in seconds
|
388
443
|
#
|
389
|
-
# @option options [
|
390
|
-
#
|
391
|
-
# authority files for verifying peer certificates. If you do
|
392
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
393
|
-
# system default will be used if available.
|
444
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
445
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
394
446
|
#
|
395
447
|
def initialize(*args)
|
396
448
|
super
|
@@ -1396,7 +1448,7 @@ module Aws::KMS
|
|
1396
1448
|
# key_id: "KeyIdType", # required
|
1397
1449
|
# grantee_principal: "PrincipalIdType", # required
|
1398
1450
|
# retiring_principal: "PrincipalIdType",
|
1399
|
-
# operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateMac, VerifyMac
|
1451
|
+
# operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateMac, VerifyMac, DeriveSharedSecret
|
1400
1452
|
# constraints: {
|
1401
1453
|
# encryption_context_subset: {
|
1402
1454
|
# "EncryptionContextKey" => "EncryptionContextValue",
|
@@ -1483,12 +1535,17 @@ module Aws::KMS
|
|
1483
1535
|
# key pair, or an SM2 key pair (China Regions only). The private key
|
1484
1536
|
# in an asymmetric KMS key never leaves KMS unencrypted. However, you
|
1485
1537
|
# can use the GetPublicKey operation to download the public key so it
|
1486
|
-
# can be used outside of KMS. KMS
|
1487
|
-
#
|
1488
|
-
#
|
1489
|
-
#
|
1490
|
-
#
|
1491
|
-
#
|
1538
|
+
# can be used outside of KMS. Each KMS key can have only one key
|
1539
|
+
# usage. KMS keys with RSA key pairs can be used to encrypt and
|
1540
|
+
# decrypt data or sign and verify messages (but not both). KMS keys
|
1541
|
+
# with NIST-recommended ECC key pairs can be used to sign and verify
|
1542
|
+
# messages or derive shared secrets (but not both). KMS keys with
|
1543
|
+
# `ECC_SECG_P256K1` can be used only to sign and verify messages. KMS
|
1544
|
+
# keys with SM2 key pairs (China Regions only) can be used to either
|
1545
|
+
# encrypt and decrypt data, sign and verify messages, or derive shared
|
1546
|
+
# secrets (you must choose one key usage type). For information about
|
1547
|
+
# asymmetric KMS keys, see [Asymmetric KMS keys][3] in the *Key
|
1548
|
+
# Management Service Developer Guide*.
|
1492
1549
|
#
|
1493
1550
|
#
|
1494
1551
|
#
|
@@ -1710,14 +1767,17 @@ module Aws::KMS
|
|
1710
1767
|
#
|
1711
1768
|
# * For HMAC KMS keys (symmetric), specify `GENERATE_VERIFY_MAC`.
|
1712
1769
|
#
|
1713
|
-
# * For asymmetric KMS keys with RSA key
|
1770
|
+
# * For asymmetric KMS keys with RSA key pairs, specify
|
1714
1771
|
# `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
|
1715
1772
|
#
|
1716
|
-
# * For asymmetric KMS keys with
|
1773
|
+
# * For asymmetric KMS keys with NIST-recommended elliptic curve key
|
1774
|
+
# pairs, specify `SIGN_VERIFY` or `KEY_AGREEMENT`.
|
1775
|
+
#
|
1776
|
+
# * For asymmetric KMS keys with `ECC_SECG_P256K1` key pairs specify
|
1717
1777
|
# `SIGN_VERIFY`.
|
1718
1778
|
#
|
1719
|
-
# * For asymmetric KMS keys with SM2 key
|
1720
|
-
# specify `ENCRYPT_DECRYPT` or `
|
1779
|
+
# * For asymmetric KMS keys with SM2 key pairs (China Regions only),
|
1780
|
+
# specify `ENCRYPT_DECRYPT`, `SIGN_VERIFY`, or `KEY_AGREEMENT`.
|
1721
1781
|
#
|
1722
1782
|
#
|
1723
1783
|
#
|
@@ -1770,7 +1830,8 @@ module Aws::KMS
|
|
1770
1830
|
#
|
1771
1831
|
# * `HMAC_512`
|
1772
1832
|
#
|
1773
|
-
# * Asymmetric RSA key pairs
|
1833
|
+
# * Asymmetric RSA key pairs (encryption and decryption -or- signing and
|
1834
|
+
# verification)
|
1774
1835
|
#
|
1775
1836
|
# * `RSA_2048`
|
1776
1837
|
#
|
@@ -1778,7 +1839,8 @@ module Aws::KMS
|
|
1778
1839
|
#
|
1779
1840
|
# * `RSA_4096`
|
1780
1841
|
#
|
1781
|
-
# * Asymmetric NIST-recommended elliptic curve key pairs
|
1842
|
+
# * Asymmetric NIST-recommended elliptic curve key pairs (signing and
|
1843
|
+
# verification -or- deriving shared secrets)
|
1782
1844
|
#
|
1783
1845
|
# * `ECC_NIST_P256` (secp256r1)
|
1784
1846
|
#
|
@@ -1786,15 +1848,16 @@ module Aws::KMS
|
|
1786
1848
|
#
|
1787
1849
|
# * `ECC_NIST_P521` (secp521r1)
|
1788
1850
|
#
|
1789
|
-
# * Other asymmetric elliptic curve key pairs
|
1851
|
+
# * Other asymmetric elliptic curve key pairs (signing and verification)
|
1790
1852
|
#
|
1791
1853
|
# * `ECC_SECG_P256K1` (secp256k1), commonly used for cryptocurrencies.
|
1792
1854
|
#
|
1793
1855
|
# ^
|
1794
1856
|
#
|
1795
|
-
# * SM2 key pairs (
|
1857
|
+
# * SM2 key pairs (encryption and decryption -or- signing and
|
1858
|
+
# verification -or- deriving shared secrets)
|
1796
1859
|
#
|
1797
|
-
# * `SM2`
|
1860
|
+
# * `SM2` (China Regions only)
|
1798
1861
|
#
|
1799
1862
|
# ^
|
1800
1863
|
#
|
@@ -2258,7 +2321,7 @@ module Aws::KMS
|
|
2258
2321
|
# resp = client.create_key({
|
2259
2322
|
# policy: "PolicyType",
|
2260
2323
|
# description: "DescriptionType",
|
2261
|
-
# key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC
|
2324
|
+
# key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC, KEY_AGREEMENT
|
2262
2325
|
# customer_master_key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT, HMAC_224, HMAC_256, HMAC_384, HMAC_512, SM2
|
2263
2326
|
# key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT, HMAC_224, HMAC_256, HMAC_384, HMAC_512, SM2
|
2264
2327
|
# origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM, EXTERNAL_KEY_STORE
|
@@ -2282,7 +2345,7 @@ module Aws::KMS
|
|
2282
2345
|
# resp.key_metadata.creation_date #=> Time
|
2283
2346
|
# resp.key_metadata.enabled #=> Boolean
|
2284
2347
|
# resp.key_metadata.description #=> String
|
2285
|
-
# resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
|
2348
|
+
# resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
|
2286
2349
|
# resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
|
2287
2350
|
# resp.key_metadata.deletion_date #=> Time
|
2288
2351
|
# resp.key_metadata.valid_to #=> Time
|
@@ -2297,6 +2360,8 @@ module Aws::KMS
|
|
2297
2360
|
# resp.key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
|
2298
2361
|
# resp.key_metadata.signing_algorithms #=> Array
|
2299
2362
|
# resp.key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
|
2363
|
+
# resp.key_metadata.key_agreement_algorithms #=> Array
|
2364
|
+
# resp.key_metadata.key_agreement_algorithms[0] #=> String, one of "ECDH"
|
2300
2365
|
# resp.key_metadata.multi_region #=> Boolean
|
2301
2366
|
# resp.key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
|
2302
2367
|
# resp.key_metadata.multi_region_configuration.primary_key.arn #=> String
|
@@ -2893,6 +2958,270 @@ module Aws::KMS
|
|
2893
2958
|
req.send_request(options)
|
2894
2959
|
end
|
2895
2960
|
|
2961
|
+
# Derives a shared secret using a key agreement algorithm.
|
2962
|
+
#
|
2963
|
+
# <note markdown="1"> You must use an asymmetric NIST-recommended elliptic curve (ECC) or
|
2964
|
+
# SM2 (China Regions only) KMS key pair with a `KeyUsage` value of
|
2965
|
+
# `KEY_AGREEMENT` to call DeriveSharedSecret.
|
2966
|
+
#
|
2967
|
+
# </note>
|
2968
|
+
#
|
2969
|
+
# DeriveSharedSecret uses the [Elliptic Curve Cryptography Cofactor
|
2970
|
+
# Diffie-Hellman Primitive][1] (ECDH) to establish a key agreement
|
2971
|
+
# between two peers by deriving a shared secret from their elliptic
|
2972
|
+
# curve public-private key pairs. You can use the raw shared secret that
|
2973
|
+
# DeriveSharedSecret returns to derive a symmetric key that can encrypt
|
2974
|
+
# and decrypt data that is sent between the two peers, or that can
|
2975
|
+
# generate and verify HMACs. KMS recommends that you follow [NIST
|
2976
|
+
# recommendations for key derivation][2] when using the raw shared
|
2977
|
+
# secret to derive a symmetric key.
|
2978
|
+
#
|
2979
|
+
# The following workflow demonstrates how to establish key agreement
|
2980
|
+
# over an insecure communication channel using DeriveSharedSecret.
|
2981
|
+
#
|
2982
|
+
# 1. **Alice** calls CreateKey to create an asymmetric KMS key pair
|
2983
|
+
# with a `KeyUsage` value of `KEY_AGREEMENT`.
|
2984
|
+
#
|
2985
|
+
# The asymmetric KMS key must use a NIST-recommended elliptic curve
|
2986
|
+
# (ECC) or SM2 (China Regions only) key spec.
|
2987
|
+
#
|
2988
|
+
# 2. **Bob** creates an elliptic curve key pair.
|
2989
|
+
#
|
2990
|
+
# Bob can call CreateKey to create an asymmetric KMS key pair or
|
2991
|
+
# generate a key pair outside of KMS. Bob's key pair must use the
|
2992
|
+
# same NIST-recommended elliptic curve (ECC) or SM2 (China Regions
|
2993
|
+
# ony) curve as Alice.
|
2994
|
+
#
|
2995
|
+
# 3. Alice and Bob **exchange their public keys** through an insecure
|
2996
|
+
# communication channel (like the internet).
|
2997
|
+
#
|
2998
|
+
# Use GetPublicKey to download the public key of your asymmetric KMS
|
2999
|
+
# key pair.
|
3000
|
+
#
|
3001
|
+
# <note markdown="1"> KMS strongly recommends verifying that the public key you receive
|
3002
|
+
# came from the expected party before using it to derive a shared
|
3003
|
+
# secret.
|
3004
|
+
#
|
3005
|
+
# </note>
|
3006
|
+
#
|
3007
|
+
# 4. **Alice** calls DeriveSharedSecret.
|
3008
|
+
#
|
3009
|
+
# KMS uses the private key from the KMS key pair generated in **Step
|
3010
|
+
# 1**, Bob's public key, and the Elliptic Curve Cryptography
|
3011
|
+
# Cofactor Diffie-Hellman Primitive to derive the shared secret. The
|
3012
|
+
# private key in your KMS key pair never leaves KMS unencrypted.
|
3013
|
+
# DeriveSharedSecret returns the raw shared secret.
|
3014
|
+
#
|
3015
|
+
# 5. **Bob** uses the Elliptic Curve Cryptography Cofactor
|
3016
|
+
# Diffie-Hellman Primitive to calculate the same raw secret using
|
3017
|
+
# his private key and Alice's public key.
|
3018
|
+
#
|
3019
|
+
# To derive a shared secret you must provide a key agreement algorithm,
|
3020
|
+
# the private key of the caller's asymmetric NIST-recommended elliptic
|
3021
|
+
# curve or SM2 (China Regions only) KMS key pair, and the public key
|
3022
|
+
# from your peer's NIST-recommended elliptic curve or SM2 (China
|
3023
|
+
# Regions only) key pair. The public key can be from another asymmetric
|
3024
|
+
# KMS key pair or from a key pair generated outside of KMS, but both key
|
3025
|
+
# pairs must be on the same elliptic curve.
|
3026
|
+
#
|
3027
|
+
# The KMS key that you use for this operation must be in a compatible
|
3028
|
+
# key state. For details, see [Key states of KMS keys][3] in the *Key
|
3029
|
+
# Management Service Developer Guide*.
|
3030
|
+
#
|
3031
|
+
# **Cross-account use**: Yes. To perform this operation with a KMS key
|
3032
|
+
# in a different Amazon Web Services account, specify the key ARN or
|
3033
|
+
# alias ARN in the value of the `KeyId` parameter.
|
3034
|
+
#
|
3035
|
+
# **Required permissions**: [kms:DeriveSharedSecret][4] (key policy)
|
3036
|
+
#
|
3037
|
+
# **Related operations:**
|
3038
|
+
#
|
3039
|
+
# * CreateKey
|
3040
|
+
#
|
3041
|
+
# * GetPublicKey
|
3042
|
+
#
|
3043
|
+
# * DescribeKey
|
3044
|
+
#
|
3045
|
+
# **Eventual consistency**: The KMS API follows an eventual consistency
|
3046
|
+
# model. For more information, see [KMS eventual consistency][5].
|
3047
|
+
#
|
3048
|
+
#
|
3049
|
+
#
|
3050
|
+
# [1]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60
|
3051
|
+
# [2]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf
|
3052
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
|
3053
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
3054
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
|
3055
|
+
#
|
3056
|
+
# @option params [required, String] :key_id
|
3057
|
+
# Identifies an asymmetric NIST-recommended ECC or SM2 (China Regions
|
3058
|
+
# only) KMS key. KMS uses the private key in the specified key pair to
|
3059
|
+
# derive the shared secret. The key usage of the KMS key must be
|
3060
|
+
# `KEY_AGREEMENT`. To find the `KeyUsage` of a KMS key, use the
|
3061
|
+
# DescribeKey operation.
|
3062
|
+
#
|
3063
|
+
# To specify a KMS key, use its key ID, key ARN, alias name, or alias
|
3064
|
+
# ARN. When using an alias name, prefix it with `"alias/"`. To specify a
|
3065
|
+
# KMS key in a different Amazon Web Services account, you must use the
|
3066
|
+
# key ARN or alias ARN.
|
3067
|
+
#
|
3068
|
+
# For example:
|
3069
|
+
#
|
3070
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
3071
|
+
#
|
3072
|
+
# * Key ARN:
|
3073
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
3074
|
+
#
|
3075
|
+
# * Alias name: `alias/ExampleAlias`
|
3076
|
+
#
|
3077
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
3078
|
+
#
|
3079
|
+
# To get the key ID and key ARN for a KMS key, use ListKeys or
|
3080
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
3081
|
+
#
|
3082
|
+
# @option params [required, String] :key_agreement_algorithm
|
3083
|
+
# Specifies the key agreement algorithm used to derive the shared
|
3084
|
+
# secret. The only valid value is `ECDH`.
|
3085
|
+
#
|
3086
|
+
# @option params [required, String, StringIO, File] :public_key
|
3087
|
+
# Specifies the public key in your peer's NIST-recommended elliptic
|
3088
|
+
# curve (ECC) or SM2 (China Regions only) key pair.
|
3089
|
+
#
|
3090
|
+
# The public key must be a DER-encoded X.509 public key, also known as
|
3091
|
+
# `SubjectPublicKeyInfo` (SPKI), as defined in [RFC 5280][1].
|
3092
|
+
#
|
3093
|
+
# GetPublicKey returns the public key of an asymmetric KMS key pair in
|
3094
|
+
# the required DER-encoded format.
|
3095
|
+
#
|
3096
|
+
# <note markdown="1"> If you use [Amazon Web Services CLI version 1][2], you must provide
|
3097
|
+
# the DER-encoded X.509 public key in a file. Otherwise, the Amazon Web
|
3098
|
+
# Services CLI Base64-encodes the public key a second time, resulting in
|
3099
|
+
# a `ValidationException`.
|
3100
|
+
#
|
3101
|
+
# </note>
|
3102
|
+
#
|
3103
|
+
# You can specify the public key as binary data in a file using fileb
|
3104
|
+
# (`fileb://<path-to-file>`) or in-line using a Base64 encoded string.
|
3105
|
+
#
|
3106
|
+
#
|
3107
|
+
#
|
3108
|
+
# [1]: https://tools.ietf.org/html/rfc5280
|
3109
|
+
# [2]: https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-welcome.html
|
3110
|
+
#
|
3111
|
+
# @option params [Array<String>] :grant_tokens
|
3112
|
+
# A list of grant tokens.
|
3113
|
+
#
|
3114
|
+
# Use a grant token when your permission to call this operation comes
|
3115
|
+
# from a new grant that has not yet achieved *eventual consistency*. For
|
3116
|
+
# more information, see [Grant token][1] and [Using a grant token][2] in
|
3117
|
+
# the *Key Management Service Developer Guide*.
|
3118
|
+
#
|
3119
|
+
#
|
3120
|
+
#
|
3121
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
|
3122
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
|
3123
|
+
#
|
3124
|
+
# @option params [Boolean] :dry_run
|
3125
|
+
# Checks if your request will succeed. `DryRun` is an optional
|
3126
|
+
# parameter.
|
3127
|
+
#
|
3128
|
+
# To learn more about how to use this parameter, see [Testing your KMS
|
3129
|
+
# API calls][1] in the *Key Management Service Developer Guide*.
|
3130
|
+
#
|
3131
|
+
#
|
3132
|
+
#
|
3133
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
|
3134
|
+
#
|
3135
|
+
# @option params [Types::RecipientInfo] :recipient
|
3136
|
+
# A signed [attestation document][1] from an Amazon Web Services Nitro
|
3137
|
+
# enclave and the encryption algorithm to use with the enclave's public
|
3138
|
+
# key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
|
3139
|
+
#
|
3140
|
+
# This parameter only supports attestation documents for Amazon Web
|
3141
|
+
# Services Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web
|
3142
|
+
# Services Nitro Enclaves, use the [Amazon Web Services Nitro Enclaves
|
3143
|
+
# SDK][2] to generate the attestation document and then use the
|
3144
|
+
# Recipient parameter from any Amazon Web Services SDK to provide the
|
3145
|
+
# attestation document for the enclave.
|
3146
|
+
#
|
3147
|
+
# When you use this parameter, instead of returning a plaintext copy of
|
3148
|
+
# the shared secret, KMS encrypts the plaintext shared secret under the
|
3149
|
+
# public key in the attestation document, and returns the resulting
|
3150
|
+
# ciphertext in the `CiphertextForRecipient` field in the response. This
|
3151
|
+
# ciphertext can be decrypted only with the private key in the enclave.
|
3152
|
+
# The `CiphertextBlob` field in the response contains the encrypted
|
3153
|
+
# shared secret derived from the KMS key specified by the `KeyId`
|
3154
|
+
# parameter and public key specified by the `PublicKey` parameter. The
|
3155
|
+
# `SharedSecret` field in the response is null or empty.
|
3156
|
+
#
|
3157
|
+
# For information about the interaction between KMS and Amazon Web
|
3158
|
+
# Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves
|
3159
|
+
# uses KMS][3] in the *Key Management Service Developer Guide*.
|
3160
|
+
#
|
3161
|
+
#
|
3162
|
+
#
|
3163
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
|
3164
|
+
# [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
|
3165
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
|
3166
|
+
#
|
3167
|
+
# @return [Types::DeriveSharedSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
3168
|
+
#
|
3169
|
+
# * {Types::DeriveSharedSecretResponse#key_id #key_id} => String
|
3170
|
+
# * {Types::DeriveSharedSecretResponse#shared_secret #shared_secret} => String
|
3171
|
+
# * {Types::DeriveSharedSecretResponse#ciphertext_for_recipient #ciphertext_for_recipient} => String
|
3172
|
+
# * {Types::DeriveSharedSecretResponse#key_agreement_algorithm #key_agreement_algorithm} => String
|
3173
|
+
# * {Types::DeriveSharedSecretResponse#key_origin #key_origin} => String
|
3174
|
+
#
|
3175
|
+
#
|
3176
|
+
# @example Example: To derive a shared secret
|
3177
|
+
#
|
3178
|
+
# # The following example derives a shared secret using a key agreement algorithm.
|
3179
|
+
#
|
3180
|
+
# resp = client.derive_shared_secret({
|
3181
|
+
# key_agreement_algorithm: "ECDH", # The key agreement algorithm used to derive the shared secret. The only valid value is ECDH.
|
3182
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The key identifier for an asymmetric KMS key pair. The private key in the specified key pair is used to derive the shared secret.
|
3183
|
+
# public_key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH3Yj0wbkLEpUl95Cv1cJVjsVNSjwGq3tCLnzXfhVwVvmzGN8pYj3U8nKwgouaHbBWNJYjP5VutbbkKS4Kv4GojwZBJyHN17kmxo8yTjRmjR15SKIQ8cqRA2uaERMLnpztIXdZp232PQPbWGxDyXYJ0aJ5EFSag", # The public key in your peer's asymmetric key pair.
|
3184
|
+
# })
|
3185
|
+
#
|
3186
|
+
# resp.to_h outputs the following:
|
3187
|
+
# {
|
3188
|
+
# key_agreement_algorithm: "ECDH", # The key agreement algorithm used to derive the shared secret.
|
3189
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The asymmetric KMS key pair used to derive the shared secret.
|
3190
|
+
# key_origin: "AWS_KMS", # The source of the key material for the specified KMS key.
|
3191
|
+
# shared_secret: "MEYCIQCKZLWyTk5runarx6XiAkU9gv3lbwPO/pHa+DXFehzdDwIhANwpsIV2g/9SPWLLsF6p/hiSskuIXMTRwqrMdVKWTMHG", # The raw secret derived from the specified key agreement algorithm, private key in the asymmetric KMS key, and your peer's public key.
|
3192
|
+
# }
|
3193
|
+
#
|
3194
|
+
# @example Request syntax with placeholder values
|
3195
|
+
#
|
3196
|
+
# resp = client.derive_shared_secret({
|
3197
|
+
# key_id: "KeyIdType", # required
|
3198
|
+
# key_agreement_algorithm: "ECDH", # required, accepts ECDH
|
3199
|
+
# public_key: "data", # required
|
3200
|
+
# grant_tokens: ["GrantTokenType"],
|
3201
|
+
# dry_run: false,
|
3202
|
+
# recipient: {
|
3203
|
+
# key_encryption_algorithm: "RSAES_OAEP_SHA_256", # accepts RSAES_OAEP_SHA_256
|
3204
|
+
# attestation_document: "data",
|
3205
|
+
# },
|
3206
|
+
# })
|
3207
|
+
#
|
3208
|
+
# @example Response structure
|
3209
|
+
#
|
3210
|
+
# resp.key_id #=> String
|
3211
|
+
# resp.shared_secret #=> String
|
3212
|
+
# resp.ciphertext_for_recipient #=> String
|
3213
|
+
# resp.key_agreement_algorithm #=> String, one of "ECDH"
|
3214
|
+
# resp.key_origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
|
3215
|
+
#
|
3216
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeriveSharedSecret AWS API Documentation
|
3217
|
+
#
|
3218
|
+
# @overload derive_shared_secret(params = {})
|
3219
|
+
# @param [Hash] params ({})
|
3220
|
+
def derive_shared_secret(params = {}, options = {})
|
3221
|
+
req = build_request(:derive_shared_secret, params)
|
3222
|
+
req.send_request(options)
|
3223
|
+
end
|
3224
|
+
|
2896
3225
|
# Gets information about [custom key stores][1] in the account and
|
2897
3226
|
# Region.
|
2898
3227
|
#
|
@@ -3477,7 +3806,7 @@ module Aws::KMS
|
|
3477
3806
|
# resp.key_metadata.creation_date #=> Time
|
3478
3807
|
# resp.key_metadata.enabled #=> Boolean
|
3479
3808
|
# resp.key_metadata.description #=> String
|
3480
|
-
# resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
|
3809
|
+
# resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
|
3481
3810
|
# resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
|
3482
3811
|
# resp.key_metadata.deletion_date #=> Time
|
3483
3812
|
# resp.key_metadata.valid_to #=> Time
|
@@ -3492,6 +3821,8 @@ module Aws::KMS
|
|
3492
3821
|
# resp.key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
|
3493
3822
|
# resp.key_metadata.signing_algorithms #=> Array
|
3494
3823
|
# resp.key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
|
3824
|
+
# resp.key_metadata.key_agreement_algorithms #=> Array
|
3825
|
+
# resp.key_metadata.key_agreement_algorithms[0] #=> String, one of "ECDH"
|
3495
3826
|
# resp.key_metadata.multi_region #=> Boolean
|
3496
3827
|
# resp.key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
|
3497
3828
|
# resp.key_metadata.multi_region_configuration.primary_key.arn #=> String
|
@@ -4758,8 +5089,11 @@ module Aws::KMS
|
|
4758
5089
|
# key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
|
4759
5090
|
#
|
4760
5091
|
# This parameter only supports attestation documents for Amazon Web
|
4761
|
-
# Services Nitro Enclaves. To
|
4762
|
-
#
|
5092
|
+
# Services Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web
|
5093
|
+
# Services Nitro Enclaves, use the [Amazon Web Services Nitro Enclaves
|
5094
|
+
# SDK][2] to generate the attestation document and then use the
|
5095
|
+
# Recipient parameter from any Amazon Web Services SDK to provide the
|
5096
|
+
# attestation document for the enclave.
|
4763
5097
|
#
|
4764
5098
|
# When you use this parameter, instead of returning a plaintext copy of
|
4765
5099
|
# the private data key, KMS encrypts the plaintext private data key
|
@@ -6063,8 +6397,8 @@ module Aws::KMS
|
|
6063
6397
|
#
|
6064
6398
|
# resp = client.get_parameters_for_import({
|
6065
6399
|
# key_id: "KeyIdType", # required
|
6066
|
-
# wrapping_algorithm: "RSAES_PKCS1_V1_5", # required, accepts RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256, RSA_AES_KEY_WRAP_SHA_1, RSA_AES_KEY_WRAP_SHA_256
|
6067
|
-
# wrapping_key_spec: "RSA_2048", # required, accepts RSA_2048, RSA_3072, RSA_4096
|
6400
|
+
# wrapping_algorithm: "RSAES_PKCS1_V1_5", # required, accepts RSAES_PKCS1_V1_5, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256, RSA_AES_KEY_WRAP_SHA_1, RSA_AES_KEY_WRAP_SHA_256, SM2PKE
|
6401
|
+
# wrapping_key_spec: "RSA_2048", # required, accepts RSA_2048, RSA_3072, RSA_4096, SM2
|
6068
6402
|
# })
|
6069
6403
|
#
|
6070
6404
|
# @example Response structure
|
@@ -6106,7 +6440,8 @@ module Aws::KMS
|
|
6106
6440
|
# * [KeySpec][2]: The type of key material in the public key, such as
|
6107
6441
|
# `RSA_4096` or `ECC_NIST_P521`.
|
6108
6442
|
#
|
6109
|
-
# * [KeyUsage][3]: Whether the key is used for encryption or
|
6443
|
+
# * [KeyUsage][3]: Whether the key is used for encryption, signing, or
|
6444
|
+
# deriving a shared secret.
|
6110
6445
|
#
|
6111
6446
|
# * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]: A list of the
|
6112
6447
|
# encryption algorithms or the signing algorithms for the key.
|
@@ -6195,6 +6530,7 @@ module Aws::KMS
|
|
6195
6530
|
# * {Types::GetPublicKeyResponse#key_usage #key_usage} => String
|
6196
6531
|
# * {Types::GetPublicKeyResponse#encryption_algorithms #encryption_algorithms} => Array<String>
|
6197
6532
|
# * {Types::GetPublicKeyResponse#signing_algorithms #signing_algorithms} => Array<String>
|
6533
|
+
# * {Types::GetPublicKeyResponse#key_agreement_algorithms #key_agreement_algorithms} => Array<String>
|
6198
6534
|
#
|
6199
6535
|
#
|
6200
6536
|
# @example Example: To download the public key of an asymmetric KMS key
|
@@ -6232,11 +6568,13 @@ module Aws::KMS
|
|
6232
6568
|
# resp.public_key #=> String
|
6233
6569
|
# resp.customer_master_key_spec #=> String, one of "RSA_2048", "RSA_3072", "RSA_4096", "ECC_NIST_P256", "ECC_NIST_P384", "ECC_NIST_P521", "ECC_SECG_P256K1", "SYMMETRIC_DEFAULT", "HMAC_224", "HMAC_256", "HMAC_384", "HMAC_512", "SM2"
|
6234
6570
|
# resp.key_spec #=> String, one of "RSA_2048", "RSA_3072", "RSA_4096", "ECC_NIST_P256", "ECC_NIST_P384", "ECC_NIST_P521", "ECC_SECG_P256K1", "SYMMETRIC_DEFAULT", "HMAC_224", "HMAC_256", "HMAC_384", "HMAC_512", "SM2"
|
6235
|
-
# resp.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
|
6571
|
+
# resp.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
|
6236
6572
|
# resp.encryption_algorithms #=> Array
|
6237
6573
|
# resp.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
|
6238
6574
|
# resp.signing_algorithms #=> Array
|
6239
6575
|
# resp.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
|
6576
|
+
# resp.key_agreement_algorithms #=> Array
|
6577
|
+
# resp.key_agreement_algorithms[0] #=> String, one of "ECDH"
|
6240
6578
|
#
|
6241
6579
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKey AWS API Documentation
|
6242
6580
|
#
|
@@ -6839,7 +7177,7 @@ module Aws::KMS
|
|
6839
7177
|
# resp.grants[0].retiring_principal #=> String
|
6840
7178
|
# resp.grants[0].issuing_account #=> String
|
6841
7179
|
# resp.grants[0].operations #=> Array
|
6842
|
-
# resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac"
|
7180
|
+
# resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac", "DeriveSharedSecret"
|
6843
7181
|
# resp.grants[0].constraints.encryption_context_subset #=> Hash
|
6844
7182
|
# resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
|
6845
7183
|
# resp.grants[0].constraints.encryption_context_equals #=> Hash
|
@@ -7461,7 +7799,7 @@ module Aws::KMS
|
|
7461
7799
|
# resp.grants[0].retiring_principal #=> String
|
7462
7800
|
# resp.grants[0].issuing_account #=> String
|
7463
7801
|
# resp.grants[0].operations #=> Array
|
7464
|
-
# resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac"
|
7802
|
+
# resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac", "DeriveSharedSecret"
|
7465
7803
|
# resp.grants[0].constraints.encryption_context_subset #=> Hash
|
7466
7804
|
# resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
|
7467
7805
|
# resp.grants[0].constraints.encryption_context_equals #=> Hash
|
@@ -8299,7 +8637,7 @@ module Aws::KMS
|
|
8299
8637
|
# resp.replica_key_metadata.creation_date #=> Time
|
8300
8638
|
# resp.replica_key_metadata.enabled #=> Boolean
|
8301
8639
|
# resp.replica_key_metadata.description #=> String
|
8302
|
-
# resp.replica_key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
|
8640
|
+
# resp.replica_key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
|
8303
8641
|
# resp.replica_key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
|
8304
8642
|
# resp.replica_key_metadata.deletion_date #=> Time
|
8305
8643
|
# resp.replica_key_metadata.valid_to #=> Time
|
@@ -8314,6 +8652,8 @@ module Aws::KMS
|
|
8314
8652
|
# resp.replica_key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
|
8315
8653
|
# resp.replica_key_metadata.signing_algorithms #=> Array
|
8316
8654
|
# resp.replica_key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
|
8655
|
+
# resp.replica_key_metadata.key_agreement_algorithms #=> Array
|
8656
|
+
# resp.replica_key_metadata.key_agreement_algorithms[0] #=> String, one of "ECDH"
|
8317
8657
|
# resp.replica_key_metadata.multi_region #=> Boolean
|
8318
8658
|
# resp.replica_key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
|
8319
8659
|
# resp.replica_key_metadata.multi_region_configuration.primary_key.arn #=> String
|
@@ -10426,14 +10766,19 @@ module Aws::KMS
|
|
10426
10766
|
# @api private
|
10427
10767
|
def build_request(operation_name, params = {})
|
10428
10768
|
handlers = @handlers.for(operation_name)
|
10769
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
10770
|
+
Aws::Telemetry.module_to_tracer_name('Aws::KMS')
|
10771
|
+
)
|
10429
10772
|
context = Seahorse::Client::RequestContext.new(
|
10430
10773
|
operation_name: operation_name,
|
10431
10774
|
operation: config.api.operation(operation_name),
|
10432
10775
|
client: self,
|
10433
10776
|
params: params,
|
10434
|
-
config: config
|
10777
|
+
config: config,
|
10778
|
+
tracer: tracer
|
10779
|
+
)
|
10435
10780
|
context[:gem_name] = 'aws-sdk-kms'
|
10436
|
-
context[:gem_version] = '1.
|
10781
|
+
context[:gem_version] = '1.91.0'
|
10437
10782
|
Seahorse::Client::Request.new(handlers, context)
|
10438
10783
|
end
|
10439
10784
|
|