aws-sdk-paymentcryptography 1.0.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.
@@ -0,0 +1,2019 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
35
+
36
+ Aws::Plugins::GlobalConfiguration.add_identifier(:paymentcryptography)
37
+
38
+ module Aws::PaymentCryptography
39
+ # An API client for PaymentCryptography. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::PaymentCryptography::Client.new(
42
+ # region: region_name,
43
+ # credentials: credentials,
44
+ # # ...
45
+ # )
46
+ #
47
+ # For details on configuring region and credentials see
48
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
49
+ #
50
+ # See {#initialize} for a full list of supported configuration options.
51
+ class Client < Seahorse::Client::Base
52
+
53
+ include Aws::ClientStubs
54
+
55
+ @identifier = :paymentcryptography
56
+
57
+ set_api(ClientApi::API)
58
+
59
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
60
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
61
+ add_plugin(Aws::Plugins::Logging)
62
+ add_plugin(Aws::Plugins::ParamConverter)
63
+ add_plugin(Aws::Plugins::ParamValidator)
64
+ add_plugin(Aws::Plugins::UserAgent)
65
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
66
+ add_plugin(Aws::Plugins::RetryErrors)
67
+ add_plugin(Aws::Plugins::GlobalConfiguration)
68
+ add_plugin(Aws::Plugins::RegionalEndpoint)
69
+ add_plugin(Aws::Plugins::EndpointDiscovery)
70
+ add_plugin(Aws::Plugins::EndpointPattern)
71
+ add_plugin(Aws::Plugins::ResponsePaging)
72
+ add_plugin(Aws::Plugins::StubResponses)
73
+ add_plugin(Aws::Plugins::IdempotencyToken)
74
+ add_plugin(Aws::Plugins::JsonvalueConverter)
75
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
76
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
+ add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
+ add_plugin(Aws::Plugins::DefaultsMode)
81
+ add_plugin(Aws::Plugins::RecursionDetection)
82
+ add_plugin(Aws::Plugins::Sign)
83
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
84
+ add_plugin(Aws::PaymentCryptography::Plugins::Endpoints)
85
+
86
+ # @overload initialize(options)
87
+ # @param [Hash] options
88
+ # @option options [required, Aws::CredentialProvider] :credentials
89
+ # Your AWS credentials. This can be an instance of any one of the
90
+ # following classes:
91
+ #
92
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
93
+ # credentials.
94
+ #
95
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
96
+ # shared file, such as `~/.aws/config`.
97
+ #
98
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
99
+ #
100
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
101
+ # assume a role after providing credentials via the web.
102
+ #
103
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
104
+ # access token generated from `aws login`.
105
+ #
106
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
107
+ # process that outputs to stdout.
108
+ #
109
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
110
+ # from an EC2 IMDS on an EC2 instance.
111
+ #
112
+ # * `Aws::ECSCredentials` - Used for loading credentials from
113
+ # instances running in ECS.
114
+ #
115
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
116
+ # from the Cognito Identity service.
117
+ #
118
+ # When `:credentials` are not configured directly, the following
119
+ # locations will be searched for credentials:
120
+ #
121
+ # * `Aws.config[:credentials]`
122
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
123
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
124
+ # * `~/.aws/credentials`
125
+ # * `~/.aws/config`
126
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
127
+ # are very aggressive. Construct and pass an instance of
128
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
129
+ # enable retries and extended timeouts. Instance profile credential
130
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
131
+ # to true.
132
+ #
133
+ # @option options [required, String] :region
134
+ # The AWS region to connect to. The configured `:region` is
135
+ # used to determine the service `:endpoint`. When not passed,
136
+ # a default `:region` is searched for in the following locations:
137
+ #
138
+ # * `Aws.config[:region]`
139
+ # * `ENV['AWS_REGION']`
140
+ # * `ENV['AMAZON_REGION']`
141
+ # * `ENV['AWS_DEFAULT_REGION']`
142
+ # * `~/.aws/credentials`
143
+ # * `~/.aws/config`
144
+ #
145
+ # @option options [String] :access_key_id
146
+ #
147
+ # @option options [Boolean] :active_endpoint_cache (false)
148
+ # When set to `true`, a thread polling for endpoints will be running in
149
+ # the background every 60 secs (default). Defaults to `false`.
150
+ #
151
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
152
+ # Used only in `adaptive` retry mode. When true, the request will sleep
153
+ # until there is sufficent client side capacity to retry the request.
154
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
155
+ # not retry instead of sleeping.
156
+ #
157
+ # @option options [Boolean] :client_side_monitoring (false)
158
+ # When `true`, client-side metrics will be collected for all API requests from
159
+ # this client.
160
+ #
161
+ # @option options [String] :client_side_monitoring_client_id ("")
162
+ # Allows you to provide an identifier for this client which will be attached to
163
+ # all generated client side metrics. Defaults to an empty string.
164
+ #
165
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
166
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
167
+ # side monitoring agent is running on, where client metrics will be published via UDP.
168
+ #
169
+ # @option options [Integer] :client_side_monitoring_port (31000)
170
+ # Required for publishing client metrics. The port that the client side monitoring
171
+ # agent is running on, where client metrics will be published via UDP.
172
+ #
173
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
174
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
175
+ # will use the Client Side Monitoring Agent Publisher.
176
+ #
177
+ # @option options [Boolean] :convert_params (true)
178
+ # When `true`, an attempt is made to coerce request parameters into
179
+ # the required types.
180
+ #
181
+ # @option options [Boolean] :correct_clock_skew (true)
182
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
183
+ # a clock skew correction and retry requests with skewed client clocks.
184
+ #
185
+ # @option options [String] :defaults_mode ("legacy")
186
+ # See {Aws::DefaultsModeConfiguration} for a list of the
187
+ # accepted modes and the configuration defaults that are included.
188
+ #
189
+ # @option options [Boolean] :disable_host_prefix_injection (false)
190
+ # Set to true to disable SDK automatically adding host prefix
191
+ # to default service endpoint when available.
192
+ #
193
+ # @option options [String] :endpoint
194
+ # The client endpoint is normally constructed from the `:region`
195
+ # option. You should only configure an `:endpoint` when connecting
196
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
197
+ #
198
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
199
+ # Used for the maximum size limit of the LRU cache storing endpoints data
200
+ # for endpoint discovery enabled operations. Defaults to 1000.
201
+ #
202
+ # @option options [Integer] :endpoint_cache_max_threads (10)
203
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
204
+ #
205
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
206
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
207
+ # Use this option to config the time interval in seconds for making
208
+ # requests fetching endpoints information. Defaults to 60 sec.
209
+ #
210
+ # @option options [Boolean] :endpoint_discovery (false)
211
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
212
+ #
213
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
214
+ # The log formatter.
215
+ #
216
+ # @option options [Symbol] :log_level (:info)
217
+ # The log level to send messages to the `:logger` at.
218
+ #
219
+ # @option options [Logger] :logger
220
+ # The Logger instance to send log messages to. If this option
221
+ # is not set, logging will be disabled.
222
+ #
223
+ # @option options [Integer] :max_attempts (3)
224
+ # An integer representing the maximum number attempts that will be made for
225
+ # a single request, including the initial attempt. For example,
226
+ # setting this value to 5 will result in a request being retried up to
227
+ # 4 times. Used in `standard` and `adaptive` retry modes.
228
+ #
229
+ # @option options [String] :profile ("default")
230
+ # Used when loading credentials from the shared credentials file
231
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
232
+ #
233
+ # @option options [Proc] :retry_backoff
234
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
235
+ # This option is only used in the `legacy` retry mode.
236
+ #
237
+ # @option options [Float] :retry_base_delay (0.3)
238
+ # The base delay in seconds used by the default backoff function. This option
239
+ # is only used in the `legacy` retry mode.
240
+ #
241
+ # @option options [Symbol] :retry_jitter (:none)
242
+ # A delay randomiser function used by the default backoff function.
243
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
244
+ # otherwise a Proc that takes and returns a number. This option is only used
245
+ # in the `legacy` retry mode.
246
+ #
247
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
248
+ #
249
+ # @option options [Integer] :retry_limit (3)
250
+ # The maximum number of times to retry failed requests. Only
251
+ # ~ 500 level server errors and certain ~ 400 level client errors
252
+ # are retried. Generally, these are throttling errors, data
253
+ # checksum errors, networking errors, timeout errors, auth errors,
254
+ # endpoint discovery, and errors from expired credentials.
255
+ # This option is only used in the `legacy` retry mode.
256
+ #
257
+ # @option options [Integer] :retry_max_delay (0)
258
+ # The maximum number of seconds to delay between retries (0 for no limit)
259
+ # used by the default backoff function. This option is only used in the
260
+ # `legacy` retry mode.
261
+ #
262
+ # @option options [String] :retry_mode ("legacy")
263
+ # Specifies which retry algorithm to use. Values are:
264
+ #
265
+ # * `legacy` - The pre-existing retry behavior. This is default value if
266
+ # no retry mode is provided.
267
+ #
268
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
269
+ # This includes support for retry quotas, which limit the number of
270
+ # unsuccessful retries a client can make.
271
+ #
272
+ # * `adaptive` - An experimental retry mode that includes all the
273
+ # functionality of `standard` mode along with automatic client side
274
+ # throttling. This is a provisional mode that may change behavior
275
+ # in the future.
276
+ #
277
+ #
278
+ # @option options [String] :sdk_ua_app_id
279
+ # A unique and opaque application ID that is appended to the
280
+ # User-Agent header as app/<sdk_ua_app_id>. It should have a
281
+ # maximum length of 50.
282
+ #
283
+ # @option options [String] :secret_access_key
284
+ #
285
+ # @option options [String] :session_token
286
+ #
287
+ # @option options [Boolean] :simple_json (false)
288
+ # Disables request parameter conversion, validation, and formatting.
289
+ # Also disable response data type conversions. This option is useful
290
+ # when you want to ensure the highest level of performance by
291
+ # avoiding overhead of walking request parameters and response data
292
+ # structures.
293
+ #
294
+ # When `:simple_json` is enabled, the request parameters hash must
295
+ # be formatted exactly as the DynamoDB API expects.
296
+ #
297
+ # @option options [Boolean] :stub_responses (false)
298
+ # Causes the client to return stubbed responses. By default
299
+ # fake responses are generated and returned. You can specify
300
+ # the response data to return or errors to raise by calling
301
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
302
+ #
303
+ # ** Please note ** When response stubbing is enabled, no HTTP
304
+ # requests are made, and retries are disabled.
305
+ #
306
+ # @option options [Aws::TokenProvider] :token_provider
307
+ # A Bearer Token Provider. This can be an instance of any one of the
308
+ # following classes:
309
+ #
310
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
311
+ # tokens.
312
+ #
313
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
314
+ # access token generated from `aws login`.
315
+ #
316
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
317
+ # will be used to search for tokens configured for your profile in shared configuration files.
318
+ #
319
+ # @option options [Boolean] :use_dualstack_endpoint
320
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
321
+ # will be used if available.
322
+ #
323
+ # @option options [Boolean] :use_fips_endpoint
324
+ # When set to `true`, fips compatible endpoints will be used if available.
325
+ # When a `fips` region is used, the region is normalized and this config
326
+ # is set to `true`.
327
+ #
328
+ # @option options [Boolean] :validate_params (true)
329
+ # When `true`, request parameters are validated before
330
+ # sending the request.
331
+ #
332
+ # @option options [Aws::PaymentCryptography::EndpointProvider] :endpoint_provider
333
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::PaymentCryptography::EndpointParameters`
334
+ #
335
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
336
+ # requests through. Formatted like 'http://proxy.com:123'.
337
+ #
338
+ # @option options [Float] :http_open_timeout (15) The number of
339
+ # seconds to wait when opening a HTTP session before raising a
340
+ # `Timeout::Error`.
341
+ #
342
+ # @option options [Float] :http_read_timeout (60) The default
343
+ # number of seconds to wait for response data. This value can
344
+ # safely be set per-request on the session.
345
+ #
346
+ # @option options [Float] :http_idle_timeout (5) The number of
347
+ # seconds a connection is allowed to sit idle before it is
348
+ # considered stale. Stale connections are closed and removed
349
+ # from the pool before making a request.
350
+ #
351
+ # @option options [Float] :http_continue_timeout (1) The number of
352
+ # seconds to wait for a 100-continue response before sending the
353
+ # request body. This option has no effect unless the request has
354
+ # "Expect" header set to "100-continue". Defaults to `nil` which
355
+ # disables this behaviour. This value can safely be set per
356
+ # request on the session.
357
+ #
358
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
359
+ # in seconds.
360
+ #
361
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
362
+ # HTTP debug output will be sent to the `:logger`.
363
+ #
364
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
365
+ # SSL peer certificates are verified when establishing a
366
+ # connection.
367
+ #
368
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
369
+ # certificate authority bundle file that should be used when
370
+ # verifying peer certificates. If you do not pass
371
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
372
+ # will be used if available.
373
+ #
374
+ # @option options [String] :ssl_ca_directory Full path of the
375
+ # directory that contains the unbundled SSL certificate
376
+ # authority files for verifying peer certificates. If you do
377
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
378
+ # system default will be used if available.
379
+ #
380
+ def initialize(*args)
381
+ super
382
+ end
383
+
384
+ # @!group API Operations
385
+
386
+ # Creates an *alias*, or a friendly name, for an Amazon Web Services
387
+ # Payment Cryptography key. You can use an alias to identify a key in
388
+ # the console and when you call cryptographic operations such as
389
+ # [EncryptData][1] or [DecryptData][2].
390
+ #
391
+ # You can associate the alias with any key in the same Amazon Web
392
+ # Services Region. Each alias is associated with only one key at a time,
393
+ # but a key can have multiple aliases. You can't create an alias
394
+ # without a key. The alias must be unique in the account and Amazon Web
395
+ # Services Region, but you can create another alias with the same name
396
+ # in a different Amazon Web Services Region.
397
+ #
398
+ # To change the key that's associated with the alias, call UpdateAlias.
399
+ # To delete the alias, call DeleteAlias. These operations don't affect
400
+ # the underlying key. To get the alias that you created, call
401
+ # ListAliases.
402
+ #
403
+ # **Cross-account use**: This operation can't be used across different
404
+ # Amazon Web Services accounts.
405
+ #
406
+ # **Related operations:**
407
+ #
408
+ # * DeleteAlias
409
+ #
410
+ # * GetAlias
411
+ #
412
+ # * ListAliases
413
+ #
414
+ # * UpdateAlias
415
+ #
416
+ #
417
+ #
418
+ # [1]: https://docs.aws.amazon.com/payment-cryptography/latest/DataAPIReference/API_EncryptData.html
419
+ # [2]: https://docs.aws.amazon.com/payment-cryptography/latest/DataAPIReference/API_DecryptData.html
420
+ #
421
+ # @option params [required, String] :alias_name
422
+ # A friendly name that you can use to refer a key. An alias must begin
423
+ # with `alias/` followed by a name, for example `alias/ExampleAlias`. It
424
+ # can contain only alphanumeric characters, forward slashes (/),
425
+ # underscores (\_), and dashes (-).
426
+ #
427
+ # Don't include confidential or sensitive information in this field.
428
+ # This field may be displayed in plaintext in CloudTrail logs and other
429
+ # output.
430
+ #
431
+ # @option params [String] :key_arn
432
+ # The `KeyARN` of the key to associate with the alias.
433
+ #
434
+ # @return [Types::CreateAliasOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
435
+ #
436
+ # * {Types::CreateAliasOutput#alias #alias} => Types::Alias
437
+ #
438
+ # @example Request syntax with placeholder values
439
+ #
440
+ # resp = client.create_alias({
441
+ # alias_name: "AliasName", # required
442
+ # key_arn: "KeyArn",
443
+ # })
444
+ #
445
+ # @example Response structure
446
+ #
447
+ # resp.alias.alias_name #=> String
448
+ # resp.alias.key_arn #=> String
449
+ #
450
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/CreateAlias AWS API Documentation
451
+ #
452
+ # @overload create_alias(params = {})
453
+ # @param [Hash] params ({})
454
+ def create_alias(params = {}, options = {})
455
+ req = build_request(:create_alias, params)
456
+ req.send_request(options)
457
+ end
458
+
459
+ # Creates an Amazon Web Services Payment Cryptography key, a logical
460
+ # representation of a cryptographic key, that is unique in your account
461
+ # and Amazon Web Services Region. You use keys for cryptographic
462
+ # functions such as encryption and decryption.
463
+ #
464
+ # In addition to the key material used in cryptographic operations, an
465
+ # Amazon Web Services Payment Cryptography key includes metadata such as
466
+ # the key ARN, key usage, key origin, creation date, description, and
467
+ # key state.
468
+ #
469
+ # When you create a key, you specify both immutable and mutable data
470
+ # about the key. The immutable data contains key attributes that defines
471
+ # the scope and cryptographic operations that you can perform using the
472
+ # key, for example key class (example: `SYMMETRIC_KEY`), key algorithm
473
+ # (example: `TDES_2KEY`), key usage (example:
474
+ # `TR31_P0_PIN_ENCRYPTION_KEY`) and key modes of use (example:
475
+ # `Encrypt`). For information about valid combinations of key
476
+ # attributes, see [Understanding key attributes][1] in the *Amazon Web
477
+ # Services Payment Cryptography User Guide*. The mutable data contained
478
+ # within a key includes usage timestamp and key deletion timestamp and
479
+ # can be modified after creation.
480
+ #
481
+ # Amazon Web Services Payment Cryptography binds key attributes to keys
482
+ # using key blocks when you store or export them. Amazon Web Services
483
+ # Payment Cryptography stores the key contents wrapped and never stores
484
+ # or transmits them in the clear.
485
+ #
486
+ # **Cross-account use**: This operation can't be used across different
487
+ # Amazon Web Services accounts.
488
+ #
489
+ # **Related operations:**
490
+ #
491
+ # * DeleteKey
492
+ #
493
+ # * GetKey
494
+ #
495
+ # * ListKeys
496
+ #
497
+ #
498
+ #
499
+ # [1]: https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-validattributes.html
500
+ #
501
+ # @option params [Boolean] :enabled
502
+ # Specifies whether to enable the key. If the key is enabled, it is
503
+ # activated for use within the service. If the key not enabled, then it
504
+ # is created but not activated. The default value is enabled.
505
+ #
506
+ # @option params [required, Boolean] :exportable
507
+ # Specifies whether the key is exportable from the service.
508
+ #
509
+ # @option params [required, Types::KeyAttributes] :key_attributes
510
+ # The role of the key, the algorithm it supports, and the cryptographic
511
+ # operations allowed with the key. This data is immutable after the key
512
+ # is created.
513
+ #
514
+ # @option params [String] :key_check_value_algorithm
515
+ # The algorithm that Amazon Web Services Payment Cryptography uses to
516
+ # calculate the key check value (KCV) for DES and AES keys.
517
+ #
518
+ # For DES key, the KCV is computed by encrypting 8 bytes, each with
519
+ # value '00', with the key to be checked and retaining the 3 highest
520
+ # order bytes of the encrypted result. For AES key, the KCV is computed
521
+ # by encrypting 8 bytes, each with value '01', with the key to be
522
+ # checked and retaining the 3 highest order bytes of the encrypted
523
+ # result.
524
+ #
525
+ # @option params [Array<Types::Tag>] :tags
526
+ # The tags to attach to the key. Each tag consists of a tag key and a
527
+ # tag value. Both the tag key and the tag value are required, but the
528
+ # tag value can be an empty (null) string. You can't have more than one
529
+ # tag on an Amazon Web Services Payment Cryptography key with the same
530
+ # tag key.
531
+ #
532
+ # To use this parameter, you must have `TagResource` permission.
533
+ #
534
+ # Don't include confidential or sensitive information in this field.
535
+ # This field may be displayed in plaintext in CloudTrail logs and other
536
+ # output.
537
+ #
538
+ # <note markdown="1"> Tagging or untagging an Amazon Web Services Payment Cryptography key
539
+ # can allow or deny permission to the key.
540
+ #
541
+ # </note>
542
+ #
543
+ # @return [Types::CreateKeyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
544
+ #
545
+ # * {Types::CreateKeyOutput#key #key} => Types::Key
546
+ #
547
+ # @example Request syntax with placeholder values
548
+ #
549
+ # resp = client.create_key({
550
+ # enabled: false,
551
+ # exportable: false, # required
552
+ # key_attributes: { # required
553
+ # key_algorithm: "TDES_2KEY", # required, accepts TDES_2KEY, TDES_3KEY, AES_128, AES_192, AES_256, RSA_2048, RSA_3072, RSA_4096
554
+ # key_class: "SYMMETRIC_KEY", # required, accepts SYMMETRIC_KEY, ASYMMETRIC_KEY_PAIR, PRIVATE_KEY, PUBLIC_KEY
555
+ # key_modes_of_use: { # required
556
+ # decrypt: false,
557
+ # derive_key: false,
558
+ # encrypt: false,
559
+ # generate: false,
560
+ # no_restrictions: false,
561
+ # sign: false,
562
+ # unwrap: false,
563
+ # verify: false,
564
+ # wrap: false,
565
+ # },
566
+ # key_usage: "TR31_B0_BASE_DERIVATION_KEY", # required, accepts TR31_B0_BASE_DERIVATION_KEY, TR31_C0_CARD_VERIFICATION_KEY, TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY, TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION, TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS, TR31_E1_EMV_MKEY_CONFIDENTIALITY, TR31_E2_EMV_MKEY_INTEGRITY, TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS, TR31_E5_EMV_MKEY_CARD_PERSONALIZATION, TR31_E6_EMV_MKEY_OTHER, TR31_K0_KEY_ENCRYPTION_KEY, TR31_K1_KEY_BLOCK_PROTECTION_KEY, TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT, TR31_M3_ISO_9797_3_MAC_KEY, TR31_M6_ISO_9797_5_CMAC_KEY, TR31_M7_HMAC_KEY, TR31_P0_PIN_ENCRYPTION_KEY, TR31_P1_PIN_GENERATION_KEY, TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE, TR31_V1_IBM3624_PIN_VERIFICATION_KEY, TR31_V2_VISA_PIN_VERIFICATION_KEY, TR31_K2_TR34_ASYMMETRIC_KEY
567
+ # },
568
+ # key_check_value_algorithm: "CMAC", # accepts CMAC, ANSI_X9_24
569
+ # tags: [
570
+ # {
571
+ # key: "TagKey", # required
572
+ # value: "TagValue",
573
+ # },
574
+ # ],
575
+ # })
576
+ #
577
+ # @example Response structure
578
+ #
579
+ # resp.key.create_timestamp #=> Time
580
+ # resp.key.delete_pending_timestamp #=> Time
581
+ # resp.key.delete_timestamp #=> Time
582
+ # resp.key.enabled #=> Boolean
583
+ # resp.key.exportable #=> Boolean
584
+ # resp.key.key_arn #=> String
585
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
586
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
587
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
588
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
589
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
590
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
591
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
592
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
593
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
594
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
595
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
596
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
597
+ # resp.key.key_check_value #=> String
598
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
599
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
600
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
601
+ # resp.key.usage_start_timestamp #=> Time
602
+ # resp.key.usage_stop_timestamp #=> Time
603
+ #
604
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/CreateKey AWS API Documentation
605
+ #
606
+ # @overload create_key(params = {})
607
+ # @param [Hash] params ({})
608
+ def create_key(params = {}, options = {})
609
+ req = build_request(:create_key, params)
610
+ req.send_request(options)
611
+ end
612
+
613
+ # Deletes the alias, but doesn't affect the underlying key.
614
+ #
615
+ # Each key can have multiple aliases. To get the aliases of all keys,
616
+ # use the ListAliases operation. To change the alias of a key, first use
617
+ # DeleteAlias to delete the current alias and then use CreateAlias to
618
+ # create a new alias. To associate an existing alias with a different
619
+ # key, call UpdateAlias.
620
+ #
621
+ # **Cross-account use:** This operation can't be used across different
622
+ # Amazon Web Services accounts.
623
+ #
624
+ # **Related operations:**
625
+ #
626
+ # * CreateAlias
627
+ #
628
+ # * GetAlias
629
+ #
630
+ # * ListAliases
631
+ #
632
+ # * UpdateAlias
633
+ #
634
+ # @option params [required, String] :alias_name
635
+ # A friendly name that you can use to refer Amazon Web Services Payment
636
+ # Cryptography key. This value must begin with `alias/` followed by a
637
+ # name, such as `alias/ExampleAlias`.
638
+ #
639
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
640
+ #
641
+ # @example Request syntax with placeholder values
642
+ #
643
+ # resp = client.delete_alias({
644
+ # alias_name: "AliasName", # required
645
+ # })
646
+ #
647
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/DeleteAlias AWS API Documentation
648
+ #
649
+ # @overload delete_alias(params = {})
650
+ # @param [Hash] params ({})
651
+ def delete_alias(params = {}, options = {})
652
+ req = build_request(:delete_alias, params)
653
+ req.send_request(options)
654
+ end
655
+
656
+ # Deletes the key material and all metadata associated with Amazon Web
657
+ # Services Payment Cryptography key.
658
+ #
659
+ # Key deletion is irreversible. After a key is deleted, you can't
660
+ # perform cryptographic operations using the key. For example, you
661
+ # can't decrypt data that was encrypted by a deleted Amazon Web
662
+ # Services Payment Cryptography key, and the data may become
663
+ # unrecoverable. Because key deletion is destructive, Amazon Web
664
+ # Services Payment Cryptography has a safety mechanism to prevent
665
+ # accidental deletion of a key. When you call this operation, Amazon Web
666
+ # Services Payment Cryptography disables the specified key but doesn't
667
+ # delete it until after a waiting period. The default waiting period is
668
+ # 7 days. To set a different waiting period, set `DeleteKeyInDays`.
669
+ # During the waiting period, the `KeyState` is `DELETE_PENDING`. After
670
+ # the key is deleted, the `KeyState` is `DELETE_COMPLETE`.
671
+ #
672
+ # If you delete key material, you can use ImportKey to reimport the same
673
+ # key material into the Amazon Web Services Payment Cryptography key.
674
+ #
675
+ # You should delete a key only when you are sure that you don't need to
676
+ # use it anymore and no other parties are utilizing this key. If you
677
+ # aren't sure, consider deactivating it instead by calling
678
+ # StopKeyUsage.
679
+ #
680
+ # **Cross-account use:** This operation can't be used across different
681
+ # Amazon Web Services accounts.
682
+ #
683
+ # **Related operations:**
684
+ #
685
+ # * RestoreKey
686
+ #
687
+ # * StartKeyUsage
688
+ #
689
+ # * StopKeyUsage
690
+ #
691
+ # @option params [Integer] :delete_key_in_days
692
+ # The waiting period for key deletion. The default value is seven days.
693
+ #
694
+ # @option params [required, String] :key_identifier
695
+ # The `KeyARN` of the key that is scheduled for deletion.
696
+ #
697
+ # @return [Types::DeleteKeyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
698
+ #
699
+ # * {Types::DeleteKeyOutput#key #key} => Types::Key
700
+ #
701
+ # @example Request syntax with placeholder values
702
+ #
703
+ # resp = client.delete_key({
704
+ # delete_key_in_days: 1,
705
+ # key_identifier: "KeyArnOrKeyAliasType", # required
706
+ # })
707
+ #
708
+ # @example Response structure
709
+ #
710
+ # resp.key.create_timestamp #=> Time
711
+ # resp.key.delete_pending_timestamp #=> Time
712
+ # resp.key.delete_timestamp #=> Time
713
+ # resp.key.enabled #=> Boolean
714
+ # resp.key.exportable #=> Boolean
715
+ # resp.key.key_arn #=> String
716
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
717
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
718
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
719
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
720
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
721
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
722
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
723
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
724
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
725
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
726
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
727
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
728
+ # resp.key.key_check_value #=> String
729
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
730
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
731
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
732
+ # resp.key.usage_start_timestamp #=> Time
733
+ # resp.key.usage_stop_timestamp #=> Time
734
+ #
735
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/DeleteKey AWS API Documentation
736
+ #
737
+ # @overload delete_key(params = {})
738
+ # @param [Hash] params ({})
739
+ def delete_key(params = {}, options = {})
740
+ req = build_request(:delete_key, params)
741
+ req.send_request(options)
742
+ end
743
+
744
+ # Exports a key from Amazon Web Services Payment Cryptography using
745
+ # either ANSI X9 TR-34 or TR-31 key export standard.
746
+ #
747
+ # Amazon Web Services Payment Cryptography simplifies main or root key
748
+ # exchange process by eliminating the need of a paper-based key exchange
749
+ # process. It takes a modern and secure approach based of the ANSI X9
750
+ # TR-34 key exchange standard.
751
+ #
752
+ # You can use `ExportKey` to export main or root keys such as KEK (Key
753
+ # Encryption Key), using asymmetric key exchange technique following
754
+ # ANSI X9 TR-34 standard. The ANSI X9 TR-34 standard uses asymmetric
755
+ # keys to establishes bi-directional trust between the two parties
756
+ # exchanging keys. After which you can export working keys using the
757
+ # ANSI X9 TR-31 symmetric key exchange standard as mandated by PCI PIN.
758
+ # Using this operation, you can share your Amazon Web Services Payment
759
+ # Cryptography generated keys with other service partners to perform
760
+ # cryptographic operations outside of Amazon Web Services Payment
761
+ # Cryptography
762
+ #
763
+ # **TR-34 key export**
764
+ #
765
+ # Amazon Web Services Payment Cryptography uses TR-34 asymmetric key
766
+ # exchange standard to export main keys such as KEK. In TR-34
767
+ # terminology, the sending party of the key is called Key Distribution
768
+ # Host (KDH) and the receiving party of the key is called Key Receiving
769
+ # Host (KRH). In key export process, KDH is Amazon Web Services Payment
770
+ # Cryptography which initiates key export. KRH is the user receiving the
771
+ # key. Before you initiate TR-34 key export, you must obtain an export
772
+ # token by calling GetParametersForExport. This operation also returns
773
+ # the signing key certificate that KDH uses to sign the wrapped key to
774
+ # generate a TR-34 wrapped key block. The export token expires after 7
775
+ # days.
776
+ #
777
+ # Set the following parameters:
778
+ #
779
+ # CertificateAuthorityPublicKeyIdentifier
780
+ #
781
+ # : The `KeyARN` of the certificate chain that will sign the wrapping
782
+ # key certificate. This must exist within Amazon Web Services Payment
783
+ # Cryptography before you initiate TR-34 key export. If it does not
784
+ # exist, you can import it by calling ImportKey for
785
+ # `RootCertificatePublicKey`.
786
+ #
787
+ # ExportToken
788
+ #
789
+ # : Obtained from KDH by calling GetParametersForExport.
790
+ #
791
+ # WrappingKeyCertificate
792
+ #
793
+ # : Amazon Web Services Payment Cryptography uses this to wrap the key
794
+ # under export.
795
+ #
796
+ # When this operation is successful, Amazon Web Services Payment
797
+ # Cryptography returns the TR-34 wrapped key block.
798
+ #
799
+ # **TR-31 key export**
800
+ #
801
+ # Amazon Web Services Payment Cryptography uses TR-31 symmetric key
802
+ # exchange standard to export working keys. In TR-31, you must use a
803
+ # main key such as KEK to encrypt or wrap the key under export. To
804
+ # establish a KEK, you can use CreateKey or ImportKey. When this
805
+ # operation is successful, Amazon Web Services Payment Cryptography
806
+ # returns a TR-31 wrapped key block.
807
+ #
808
+ # **Cross-account use:** This operation can't be used across different
809
+ # Amazon Web Services accounts.
810
+ #
811
+ # **Related operations:**
812
+ #
813
+ # * GetParametersForExport
814
+ #
815
+ # * ImportKey
816
+ #
817
+ # @option params [required, String] :export_key_identifier
818
+ # The `KeyARN` of the key under export from Amazon Web Services Payment
819
+ # Cryptography.
820
+ #
821
+ # @option params [required, Types::ExportKeyMaterial] :key_material
822
+ # The key block format type, for example, TR-34 or TR-31, to use during
823
+ # key material export.
824
+ #
825
+ # @return [Types::ExportKeyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
826
+ #
827
+ # * {Types::ExportKeyOutput#wrapped_key #wrapped_key} => Types::WrappedKey
828
+ #
829
+ # @example Request syntax with placeholder values
830
+ #
831
+ # resp = client.export_key({
832
+ # export_key_identifier: "KeyArnOrKeyAliasType", # required
833
+ # key_material: { # required
834
+ # tr_31_key_block: {
835
+ # wrapping_key_identifier: "KeyArnOrKeyAliasType", # required
836
+ # },
837
+ # tr_34_key_block: {
838
+ # certificate_authority_public_key_identifier: "KeyArnOrKeyAliasType", # required
839
+ # export_token: "ExportTokenId", # required
840
+ # key_block_format: "X9_TR34_2012", # required, accepts X9_TR34_2012
841
+ # random_nonce: "HexLength16",
842
+ # wrapping_key_certificate: "CertificateType", # required
843
+ # },
844
+ # },
845
+ # })
846
+ #
847
+ # @example Response structure
848
+ #
849
+ # resp.wrapped_key.key_material #=> String
850
+ # resp.wrapped_key.wrapped_key_material_format #=> String, one of "KEY_CRYPTOGRAM", "TR31_KEY_BLOCK", "TR34_KEY_BLOCK"
851
+ # resp.wrapped_key.wrapping_key_arn #=> String
852
+ #
853
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/ExportKey AWS API Documentation
854
+ #
855
+ # @overload export_key(params = {})
856
+ # @param [Hash] params ({})
857
+ def export_key(params = {}, options = {})
858
+ req = build_request(:export_key, params)
859
+ req.send_request(options)
860
+ end
861
+
862
+ # Gets the Amazon Web Services Payment Cryptography key associated with
863
+ # the alias.
864
+ #
865
+ # **Cross-account use:** This operation can't be used across different
866
+ # Amazon Web Services accounts.
867
+ #
868
+ # **Related operations:**
869
+ #
870
+ # * CreateAlias
871
+ #
872
+ # * DeleteAlias
873
+ #
874
+ # * ListAliases
875
+ #
876
+ # * UpdateAlias
877
+ #
878
+ # @option params [required, String] :alias_name
879
+ # The alias of the Amazon Web Services Payment Cryptography key.
880
+ #
881
+ # @return [Types::GetAliasOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
882
+ #
883
+ # * {Types::GetAliasOutput#alias #alias} => Types::Alias
884
+ #
885
+ # @example Request syntax with placeholder values
886
+ #
887
+ # resp = client.get_alias({
888
+ # alias_name: "AliasName", # required
889
+ # })
890
+ #
891
+ # @example Response structure
892
+ #
893
+ # resp.alias.alias_name #=> String
894
+ # resp.alias.key_arn #=> String
895
+ #
896
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/GetAlias AWS API Documentation
897
+ #
898
+ # @overload get_alias(params = {})
899
+ # @param [Hash] params ({})
900
+ def get_alias(params = {}, options = {})
901
+ req = build_request(:get_alias, params)
902
+ req.send_request(options)
903
+ end
904
+
905
+ # Gets the key material for an Amazon Web Services Payment Cryptography
906
+ # key, including the immutable and mutable data specified when the key
907
+ # was created.
908
+ #
909
+ # **Cross-account use:** This operation can't be used across different
910
+ # Amazon Web Services accounts.
911
+ #
912
+ # **Related operations:**
913
+ #
914
+ # * CreateKey
915
+ #
916
+ # * DeleteKey
917
+ #
918
+ # * ListKeys
919
+ #
920
+ # @option params [required, String] :key_identifier
921
+ # The `KeyARN` of the Amazon Web Services Payment Cryptography key.
922
+ #
923
+ # @return [Types::GetKeyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
924
+ #
925
+ # * {Types::GetKeyOutput#key #key} => Types::Key
926
+ #
927
+ # @example Request syntax with placeholder values
928
+ #
929
+ # resp = client.get_key({
930
+ # key_identifier: "KeyArnOrKeyAliasType", # required
931
+ # })
932
+ #
933
+ # @example Response structure
934
+ #
935
+ # resp.key.create_timestamp #=> Time
936
+ # resp.key.delete_pending_timestamp #=> Time
937
+ # resp.key.delete_timestamp #=> Time
938
+ # resp.key.enabled #=> Boolean
939
+ # resp.key.exportable #=> Boolean
940
+ # resp.key.key_arn #=> String
941
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
942
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
943
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
944
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
945
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
946
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
947
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
948
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
949
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
950
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
951
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
952
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
953
+ # resp.key.key_check_value #=> String
954
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
955
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
956
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
957
+ # resp.key.usage_start_timestamp #=> Time
958
+ # resp.key.usage_stop_timestamp #=> Time
959
+ #
960
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/GetKey AWS API Documentation
961
+ #
962
+ # @overload get_key(params = {})
963
+ # @param [Hash] params ({})
964
+ def get_key(params = {}, options = {})
965
+ req = build_request(:get_key, params)
966
+ req.send_request(options)
967
+ end
968
+
969
+ # Gets the export token and the signing key certificate to initiate a
970
+ # TR-34 key export from Amazon Web Services Payment Cryptography.
971
+ #
972
+ # The signing key certificate signs the wrapped key under export within
973
+ # the TR-34 key payload. The export token and signing key certificate
974
+ # must be in place and operational before calling ExportKey. The export
975
+ # token expires in 7 days. You can use the same export token to export
976
+ # multiple keys from your service account.
977
+ #
978
+ # **Cross-account use:** This operation can't be used across different
979
+ # Amazon Web Services accounts.
980
+ #
981
+ # **Related operations:**
982
+ #
983
+ # * ExportKey
984
+ #
985
+ # * GetParametersForImport
986
+ #
987
+ # @option params [required, String] :key_material_type
988
+ # The key block format type (for example, TR-34 or TR-31) to use during
989
+ # key material export. Export token is only required for a TR-34 key
990
+ # export, `TR34_KEY_BLOCK`. Export token is not required for TR-31 key
991
+ # export.
992
+ #
993
+ # @option params [required, String] :signing_key_algorithm
994
+ # The signing key algorithm to generate a signing key certificate. This
995
+ # certificate signs the wrapped key under export within the TR-34 key
996
+ # block cryptogram. `RSA_2048` is the only signing key algorithm
997
+ # allowed.
998
+ #
999
+ # @return [Types::GetParametersForExportOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1000
+ #
1001
+ # * {Types::GetParametersForExportOutput#export_token #export_token} => String
1002
+ # * {Types::GetParametersForExportOutput#parameters_valid_until_timestamp #parameters_valid_until_timestamp} => Time
1003
+ # * {Types::GetParametersForExportOutput#signing_key_algorithm #signing_key_algorithm} => String
1004
+ # * {Types::GetParametersForExportOutput#signing_key_certificate #signing_key_certificate} => String
1005
+ # * {Types::GetParametersForExportOutput#signing_key_certificate_chain #signing_key_certificate_chain} => String
1006
+ #
1007
+ # @example Request syntax with placeholder values
1008
+ #
1009
+ # resp = client.get_parameters_for_export({
1010
+ # key_material_type: "TR34_KEY_BLOCK", # required, accepts TR34_KEY_BLOCK, TR31_KEY_BLOCK, ROOT_PUBLIC_KEY_CERTIFICATE, TRUSTED_PUBLIC_KEY_CERTIFICATE
1011
+ # signing_key_algorithm: "TDES_2KEY", # required, accepts TDES_2KEY, TDES_3KEY, AES_128, AES_192, AES_256, RSA_2048, RSA_3072, RSA_4096
1012
+ # })
1013
+ #
1014
+ # @example Response structure
1015
+ #
1016
+ # resp.export_token #=> String
1017
+ # resp.parameters_valid_until_timestamp #=> Time
1018
+ # resp.signing_key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1019
+ # resp.signing_key_certificate #=> String
1020
+ # resp.signing_key_certificate_chain #=> String
1021
+ #
1022
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/GetParametersForExport AWS API Documentation
1023
+ #
1024
+ # @overload get_parameters_for_export(params = {})
1025
+ # @param [Hash] params ({})
1026
+ def get_parameters_for_export(params = {}, options = {})
1027
+ req = build_request(:get_parameters_for_export, params)
1028
+ req.send_request(options)
1029
+ end
1030
+
1031
+ # Gets the import token and the wrapping key certificate to initiate a
1032
+ # TR-34 key import into Amazon Web Services Payment Cryptography.
1033
+ #
1034
+ # The wrapping key certificate wraps the key under import within the
1035
+ # TR-34 key payload. The import token and wrapping key certificate must
1036
+ # be in place and operational before calling ImportKey. The import token
1037
+ # expires in 7 days. The same import token can be used to import
1038
+ # multiple keys into your service account.
1039
+ #
1040
+ # **Cross-account use:** This operation can't be used across different
1041
+ # Amazon Web Services accounts.
1042
+ #
1043
+ # **Related operations:**
1044
+ #
1045
+ # * GetParametersForExport
1046
+ #
1047
+ # * ImportKey
1048
+ #
1049
+ # @option params [required, String] :key_material_type
1050
+ # The key block format type such as TR-34 or TR-31 to use during key
1051
+ # material import. Import token is only required for TR-34 key import
1052
+ # `TR34_KEY_BLOCK`. Import token is not required for TR-31 key import.
1053
+ #
1054
+ # @option params [required, String] :wrapping_key_algorithm
1055
+ # The wrapping key algorithm to generate a wrapping key certificate.
1056
+ # This certificate wraps the key under import within the TR-34 key block
1057
+ # cryptogram. `RSA_2048` is the only wrapping key algorithm allowed.
1058
+ #
1059
+ # @return [Types::GetParametersForImportOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1060
+ #
1061
+ # * {Types::GetParametersForImportOutput#import_token #import_token} => String
1062
+ # * {Types::GetParametersForImportOutput#parameters_valid_until_timestamp #parameters_valid_until_timestamp} => Time
1063
+ # * {Types::GetParametersForImportOutput#wrapping_key_algorithm #wrapping_key_algorithm} => String
1064
+ # * {Types::GetParametersForImportOutput#wrapping_key_certificate #wrapping_key_certificate} => String
1065
+ # * {Types::GetParametersForImportOutput#wrapping_key_certificate_chain #wrapping_key_certificate_chain} => String
1066
+ #
1067
+ # @example Request syntax with placeholder values
1068
+ #
1069
+ # resp = client.get_parameters_for_import({
1070
+ # key_material_type: "TR34_KEY_BLOCK", # required, accepts TR34_KEY_BLOCK, TR31_KEY_BLOCK, ROOT_PUBLIC_KEY_CERTIFICATE, TRUSTED_PUBLIC_KEY_CERTIFICATE
1071
+ # wrapping_key_algorithm: "TDES_2KEY", # required, accepts TDES_2KEY, TDES_3KEY, AES_128, AES_192, AES_256, RSA_2048, RSA_3072, RSA_4096
1072
+ # })
1073
+ #
1074
+ # @example Response structure
1075
+ #
1076
+ # resp.import_token #=> String
1077
+ # resp.parameters_valid_until_timestamp #=> Time
1078
+ # resp.wrapping_key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1079
+ # resp.wrapping_key_certificate #=> String
1080
+ # resp.wrapping_key_certificate_chain #=> String
1081
+ #
1082
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/GetParametersForImport AWS API Documentation
1083
+ #
1084
+ # @overload get_parameters_for_import(params = {})
1085
+ # @param [Hash] params ({})
1086
+ def get_parameters_for_import(params = {}, options = {})
1087
+ req = build_request(:get_parameters_for_import, params)
1088
+ req.send_request(options)
1089
+ end
1090
+
1091
+ # Gets the public key certificate of the asymmetric key pair that exists
1092
+ # within Amazon Web Services Payment Cryptography.
1093
+ #
1094
+ # Unlike the private key of an asymmetric key, which never leaves Amazon
1095
+ # Web Services Payment Cryptography unencrypted, callers with
1096
+ # `GetPublicKeyCertificate` permission can download the public key
1097
+ # certificate of the asymmetric key. You can share the public key
1098
+ # certificate to allow others to encrypt messages and verify signatures
1099
+ # outside of Amazon Web Services Payment Cryptography
1100
+ #
1101
+ # **Cross-account use:** This operation can't be used across different
1102
+ # Amazon Web Services accounts.
1103
+ #
1104
+ # @option params [required, String] :key_identifier
1105
+ # The `KeyARN` of the asymmetric key pair.
1106
+ #
1107
+ # @return [Types::GetPublicKeyCertificateOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1108
+ #
1109
+ # * {Types::GetPublicKeyCertificateOutput#key_certificate #key_certificate} => String
1110
+ # * {Types::GetPublicKeyCertificateOutput#key_certificate_chain #key_certificate_chain} => String
1111
+ #
1112
+ # @example Request syntax with placeholder values
1113
+ #
1114
+ # resp = client.get_public_key_certificate({
1115
+ # key_identifier: "KeyArnOrKeyAliasType", # required
1116
+ # })
1117
+ #
1118
+ # @example Response structure
1119
+ #
1120
+ # resp.key_certificate #=> String
1121
+ # resp.key_certificate_chain #=> String
1122
+ #
1123
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/GetPublicKeyCertificate AWS API Documentation
1124
+ #
1125
+ # @overload get_public_key_certificate(params = {})
1126
+ # @param [Hash] params ({})
1127
+ def get_public_key_certificate(params = {}, options = {})
1128
+ req = build_request(:get_public_key_certificate, params)
1129
+ req.send_request(options)
1130
+ end
1131
+
1132
+ # Imports keys and public key certificates into Amazon Web Services
1133
+ # Payment Cryptography.
1134
+ #
1135
+ # Amazon Web Services Payment Cryptography simplifies main or root key
1136
+ # exchange process by eliminating the need of a paper-based key exchange
1137
+ # process. It takes a modern and secure approach based of the ANSI X9
1138
+ # TR-34 key exchange standard.
1139
+ #
1140
+ # You can use `ImportKey` to import main or root keys such as KEK (Key
1141
+ # Encryption Key) using asymmetric key exchange technique following the
1142
+ # ANSI X9 TR-34 standard. The ANSI X9 TR-34 standard uses asymmetric
1143
+ # keys to establishes bi-directional trust between the two parties
1144
+ # exchanging keys.
1145
+ #
1146
+ # After you have imported a main or root key, you can import working
1147
+ # keys to perform various cryptographic operations within Amazon Web
1148
+ # Services Payment Cryptography using the ANSI X9 TR-31 symmetric key
1149
+ # exchange standard as mandated by PCI PIN.
1150
+ #
1151
+ # You can also import a *root public key certificate*, a self-signed
1152
+ # certificate used to sign other public key certificates, or a *trusted
1153
+ # public key certificate* under an already established root public key
1154
+ # certificate.
1155
+ #
1156
+ # **To import a public root key certificate**
1157
+ #
1158
+ # Using this operation, you can import the public component (in PEM
1159
+ # cerificate format) of your private root key. You can use the imported
1160
+ # public root key certificate for digital signatures, for example
1161
+ # signing wrapping key or signing key in TR-34, within your Amazon Web
1162
+ # Services Payment Cryptography account.
1163
+ #
1164
+ # Set the following parameters:
1165
+ #
1166
+ # * `KeyMaterial`: `RootCertificatePublicKey`
1167
+ #
1168
+ # * `KeyClass`: `PUBLIC_KEY`
1169
+ #
1170
+ # * `KeyModesOfUse`: `Verify`
1171
+ #
1172
+ # * `KeyUsage`: `TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE`
1173
+ #
1174
+ # * `PublicKeyCertificate`: The certificate authority used to sign the
1175
+ # root public key certificate.
1176
+ #
1177
+ # **To import a trusted public key certificate**
1178
+ #
1179
+ # The root public key certificate must be in place and operational
1180
+ # before you import a trusted public key certificate. Set the following
1181
+ # parameters:
1182
+ #
1183
+ # * `KeyMaterial`: `TrustedCertificatePublicKey`
1184
+ #
1185
+ # * `CertificateAuthorityPublicKeyIdentifier`: `KeyArn` of the
1186
+ # `RootCertificatePublicKey`.
1187
+ #
1188
+ # * `KeyModesOfUse` and `KeyUsage`: Corresponding to the cryptographic
1189
+ # operations such as wrap, sign, or encrypt that you will allow the
1190
+ # trusted public key certificate to perform.
1191
+ #
1192
+ # * `PublicKeyCertificate`: The certificate authority used to sign the
1193
+ # trusted public key certificate.
1194
+ #
1195
+ # **Import main keys**
1196
+ #
1197
+ # Amazon Web Services Payment Cryptography uses TR-34 asymmetric key
1198
+ # exchange standard to import main keys such as KEK. In TR-34
1199
+ # terminology, the sending party of the key is called Key Distribution
1200
+ # Host (KDH) and the receiving party of the key is called Key Receiving
1201
+ # Host (KRH). During the key import process, KDH is the user who
1202
+ # initiates the key import and KRH is Amazon Web Services Payment
1203
+ # Cryptography who receives the key. Before initiating TR-34 key import,
1204
+ # you must obtain an import token by calling GetParametersForImport.
1205
+ # This operation also returns the wrapping key certificate that KDH uses
1206
+ # wrap key under import to generate a TR-34 wrapped key block. The
1207
+ # import token expires after 7 days.
1208
+ #
1209
+ # Set the following parameters:
1210
+ #
1211
+ # * `CertificateAuthorityPublicKeyIdentifier`: The `KeyArn` of the
1212
+ # certificate chain that will sign the signing key certificate and
1213
+ # should exist within Amazon Web Services Payment Cryptography before
1214
+ # initiating TR-34 key import. If it does not exist, you can import it
1215
+ # by calling by calling `ImportKey` for `RootCertificatePublicKey`.
1216
+ #
1217
+ # * `ImportToken`: Obtained from KRH by calling GetParametersForImport.
1218
+ #
1219
+ # * `WrappedKeyBlock`: The TR-34 wrapped key block from KDH. It contains
1220
+ # the KDH key under import, wrapped with KRH provided wrapping key
1221
+ # certificate and signed by the KDH private signing key. This TR-34
1222
+ # key block is generated by the KDH Hardware Security Module (HSM)
1223
+ # outside of Amazon Web Services Payment Cryptography.
1224
+ #
1225
+ # * `SigningKeyCertificate`: The public component of the private key
1226
+ # that signed the KDH TR-34 wrapped key block. In PEM certificate
1227
+ # format.
1228
+ #
1229
+ # <note markdown="1"> TR-34 is intended primarily to exchange 3DES keys. Your ability to
1230
+ # export AES-128 and larger AES keys may be dependent on your source
1231
+ # system.
1232
+ #
1233
+ # </note>
1234
+ #
1235
+ # **Import working keys**
1236
+ #
1237
+ # Amazon Web Services Payment Cryptography uses TR-31 symmetric key
1238
+ # exchange standard to import working keys. A KEK must be established
1239
+ # within Amazon Web Services Payment Cryptography by using TR-34 key
1240
+ # import. To initiate a TR-31 key import, set the following parameters:
1241
+ #
1242
+ # * `WrappedKeyBlock`: The key under import and encrypted using KEK. The
1243
+ # TR-31 key block generated by your HSM outside of Amazon Web Services
1244
+ # Payment Cryptography.
1245
+ #
1246
+ # * `WrappingKeyIdentifier`: The `KeyArn` of the KEK that Amazon Web
1247
+ # Services Payment Cryptography uses to decrypt or unwrap the key
1248
+ # under import.
1249
+ #
1250
+ # **Cross-account use:** This operation can't be used across different
1251
+ # Amazon Web Services accounts.
1252
+ #
1253
+ # **Related operations:**
1254
+ #
1255
+ # * ExportKey
1256
+ #
1257
+ # * GetParametersForImport
1258
+ #
1259
+ # @option params [Boolean] :enabled
1260
+ # Specifies whether import key is enabled.
1261
+ #
1262
+ # @option params [String] :key_check_value_algorithm
1263
+ # The algorithm that Amazon Web Services Payment Cryptography uses to
1264
+ # calculate the key check value (KCV) for DES and AES keys.
1265
+ #
1266
+ # For DES key, the KCV is computed by encrypting 8 bytes, each with
1267
+ # value '00', with the key to be checked and retaining the 3 highest
1268
+ # order bytes of the encrypted result. For AES key, the KCV is computed
1269
+ # by encrypting 8 bytes, each with value '01', with the key to be
1270
+ # checked and retaining the 3 highest order bytes of the encrypted
1271
+ # result.
1272
+ #
1273
+ # @option params [required, Types::ImportKeyMaterial] :key_material
1274
+ # The key or public key certificate type to use during key material
1275
+ # import, for example TR-34 or RootCertificatePublicKey.
1276
+ #
1277
+ # @option params [Array<Types::Tag>] :tags
1278
+ # The tags to attach to the key. Each tag consists of a tag key and a
1279
+ # tag value. Both the tag key and the tag value are required, but the
1280
+ # tag value can be an empty (null) string. You can't have more than one
1281
+ # tag on an Amazon Web Services Payment Cryptography key with the same
1282
+ # tag key.
1283
+ #
1284
+ # You can't have more than one tag on an Amazon Web Services Payment
1285
+ # Cryptography key with the same tag key. If you specify an existing tag
1286
+ # key with a different tag value, Amazon Web Services Payment
1287
+ # Cryptography replaces the current tag value with the specified one.
1288
+ #
1289
+ # To use this parameter, you must have `TagResource` permission.
1290
+ #
1291
+ # Don't include confidential or sensitive information in this field.
1292
+ # This field may be displayed in plaintext in CloudTrail logs and other
1293
+ # output.
1294
+ #
1295
+ # <note markdown="1"> Tagging or untagging an Amazon Web Services Payment Cryptography key
1296
+ # can allow or deny permission to the key.
1297
+ #
1298
+ # </note>
1299
+ #
1300
+ # @return [Types::ImportKeyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1301
+ #
1302
+ # * {Types::ImportKeyOutput#key #key} => Types::Key
1303
+ #
1304
+ # @example Request syntax with placeholder values
1305
+ #
1306
+ # resp = client.import_key({
1307
+ # enabled: false,
1308
+ # key_check_value_algorithm: "CMAC", # accepts CMAC, ANSI_X9_24
1309
+ # key_material: { # required
1310
+ # root_certificate_public_key: {
1311
+ # key_attributes: { # required
1312
+ # key_algorithm: "TDES_2KEY", # required, accepts TDES_2KEY, TDES_3KEY, AES_128, AES_192, AES_256, RSA_2048, RSA_3072, RSA_4096
1313
+ # key_class: "SYMMETRIC_KEY", # required, accepts SYMMETRIC_KEY, ASYMMETRIC_KEY_PAIR, PRIVATE_KEY, PUBLIC_KEY
1314
+ # key_modes_of_use: { # required
1315
+ # decrypt: false,
1316
+ # derive_key: false,
1317
+ # encrypt: false,
1318
+ # generate: false,
1319
+ # no_restrictions: false,
1320
+ # sign: false,
1321
+ # unwrap: false,
1322
+ # verify: false,
1323
+ # wrap: false,
1324
+ # },
1325
+ # key_usage: "TR31_B0_BASE_DERIVATION_KEY", # required, accepts TR31_B0_BASE_DERIVATION_KEY, TR31_C0_CARD_VERIFICATION_KEY, TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY, TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION, TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS, TR31_E1_EMV_MKEY_CONFIDENTIALITY, TR31_E2_EMV_MKEY_INTEGRITY, TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS, TR31_E5_EMV_MKEY_CARD_PERSONALIZATION, TR31_E6_EMV_MKEY_OTHER, TR31_K0_KEY_ENCRYPTION_KEY, TR31_K1_KEY_BLOCK_PROTECTION_KEY, TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT, TR31_M3_ISO_9797_3_MAC_KEY, TR31_M6_ISO_9797_5_CMAC_KEY, TR31_M7_HMAC_KEY, TR31_P0_PIN_ENCRYPTION_KEY, TR31_P1_PIN_GENERATION_KEY, TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE, TR31_V1_IBM3624_PIN_VERIFICATION_KEY, TR31_V2_VISA_PIN_VERIFICATION_KEY, TR31_K2_TR34_ASYMMETRIC_KEY
1326
+ # },
1327
+ # public_key_certificate: "CertificateType", # required
1328
+ # },
1329
+ # tr_31_key_block: {
1330
+ # wrapped_key_block: "Tr31WrappedKeyBlock", # required
1331
+ # wrapping_key_identifier: "KeyArnOrKeyAliasType", # required
1332
+ # },
1333
+ # tr_34_key_block: {
1334
+ # certificate_authority_public_key_identifier: "KeyArnOrKeyAliasType", # required
1335
+ # import_token: "ImportTokenId", # required
1336
+ # key_block_format: "X9_TR34_2012", # required, accepts X9_TR34_2012
1337
+ # random_nonce: "HexLength16",
1338
+ # signing_key_certificate: "CertificateType", # required
1339
+ # wrapped_key_block: "Tr34WrappedKeyBlock", # required
1340
+ # },
1341
+ # trusted_certificate_public_key: {
1342
+ # certificate_authority_public_key_identifier: "KeyArnOrKeyAliasType", # required
1343
+ # key_attributes: { # required
1344
+ # key_algorithm: "TDES_2KEY", # required, accepts TDES_2KEY, TDES_3KEY, AES_128, AES_192, AES_256, RSA_2048, RSA_3072, RSA_4096
1345
+ # key_class: "SYMMETRIC_KEY", # required, accepts SYMMETRIC_KEY, ASYMMETRIC_KEY_PAIR, PRIVATE_KEY, PUBLIC_KEY
1346
+ # key_modes_of_use: { # required
1347
+ # decrypt: false,
1348
+ # derive_key: false,
1349
+ # encrypt: false,
1350
+ # generate: false,
1351
+ # no_restrictions: false,
1352
+ # sign: false,
1353
+ # unwrap: false,
1354
+ # verify: false,
1355
+ # wrap: false,
1356
+ # },
1357
+ # key_usage: "TR31_B0_BASE_DERIVATION_KEY", # required, accepts TR31_B0_BASE_DERIVATION_KEY, TR31_C0_CARD_VERIFICATION_KEY, TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY, TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION, TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS, TR31_E1_EMV_MKEY_CONFIDENTIALITY, TR31_E2_EMV_MKEY_INTEGRITY, TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS, TR31_E5_EMV_MKEY_CARD_PERSONALIZATION, TR31_E6_EMV_MKEY_OTHER, TR31_K0_KEY_ENCRYPTION_KEY, TR31_K1_KEY_BLOCK_PROTECTION_KEY, TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT, TR31_M3_ISO_9797_3_MAC_KEY, TR31_M6_ISO_9797_5_CMAC_KEY, TR31_M7_HMAC_KEY, TR31_P0_PIN_ENCRYPTION_KEY, TR31_P1_PIN_GENERATION_KEY, TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE, TR31_V1_IBM3624_PIN_VERIFICATION_KEY, TR31_V2_VISA_PIN_VERIFICATION_KEY, TR31_K2_TR34_ASYMMETRIC_KEY
1358
+ # },
1359
+ # public_key_certificate: "CertificateType", # required
1360
+ # },
1361
+ # },
1362
+ # tags: [
1363
+ # {
1364
+ # key: "TagKey", # required
1365
+ # value: "TagValue",
1366
+ # },
1367
+ # ],
1368
+ # })
1369
+ #
1370
+ # @example Response structure
1371
+ #
1372
+ # resp.key.create_timestamp #=> Time
1373
+ # resp.key.delete_pending_timestamp #=> Time
1374
+ # resp.key.delete_timestamp #=> Time
1375
+ # resp.key.enabled #=> Boolean
1376
+ # resp.key.exportable #=> Boolean
1377
+ # resp.key.key_arn #=> String
1378
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1379
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
1380
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
1381
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
1382
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
1383
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
1384
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
1385
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
1386
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
1387
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
1388
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
1389
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
1390
+ # resp.key.key_check_value #=> String
1391
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
1392
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
1393
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
1394
+ # resp.key.usage_start_timestamp #=> Time
1395
+ # resp.key.usage_stop_timestamp #=> Time
1396
+ #
1397
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/ImportKey AWS API Documentation
1398
+ #
1399
+ # @overload import_key(params = {})
1400
+ # @param [Hash] params ({})
1401
+ def import_key(params = {}, options = {})
1402
+ req = build_request(:import_key, params)
1403
+ req.send_request(options)
1404
+ end
1405
+
1406
+ # Lists the aliases for all keys in the caller's Amazon Web Services
1407
+ # account and Amazon Web Services Region. You can filter the list of
1408
+ # aliases. For more information, see [Using aliases][1] in the *Amazon
1409
+ # Web Services Payment Cryptography User Guide*.
1410
+ #
1411
+ # This is a paginated operation, which means that each response might
1412
+ # contain only a subset of all the aliases. When the response contains
1413
+ # only a subset of aliases, it includes a `NextToken` value. Use this
1414
+ # value in a subsequent `ListAliases` request to get more aliases. When
1415
+ # you receive a response with no NextToken (or an empty or null value),
1416
+ # that means there are no more aliases to get.
1417
+ #
1418
+ # **Cross-account use:** This operation can't be used across different
1419
+ # Amazon Web Services accounts.
1420
+ #
1421
+ # **Related operations:**
1422
+ #
1423
+ # * CreateAlias
1424
+ #
1425
+ # * DeleteAlias
1426
+ #
1427
+ # * GetAlias
1428
+ #
1429
+ # * UpdateAlias
1430
+ #
1431
+ #
1432
+ #
1433
+ # [1]: https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-managealias.html
1434
+ #
1435
+ # @option params [Integer] :max_results
1436
+ # Use this parameter to specify the maximum number of items to return.
1437
+ # When this value is present, Amazon Web Services Payment Cryptography
1438
+ # does not return more than the specified number of items, but it might
1439
+ # return fewer.
1440
+ #
1441
+ # This value is optional. If you include a value, it must be between 1
1442
+ # and 100, inclusive. If you do not include a value, it defaults to 50.
1443
+ #
1444
+ # @option params [String] :next_token
1445
+ # Use this parameter in a subsequent request after you receive a
1446
+ # response with truncated results. Set it to the value of `NextToken`
1447
+ # from the truncated response you just received.
1448
+ #
1449
+ # @return [Types::ListAliasesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1450
+ #
1451
+ # * {Types::ListAliasesOutput#aliases #aliases} => Array&lt;Types::Alias&gt;
1452
+ # * {Types::ListAliasesOutput#next_token #next_token} => String
1453
+ #
1454
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1455
+ #
1456
+ # @example Request syntax with placeholder values
1457
+ #
1458
+ # resp = client.list_aliases({
1459
+ # max_results: 1,
1460
+ # next_token: "NextToken",
1461
+ # })
1462
+ #
1463
+ # @example Response structure
1464
+ #
1465
+ # resp.aliases #=> Array
1466
+ # resp.aliases[0].alias_name #=> String
1467
+ # resp.aliases[0].key_arn #=> String
1468
+ # resp.next_token #=> String
1469
+ #
1470
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/ListAliases AWS API Documentation
1471
+ #
1472
+ # @overload list_aliases(params = {})
1473
+ # @param [Hash] params ({})
1474
+ def list_aliases(params = {}, options = {})
1475
+ req = build_request(:list_aliases, params)
1476
+ req.send_request(options)
1477
+ end
1478
+
1479
+ # Lists the keys in the caller's Amazon Web Services account and Amazon
1480
+ # Web Services Region. You can filter the list of keys.
1481
+ #
1482
+ # This is a paginated operation, which means that each response might
1483
+ # contain only a subset of all the keys. When the response contains only
1484
+ # a subset of keys, it includes a `NextToken` value. Use this value in a
1485
+ # subsequent `ListKeys` request to get more keys. When you receive a
1486
+ # response with no NextToken (or an empty or null value), that means
1487
+ # there are no more keys to get.
1488
+ #
1489
+ # **Cross-account use:** This operation can't be used across different
1490
+ # Amazon Web Services accounts.
1491
+ #
1492
+ # **Related operations:**
1493
+ #
1494
+ # * CreateKey
1495
+ #
1496
+ # * DeleteKey
1497
+ #
1498
+ # * GetKey
1499
+ #
1500
+ # @option params [String] :key_state
1501
+ # The key state of the keys you want to list.
1502
+ #
1503
+ # @option params [Integer] :max_results
1504
+ # Use this parameter to specify the maximum number of items to return.
1505
+ # When this value is present, Amazon Web Services Payment Cryptography
1506
+ # does not return more than the specified number of items, but it might
1507
+ # return fewer.
1508
+ #
1509
+ # @option params [String] :next_token
1510
+ # Use this parameter in a subsequent request after you receive a
1511
+ # response with truncated results. Set it to the value of `NextToken`
1512
+ # from the truncated response you just received.
1513
+ #
1514
+ # @return [Types::ListKeysOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1515
+ #
1516
+ # * {Types::ListKeysOutput#keys #keys} => Array&lt;Types::KeySummary&gt;
1517
+ # * {Types::ListKeysOutput#next_token #next_token} => String
1518
+ #
1519
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1520
+ #
1521
+ # @example Request syntax with placeholder values
1522
+ #
1523
+ # resp = client.list_keys({
1524
+ # key_state: "CREATE_IN_PROGRESS", # accepts CREATE_IN_PROGRESS, CREATE_COMPLETE, DELETE_PENDING, DELETE_COMPLETE
1525
+ # max_results: 1,
1526
+ # next_token: "NextToken",
1527
+ # })
1528
+ #
1529
+ # @example Response structure
1530
+ #
1531
+ # resp.keys #=> Array
1532
+ # resp.keys[0].enabled #=> Boolean
1533
+ # resp.keys[0].exportable #=> Boolean
1534
+ # resp.keys[0].key_arn #=> String
1535
+ # resp.keys[0].key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1536
+ # resp.keys[0].key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
1537
+ # resp.keys[0].key_attributes.key_modes_of_use.decrypt #=> Boolean
1538
+ # resp.keys[0].key_attributes.key_modes_of_use.derive_key #=> Boolean
1539
+ # resp.keys[0].key_attributes.key_modes_of_use.encrypt #=> Boolean
1540
+ # resp.keys[0].key_attributes.key_modes_of_use.generate #=> Boolean
1541
+ # resp.keys[0].key_attributes.key_modes_of_use.no_restrictions #=> Boolean
1542
+ # resp.keys[0].key_attributes.key_modes_of_use.sign #=> Boolean
1543
+ # resp.keys[0].key_attributes.key_modes_of_use.unwrap #=> Boolean
1544
+ # resp.keys[0].key_attributes.key_modes_of_use.verify #=> Boolean
1545
+ # resp.keys[0].key_attributes.key_modes_of_use.wrap #=> Boolean
1546
+ # resp.keys[0].key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
1547
+ # resp.keys[0].key_check_value #=> String
1548
+ # resp.keys[0].key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
1549
+ # resp.next_token #=> String
1550
+ #
1551
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/ListKeys AWS API Documentation
1552
+ #
1553
+ # @overload list_keys(params = {})
1554
+ # @param [Hash] params ({})
1555
+ def list_keys(params = {}, options = {})
1556
+ req = build_request(:list_keys, params)
1557
+ req.send_request(options)
1558
+ end
1559
+
1560
+ # Lists the tags for an Amazon Web Services resource.
1561
+ #
1562
+ # This is a paginated operation, which means that each response might
1563
+ # contain only a subset of all the tags. When the response contains only
1564
+ # a subset of tags, it includes a `NextToken` value. Use this value in a
1565
+ # subsequent `ListTagsForResource` request to get more tags. When you
1566
+ # receive a response with no NextToken (or an empty or null value), that
1567
+ # means there are no more tags to get.
1568
+ #
1569
+ # **Cross-account use:** This operation can't be used across different
1570
+ # Amazon Web Services accounts.
1571
+ #
1572
+ # **Related operations:**
1573
+ #
1574
+ # * TagResource
1575
+ #
1576
+ # * UntagResource
1577
+ #
1578
+ # @option params [Integer] :max_results
1579
+ # Use this parameter to specify the maximum number of items to return.
1580
+ # When this value is present, Amazon Web Services Payment Cryptography
1581
+ # does not return more than the specified number of items, but it might
1582
+ # return fewer.
1583
+ #
1584
+ # @option params [String] :next_token
1585
+ # Use this parameter in a subsequent request after you receive a
1586
+ # response with truncated results. Set it to the value of `NextToken`
1587
+ # from the truncated response you just received.
1588
+ #
1589
+ # @option params [required, String] :resource_arn
1590
+ # The `KeyARN` of the key whose tags you are getting.
1591
+ #
1592
+ # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1593
+ #
1594
+ # * {Types::ListTagsForResourceOutput#next_token #next_token} => String
1595
+ # * {Types::ListTagsForResourceOutput#tags #tags} => Array&lt;Types::Tag&gt;
1596
+ #
1597
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1598
+ #
1599
+ # @example Request syntax with placeholder values
1600
+ #
1601
+ # resp = client.list_tags_for_resource({
1602
+ # max_results: 1,
1603
+ # next_token: "NextToken",
1604
+ # resource_arn: "ResourceArn", # required
1605
+ # })
1606
+ #
1607
+ # @example Response structure
1608
+ #
1609
+ # resp.next_token #=> String
1610
+ # resp.tags #=> Array
1611
+ # resp.tags[0].key #=> String
1612
+ # resp.tags[0].value #=> String
1613
+ #
1614
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/ListTagsForResource AWS API Documentation
1615
+ #
1616
+ # @overload list_tags_for_resource(params = {})
1617
+ # @param [Hash] params ({})
1618
+ def list_tags_for_resource(params = {}, options = {})
1619
+ req = build_request(:list_tags_for_resource, params)
1620
+ req.send_request(options)
1621
+ end
1622
+
1623
+ # Cancels a scheduled key deletion during the waiting period. Use this
1624
+ # operation to restore a `Key` that is scheduled for deletion.
1625
+ #
1626
+ # During the waiting period, the `KeyState` is `DELETE_PENDING` and
1627
+ # `deletePendingTimestamp` contains the date and time after which the
1628
+ # `Key` will be deleted. After `Key` is restored, the `KeyState` is
1629
+ # `CREATE_COMPLETE`, and the value for `deletePendingTimestamp` is
1630
+ # removed.
1631
+ #
1632
+ # **Cross-account use:** This operation can't be used across different
1633
+ # Amazon Web Services accounts.
1634
+ #
1635
+ # **Related operations:**
1636
+ #
1637
+ # * DeleteKey
1638
+ #
1639
+ # * StartKeyUsage
1640
+ #
1641
+ # * StopKeyUsage
1642
+ #
1643
+ # @option params [required, String] :key_identifier
1644
+ # The `KeyARN` of the key to be restored within Amazon Web Services
1645
+ # Payment Cryptography.
1646
+ #
1647
+ # @return [Types::RestoreKeyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1648
+ #
1649
+ # * {Types::RestoreKeyOutput#key #key} => Types::Key
1650
+ #
1651
+ # @example Request syntax with placeholder values
1652
+ #
1653
+ # resp = client.restore_key({
1654
+ # key_identifier: "KeyArnOrKeyAliasType", # required
1655
+ # })
1656
+ #
1657
+ # @example Response structure
1658
+ #
1659
+ # resp.key.create_timestamp #=> Time
1660
+ # resp.key.delete_pending_timestamp #=> Time
1661
+ # resp.key.delete_timestamp #=> Time
1662
+ # resp.key.enabled #=> Boolean
1663
+ # resp.key.exportable #=> Boolean
1664
+ # resp.key.key_arn #=> String
1665
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1666
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
1667
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
1668
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
1669
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
1670
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
1671
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
1672
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
1673
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
1674
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
1675
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
1676
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
1677
+ # resp.key.key_check_value #=> String
1678
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
1679
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
1680
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
1681
+ # resp.key.usage_start_timestamp #=> Time
1682
+ # resp.key.usage_stop_timestamp #=> Time
1683
+ #
1684
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/RestoreKey AWS API Documentation
1685
+ #
1686
+ # @overload restore_key(params = {})
1687
+ # @param [Hash] params ({})
1688
+ def restore_key(params = {}, options = {})
1689
+ req = build_request(:restore_key, params)
1690
+ req.send_request(options)
1691
+ end
1692
+
1693
+ # Enables an Amazon Web Services Payment Cryptography key, which makes
1694
+ # it active for cryptographic operations within Amazon Web Services
1695
+ # Payment Cryptography
1696
+ #
1697
+ # **Cross-account use:** This operation can't be used across different
1698
+ # Amazon Web Services accounts.
1699
+ #
1700
+ # **Related operations:**
1701
+ #
1702
+ # * StopKeyUsage
1703
+ #
1704
+ # ^
1705
+ #
1706
+ # @option params [required, String] :key_identifier
1707
+ # The `KeyArn` of the key.
1708
+ #
1709
+ # @return [Types::StartKeyUsageOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1710
+ #
1711
+ # * {Types::StartKeyUsageOutput#key #key} => Types::Key
1712
+ #
1713
+ # @example Request syntax with placeholder values
1714
+ #
1715
+ # resp = client.start_key_usage({
1716
+ # key_identifier: "KeyArnOrKeyAliasType", # required
1717
+ # })
1718
+ #
1719
+ # @example Response structure
1720
+ #
1721
+ # resp.key.create_timestamp #=> Time
1722
+ # resp.key.delete_pending_timestamp #=> Time
1723
+ # resp.key.delete_timestamp #=> Time
1724
+ # resp.key.enabled #=> Boolean
1725
+ # resp.key.exportable #=> Boolean
1726
+ # resp.key.key_arn #=> String
1727
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1728
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
1729
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
1730
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
1731
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
1732
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
1733
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
1734
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
1735
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
1736
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
1737
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
1738
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
1739
+ # resp.key.key_check_value #=> String
1740
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
1741
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
1742
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
1743
+ # resp.key.usage_start_timestamp #=> Time
1744
+ # resp.key.usage_stop_timestamp #=> Time
1745
+ #
1746
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/StartKeyUsage AWS API Documentation
1747
+ #
1748
+ # @overload start_key_usage(params = {})
1749
+ # @param [Hash] params ({})
1750
+ def start_key_usage(params = {}, options = {})
1751
+ req = build_request(:start_key_usage, params)
1752
+ req.send_request(options)
1753
+ end
1754
+
1755
+ # Disables an Amazon Web Services Payment Cryptography key, which makes
1756
+ # it inactive within Amazon Web Services Payment Cryptography.
1757
+ #
1758
+ # You can use this operation instead of DeleteKey to deactivate a key.
1759
+ # You can enable the key in the future by calling StartKeyUsage.
1760
+ #
1761
+ # **Cross-account use:** This operation can't be used across different
1762
+ # Amazon Web Services accounts.
1763
+ #
1764
+ # **Related operations:**
1765
+ #
1766
+ # * DeleteKey
1767
+ #
1768
+ # * StartKeyUsage
1769
+ #
1770
+ # @option params [required, String] :key_identifier
1771
+ # The `KeyArn` of the key.
1772
+ #
1773
+ # @return [Types::StopKeyUsageOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1774
+ #
1775
+ # * {Types::StopKeyUsageOutput#key #key} => Types::Key
1776
+ #
1777
+ # @example Request syntax with placeholder values
1778
+ #
1779
+ # resp = client.stop_key_usage({
1780
+ # key_identifier: "KeyArnOrKeyAliasType", # required
1781
+ # })
1782
+ #
1783
+ # @example Response structure
1784
+ #
1785
+ # resp.key.create_timestamp #=> Time
1786
+ # resp.key.delete_pending_timestamp #=> Time
1787
+ # resp.key.delete_timestamp #=> Time
1788
+ # resp.key.enabled #=> Boolean
1789
+ # resp.key.exportable #=> Boolean
1790
+ # resp.key.key_arn #=> String
1791
+ # resp.key.key_attributes.key_algorithm #=> String, one of "TDES_2KEY", "TDES_3KEY", "AES_128", "AES_192", "AES_256", "RSA_2048", "RSA_3072", "RSA_4096"
1792
+ # resp.key.key_attributes.key_class #=> String, one of "SYMMETRIC_KEY", "ASYMMETRIC_KEY_PAIR", "PRIVATE_KEY", "PUBLIC_KEY"
1793
+ # resp.key.key_attributes.key_modes_of_use.decrypt #=> Boolean
1794
+ # resp.key.key_attributes.key_modes_of_use.derive_key #=> Boolean
1795
+ # resp.key.key_attributes.key_modes_of_use.encrypt #=> Boolean
1796
+ # resp.key.key_attributes.key_modes_of_use.generate #=> Boolean
1797
+ # resp.key.key_attributes.key_modes_of_use.no_restrictions #=> Boolean
1798
+ # resp.key.key_attributes.key_modes_of_use.sign #=> Boolean
1799
+ # resp.key.key_attributes.key_modes_of_use.unwrap #=> Boolean
1800
+ # resp.key.key_attributes.key_modes_of_use.verify #=> Boolean
1801
+ # resp.key.key_attributes.key_modes_of_use.wrap #=> Boolean
1802
+ # resp.key.key_attributes.key_usage #=> String, one of "TR31_B0_BASE_DERIVATION_KEY", "TR31_C0_CARD_VERIFICATION_KEY", "TR31_D0_SYMMETRIC_DATA_ENCRYPTION_KEY", "TR31_D1_ASYMMETRIC_KEY_FOR_DATA_ENCRYPTION", "TR31_E0_EMV_MKEY_APP_CRYPTOGRAMS", "TR31_E1_EMV_MKEY_CONFIDENTIALITY", "TR31_E2_EMV_MKEY_INTEGRITY", "TR31_E4_EMV_MKEY_DYNAMIC_NUMBERS", "TR31_E5_EMV_MKEY_CARD_PERSONALIZATION", "TR31_E6_EMV_MKEY_OTHER", "TR31_K0_KEY_ENCRYPTION_KEY", "TR31_K1_KEY_BLOCK_PROTECTION_KEY", "TR31_K3_ASYMMETRIC_KEY_FOR_KEY_AGREEMENT", "TR31_M3_ISO_9797_3_MAC_KEY", "TR31_M6_ISO_9797_5_CMAC_KEY", "TR31_M7_HMAC_KEY", "TR31_P0_PIN_ENCRYPTION_KEY", "TR31_P1_PIN_GENERATION_KEY", "TR31_S0_ASYMMETRIC_KEY_FOR_DIGITAL_SIGNATURE", "TR31_V1_IBM3624_PIN_VERIFICATION_KEY", "TR31_V2_VISA_PIN_VERIFICATION_KEY", "TR31_K2_TR34_ASYMMETRIC_KEY"
1803
+ # resp.key.key_check_value #=> String
1804
+ # resp.key.key_check_value_algorithm #=> String, one of "CMAC", "ANSI_X9_24"
1805
+ # resp.key.key_origin #=> String, one of "EXTERNAL", "AWS_PAYMENT_CRYPTOGRAPHY"
1806
+ # resp.key.key_state #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "DELETE_PENDING", "DELETE_COMPLETE"
1807
+ # resp.key.usage_start_timestamp #=> Time
1808
+ # resp.key.usage_stop_timestamp #=> Time
1809
+ #
1810
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/StopKeyUsage AWS API Documentation
1811
+ #
1812
+ # @overload stop_key_usage(params = {})
1813
+ # @param [Hash] params ({})
1814
+ def stop_key_usage(params = {}, options = {})
1815
+ req = build_request(:stop_key_usage, params)
1816
+ req.send_request(options)
1817
+ end
1818
+
1819
+ # Adds or edits tags on an Amazon Web Services Payment Cryptography key.
1820
+ #
1821
+ # <note markdown="1"> Tagging or untagging an Amazon Web Services Payment Cryptography key
1822
+ # can allow or deny permission to the key.
1823
+ #
1824
+ # </note>
1825
+ #
1826
+ # Each tag consists of a tag key and a tag value, both of which are
1827
+ # case-sensitive strings. The tag value can be an empty (null) string.
1828
+ # To add a tag, specify a new tag key and a tag value. To edit a tag,
1829
+ # specify an existing tag key and a new tag value. You can also add tags
1830
+ # to an Amazon Web Services Payment Cryptography key when you create it
1831
+ # with CreateKey.
1832
+ #
1833
+ # **Cross-account use:** This operation can't be used across different
1834
+ # Amazon Web Services accounts.
1835
+ #
1836
+ # **Related operations:**
1837
+ #
1838
+ # * ListTagsForResource
1839
+ #
1840
+ # * UntagResource
1841
+ #
1842
+ # @option params [required, String] :resource_arn
1843
+ # The `KeyARN` of the key whose tags are being updated.
1844
+ #
1845
+ # @option params [required, Array<Types::Tag>] :tags
1846
+ # One or more tags. Each tag consists of a tag key and a tag value. The
1847
+ # tag value can be an empty (null) string. You can't have more than one
1848
+ # tag on an Amazon Web Services Payment Cryptography key with the same
1849
+ # tag key. If you specify an existing tag key with a different tag
1850
+ # value, Amazon Web Services Payment Cryptography replaces the current
1851
+ # tag value with the new one.
1852
+ #
1853
+ # Don't include confidential or sensitive information in this field.
1854
+ # This field may be displayed in plaintext in CloudTrail logs and other
1855
+ # output.
1856
+ #
1857
+ # To use this parameter, you must have TagResource permission in an IAM
1858
+ # policy.
1859
+ #
1860
+ # Don't include confidential or sensitive information in this field.
1861
+ # This field may be displayed in plaintext in CloudTrail logs and other
1862
+ # output.
1863
+ #
1864
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1865
+ #
1866
+ # @example Request syntax with placeholder values
1867
+ #
1868
+ # resp = client.tag_resource({
1869
+ # resource_arn: "ResourceArn", # required
1870
+ # tags: [ # required
1871
+ # {
1872
+ # key: "TagKey", # required
1873
+ # value: "TagValue",
1874
+ # },
1875
+ # ],
1876
+ # })
1877
+ #
1878
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/TagResource AWS API Documentation
1879
+ #
1880
+ # @overload tag_resource(params = {})
1881
+ # @param [Hash] params ({})
1882
+ def tag_resource(params = {}, options = {})
1883
+ req = build_request(:tag_resource, params)
1884
+ req.send_request(options)
1885
+ end
1886
+
1887
+ # Deletes a tag from an Amazon Web Services Payment Cryptography key.
1888
+ #
1889
+ # <note markdown="1"> Tagging or untagging an Amazon Web Services Payment Cryptography key
1890
+ # can allow or deny permission to the key.
1891
+ #
1892
+ # </note>
1893
+ #
1894
+ # **Cross-account use:** This operation can't be used across different
1895
+ # Amazon Web Services accounts.
1896
+ #
1897
+ # **Related operations:**
1898
+ #
1899
+ # * ListTagsForResource
1900
+ #
1901
+ # * TagResource
1902
+ #
1903
+ # @option params [required, String] :resource_arn
1904
+ # The `KeyARN` of the key whose tags are being removed.
1905
+ #
1906
+ # @option params [required, Array<String>] :tag_keys
1907
+ # One or more tag keys. Don't include the tag values.
1908
+ #
1909
+ # If the Amazon Web Services Payment Cryptography key doesn't have the
1910
+ # specified tag key, Amazon Web Services Payment Cryptography doesn't
1911
+ # throw an exception or return a response. To confirm that the operation
1912
+ # succeeded, use the ListTagsForResource operation.
1913
+ #
1914
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1915
+ #
1916
+ # @example Request syntax with placeholder values
1917
+ #
1918
+ # resp = client.untag_resource({
1919
+ # resource_arn: "ResourceArn", # required
1920
+ # tag_keys: ["TagKey"], # required
1921
+ # })
1922
+ #
1923
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/UntagResource AWS API Documentation
1924
+ #
1925
+ # @overload untag_resource(params = {})
1926
+ # @param [Hash] params ({})
1927
+ def untag_resource(params = {}, options = {})
1928
+ req = build_request(:untag_resource, params)
1929
+ req.send_request(options)
1930
+ end
1931
+
1932
+ # Associates an existing Amazon Web Services Payment Cryptography alias
1933
+ # with a different key. Each alias is associated with only one Amazon
1934
+ # Web Services Payment Cryptography key at a time, although a key can
1935
+ # have multiple aliases. The alias and the Amazon Web Services Payment
1936
+ # Cryptography key must be in the same Amazon Web Services account and
1937
+ # Amazon Web Services Region
1938
+ #
1939
+ # **Cross-account use:** This operation can't be used across different
1940
+ # Amazon Web Services accounts.
1941
+ #
1942
+ # **Related operations:**
1943
+ #
1944
+ # * CreateAlias
1945
+ #
1946
+ # * DeleteAlias
1947
+ #
1948
+ # * GetAlias
1949
+ #
1950
+ # * ListAliases
1951
+ #
1952
+ # @option params [required, String] :alias_name
1953
+ # The alias whose associated key is changing.
1954
+ #
1955
+ # @option params [String] :key_arn
1956
+ # The `KeyARN` for the key that you are updating or removing from the
1957
+ # alias.
1958
+ #
1959
+ # @return [Types::UpdateAliasOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1960
+ #
1961
+ # * {Types::UpdateAliasOutput#alias #alias} => Types::Alias
1962
+ #
1963
+ # @example Request syntax with placeholder values
1964
+ #
1965
+ # resp = client.update_alias({
1966
+ # alias_name: "AliasName", # required
1967
+ # key_arn: "KeyArn",
1968
+ # })
1969
+ #
1970
+ # @example Response structure
1971
+ #
1972
+ # resp.alias.alias_name #=> String
1973
+ # resp.alias.key_arn #=> String
1974
+ #
1975
+ # @see http://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/UpdateAlias AWS API Documentation
1976
+ #
1977
+ # @overload update_alias(params = {})
1978
+ # @param [Hash] params ({})
1979
+ def update_alias(params = {}, options = {})
1980
+ req = build_request(:update_alias, params)
1981
+ req.send_request(options)
1982
+ end
1983
+
1984
+ # @!endgroup
1985
+
1986
+ # @param params ({})
1987
+ # @api private
1988
+ def build_request(operation_name, params = {})
1989
+ handlers = @handlers.for(operation_name)
1990
+ context = Seahorse::Client::RequestContext.new(
1991
+ operation_name: operation_name,
1992
+ operation: config.api.operation(operation_name),
1993
+ client: self,
1994
+ params: params,
1995
+ config: config)
1996
+ context[:gem_name] = 'aws-sdk-paymentcryptography'
1997
+ context[:gem_version] = '1.0.0'
1998
+ Seahorse::Client::Request.new(handlers, context)
1999
+ end
2000
+
2001
+ # @api private
2002
+ # @deprecated
2003
+ def waiter_names
2004
+ []
2005
+ end
2006
+
2007
+ class << self
2008
+
2009
+ # @api private
2010
+ attr_reader :identifier
2011
+
2012
+ # @api private
2013
+ def errors_module
2014
+ Errors
2015
+ end
2016
+
2017
+ end
2018
+ end
2019
+ end