aws-sdk-cloudhsmv2 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 04c293ebb453f589217f46fb3c5fdbce4b3b4a1d
4
+ data.tar.gz: e24c539d5fce1ad5c014dcaeece3b27974d44b59
5
+ SHA512:
6
+ metadata.gz: dde08802512b6f1d0ee84368e581199f3ca7d6c3fd3a6933ec84bd01f5085a5b159cffcef60dec34a4ec054c965b90ba73ec403274f72f93567301063ee8cba1
7
+ data.tar.gz: ea5de3f8fdc77872a6cb1e6ebc65d1e124958cf4259ccc9a548e9b7b1d0e4a809f55f8c916b0ee77a84c684b49220ceec10588ee780e7993148a26be5fe05b13
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-cloudhsmv2/types'
12
+ require_relative 'aws-sdk-cloudhsmv2/client_api'
13
+ require_relative 'aws-sdk-cloudhsmv2/client'
14
+ require_relative 'aws-sdk-cloudhsmv2/errors'
15
+ require_relative 'aws-sdk-cloudhsmv2/resource'
16
+ require_relative 'aws-sdk-cloudhsmv2/customizations'
17
+
18
+ # This module provides support for AWS CloudHSM V2. This module is available in the
19
+ # `aws-sdk-cloudhsmv2` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS CloudHSM V2 all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CloudHSMV2::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CloudHSMV2
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,726 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
22
+ require 'aws-sdk-core/plugins/signature_v4.rb'
23
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
24
+
25
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudhsmv2)
26
+
27
+ module Aws::CloudHSMV2
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :cloudhsmv2
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
52
+
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
155
+
156
+ # @!group API Operations
157
+
158
+ # Creates a new AWS CloudHSM cluster.
159
+ #
160
+ # @option params [required, Array<String>] :subnet_ids
161
+ # The identifiers (IDs) of the subnets where you are creating the
162
+ # cluster. You must specify at least one subnet. If you specify multiple
163
+ # subnets, they must meet the following criteria:
164
+ #
165
+ # * All subnets must be in the same virtual private cloud (VPC).
166
+ #
167
+ # * You can specify only one subnet per Availability Zone.
168
+ #
169
+ # @option params [required, String] :hsm_type
170
+ # The type of HSM to use in the cluster. Currently the only allowed
171
+ # value is `hsm1.medium`.
172
+ #
173
+ # @option params [String] :source_backup_id
174
+ # The identifier (ID) of the cluster backup to restore. Use this value
175
+ # to restore the cluster from a backup instead of creating a new
176
+ # cluster. To find the backup ID, use DescribeBackups.
177
+ #
178
+ # @return [Types::CreateClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
179
+ #
180
+ # * {Types::CreateClusterResponse#cluster #cluster} => Types::Cluster
181
+ #
182
+ # @example Request syntax with placeholder values
183
+ #
184
+ # resp = client.create_cluster({
185
+ # subnet_ids: ["SubnetId"], # required
186
+ # hsm_type: "HsmType", # required
187
+ # source_backup_id: "BackupId",
188
+ # })
189
+ #
190
+ # @example Response structure
191
+ #
192
+ # resp.cluster.backup_policy #=> String, one of "DEFAULT"
193
+ # resp.cluster.cluster_id #=> String
194
+ # resp.cluster.create_timestamp #=> Time
195
+ # resp.cluster.hsms #=> Array
196
+ # resp.cluster.hsms[0].availability_zone #=> String
197
+ # resp.cluster.hsms[0].cluster_id #=> String
198
+ # resp.cluster.hsms[0].subnet_id #=> String
199
+ # resp.cluster.hsms[0].eni_id #=> String
200
+ # resp.cluster.hsms[0].eni_ip #=> String
201
+ # resp.cluster.hsms[0].hsm_id #=> String
202
+ # resp.cluster.hsms[0].state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
203
+ # resp.cluster.hsms[0].state_message #=> String
204
+ # resp.cluster.hsm_type #=> String
205
+ # resp.cluster.pre_co_password #=> String
206
+ # resp.cluster.security_group #=> String
207
+ # resp.cluster.source_backup_id #=> String
208
+ # resp.cluster.state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
209
+ # resp.cluster.state_message #=> String
210
+ # resp.cluster.subnet_mapping #=> Hash
211
+ # resp.cluster.subnet_mapping["ExternalAz"] #=> String
212
+ # resp.cluster.vpc_id #=> String
213
+ # resp.cluster.certificates.cluster_csr #=> String
214
+ # resp.cluster.certificates.hsm_certificate #=> String
215
+ # resp.cluster.certificates.aws_hardware_certificate #=> String
216
+ # resp.cluster.certificates.manufacturer_hardware_certificate #=> String
217
+ # resp.cluster.certificates.cluster_certificate #=> String
218
+ #
219
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster AWS API Documentation
220
+ #
221
+ # @overload create_cluster(params = {})
222
+ # @param [Hash] params ({})
223
+ def create_cluster(params = {}, options = {})
224
+ req = build_request(:create_cluster, params)
225
+ req.send_request(options)
226
+ end
227
+
228
+ # Creates a new hardware security module (HSM) in the specified AWS
229
+ # CloudHSM cluster.
230
+ #
231
+ # @option params [required, String] :cluster_id
232
+ # The identifier (ID) of the HSM's cluster. To find the cluster ID, use
233
+ # DescribeClusters.
234
+ #
235
+ # @option params [required, String] :availability_zone
236
+ # The Availability Zone where you are creating the HSM. To find the
237
+ # cluster's Availability Zones, use DescribeClusters.
238
+ #
239
+ # @option params [String] :ip_address
240
+ # The HSM's IP address. If you specify an IP address, use an available
241
+ # address from the subnet that maps to the Availability Zone where you
242
+ # are creating the HSM. If you don't specify an IP address, one is
243
+ # chosen for you from that subnet.
244
+ #
245
+ # @return [Types::CreateHsmResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
246
+ #
247
+ # * {Types::CreateHsmResponse#hsm #hsm} => Types::Hsm
248
+ #
249
+ # @example Request syntax with placeholder values
250
+ #
251
+ # resp = client.create_hsm({
252
+ # cluster_id: "ClusterId", # required
253
+ # availability_zone: "ExternalAz", # required
254
+ # ip_address: "IpAddress",
255
+ # })
256
+ #
257
+ # @example Response structure
258
+ #
259
+ # resp.hsm.availability_zone #=> String
260
+ # resp.hsm.cluster_id #=> String
261
+ # resp.hsm.subnet_id #=> String
262
+ # resp.hsm.eni_id #=> String
263
+ # resp.hsm.eni_ip #=> String
264
+ # resp.hsm.hsm_id #=> String
265
+ # resp.hsm.state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
266
+ # resp.hsm.state_message #=> String
267
+ #
268
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm AWS API Documentation
269
+ #
270
+ # @overload create_hsm(params = {})
271
+ # @param [Hash] params ({})
272
+ def create_hsm(params = {}, options = {})
273
+ req = build_request(:create_hsm, params)
274
+ req.send_request(options)
275
+ end
276
+
277
+ # Deletes the specified AWS CloudHSM cluster. Before you can delete a
278
+ # cluster, you must delete all HSMs in the cluster. To see if the
279
+ # cluster contains any HSMs, use DescribeClusters. To delete an HSM, use
280
+ # DeleteHsm.
281
+ #
282
+ # @option params [required, String] :cluster_id
283
+ # The identifier (ID) of the cluster that you are deleting. To find the
284
+ # cluster ID, use DescribeClusters.
285
+ #
286
+ # @return [Types::DeleteClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
287
+ #
288
+ # * {Types::DeleteClusterResponse#cluster #cluster} => Types::Cluster
289
+ #
290
+ # @example Request syntax with placeholder values
291
+ #
292
+ # resp = client.delete_cluster({
293
+ # cluster_id: "ClusterId", # required
294
+ # })
295
+ #
296
+ # @example Response structure
297
+ #
298
+ # resp.cluster.backup_policy #=> String, one of "DEFAULT"
299
+ # resp.cluster.cluster_id #=> String
300
+ # resp.cluster.create_timestamp #=> Time
301
+ # resp.cluster.hsms #=> Array
302
+ # resp.cluster.hsms[0].availability_zone #=> String
303
+ # resp.cluster.hsms[0].cluster_id #=> String
304
+ # resp.cluster.hsms[0].subnet_id #=> String
305
+ # resp.cluster.hsms[0].eni_id #=> String
306
+ # resp.cluster.hsms[0].eni_ip #=> String
307
+ # resp.cluster.hsms[0].hsm_id #=> String
308
+ # resp.cluster.hsms[0].state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
309
+ # resp.cluster.hsms[0].state_message #=> String
310
+ # resp.cluster.hsm_type #=> String
311
+ # resp.cluster.pre_co_password #=> String
312
+ # resp.cluster.security_group #=> String
313
+ # resp.cluster.source_backup_id #=> String
314
+ # resp.cluster.state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
315
+ # resp.cluster.state_message #=> String
316
+ # resp.cluster.subnet_mapping #=> Hash
317
+ # resp.cluster.subnet_mapping["ExternalAz"] #=> String
318
+ # resp.cluster.vpc_id #=> String
319
+ # resp.cluster.certificates.cluster_csr #=> String
320
+ # resp.cluster.certificates.hsm_certificate #=> String
321
+ # resp.cluster.certificates.aws_hardware_certificate #=> String
322
+ # resp.cluster.certificates.manufacturer_hardware_certificate #=> String
323
+ # resp.cluster.certificates.cluster_certificate #=> String
324
+ #
325
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster AWS API Documentation
326
+ #
327
+ # @overload delete_cluster(params = {})
328
+ # @param [Hash] params ({})
329
+ def delete_cluster(params = {}, options = {})
330
+ req = build_request(:delete_cluster, params)
331
+ req.send_request(options)
332
+ end
333
+
334
+ # Deletes the specified HSM. To specify an HSM, you can use its
335
+ # identifier (ID), the IP address of the HSM's elastic network
336
+ # interface (ENI), or the ID of the HSM's ENI. You need to specify only
337
+ # one of these values. To find these values, use DescribeClusters.
338
+ #
339
+ # @option params [required, String] :cluster_id
340
+ # The identifier (ID) of the cluster that contains the HSM that you are
341
+ # deleting.
342
+ #
343
+ # @option params [String] :hsm_id
344
+ # The identifier (ID) of the HSM that you are deleting.
345
+ #
346
+ # @option params [String] :eni_id
347
+ # The identifier (ID) of the elastic network interface (ENI) of the HSM
348
+ # that you are deleting.
349
+ #
350
+ # @option params [String] :eni_ip
351
+ # The IP address of the elastic network interface (ENI) of the HSM that
352
+ # you are deleting.
353
+ #
354
+ # @return [Types::DeleteHsmResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
355
+ #
356
+ # * {Types::DeleteHsmResponse#hsm_id #hsm_id} => String
357
+ #
358
+ # @example Request syntax with placeholder values
359
+ #
360
+ # resp = client.delete_hsm({
361
+ # cluster_id: "ClusterId", # required
362
+ # hsm_id: "HsmId",
363
+ # eni_id: "EniId",
364
+ # eni_ip: "IpAddress",
365
+ # })
366
+ #
367
+ # @example Response structure
368
+ #
369
+ # resp.hsm_id #=> String
370
+ #
371
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm AWS API Documentation
372
+ #
373
+ # @overload delete_hsm(params = {})
374
+ # @param [Hash] params ({})
375
+ def delete_hsm(params = {}, options = {})
376
+ req = build_request(:delete_hsm, params)
377
+ req.send_request(options)
378
+ end
379
+
380
+ # Gets information about backups of AWS CloudHSM clusters.
381
+ #
382
+ # This is a paginated operation, which means that each response might
383
+ # contain only a subset of all the backups. When the response contains
384
+ # only a subset of backups, it includes a `NextToken` value. Use this
385
+ # value in a subsequent `DescribeBackups` request to get more backups.
386
+ # When you receive a response with no `NextToken` (or an empty or null
387
+ # value), that means there are no more backups to get.
388
+ #
389
+ # @option params [String] :next_token
390
+ # The `NextToken` value that you received in the previous response. Use
391
+ # this value to get more backups.
392
+ #
393
+ # @option params [Integer] :max_results
394
+ # The maximum number of backups to return in the response. When there
395
+ # are more backups than the number you specify, the response contains a
396
+ # `NextToken` value.
397
+ #
398
+ # @option params [Hash<String,Array>] :filters
399
+ # One or more filters to limit the items returned in the response.
400
+ #
401
+ # Use the `backupIds` filter to return only the specified backups.
402
+ # Specify backups by their backup identifier (ID).
403
+ #
404
+ # Use the `clusterIds` filter to return only the backups for the
405
+ # specified clusters. Specify clusters by their cluster identifier (ID).
406
+ #
407
+ # Use the `states` filter to return only backups that match the
408
+ # specified state.
409
+ #
410
+ # @return [Types::DescribeBackupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
411
+ #
412
+ # * {Types::DescribeBackupsResponse#backups #backups} => Array&lt;Types::Backup&gt;
413
+ # * {Types::DescribeBackupsResponse#next_token #next_token} => String
414
+ #
415
+ # @example Request syntax with placeholder values
416
+ #
417
+ # resp = client.describe_backups({
418
+ # next_token: "NextToken",
419
+ # max_results: 1,
420
+ # filters: {
421
+ # "Field" => ["String"],
422
+ # },
423
+ # })
424
+ #
425
+ # @example Response structure
426
+ #
427
+ # resp.backups #=> Array
428
+ # resp.backups[0].backup_id #=> String
429
+ # resp.backups[0].backup_state #=> String, one of "CREATE_IN_PROGRESS", "READY", "DELETED"
430
+ # resp.backups[0].cluster_id #=> String
431
+ # resp.backups[0].create_timestamp #=> Time
432
+ # resp.next_token #=> String
433
+ #
434
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups AWS API Documentation
435
+ #
436
+ # @overload describe_backups(params = {})
437
+ # @param [Hash] params ({})
438
+ def describe_backups(params = {}, options = {})
439
+ req = build_request(:describe_backups, params)
440
+ req.send_request(options)
441
+ end
442
+
443
+ # Gets information about AWS CloudHSM clusters.
444
+ #
445
+ # This is a paginated operation, which means that each response might
446
+ # contain only a subset of all the clusters. When the response contains
447
+ # only a subset of clusters, it includes a `NextToken` value. Use this
448
+ # value in a subsequent `DescribeClusters` request to get more clusters.
449
+ # When you receive a response with no `NextToken` (or an empty or null
450
+ # value), that means there are no more clusters to get.
451
+ #
452
+ # @option params [Hash<String,Array>] :filters
453
+ # One or more filters to limit the items returned in the response.
454
+ #
455
+ # Use the `clusterIds` filter to return only the specified clusters.
456
+ # Specify clusters by their cluster identifier (ID).
457
+ #
458
+ # Use the `vpcIds` filter to return only the clusters in the specified
459
+ # virtual private clouds (VPCs). Specify VPCs by their VPC identifier
460
+ # (ID).
461
+ #
462
+ # Use the `states` filter to return only clusters that match the
463
+ # specified state.
464
+ #
465
+ # @option params [String] :next_token
466
+ # The `NextToken` value that you received in the previous response. Use
467
+ # this value to get more clusters.
468
+ #
469
+ # @option params [Integer] :max_results
470
+ # The maximum number of clusters to return in the response. When there
471
+ # are more clusters than the number you specify, the response contains a
472
+ # `NextToken` value.
473
+ #
474
+ # @return [Types::DescribeClustersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
475
+ #
476
+ # * {Types::DescribeClustersResponse#clusters #clusters} => Array&lt;Types::Cluster&gt;
477
+ # * {Types::DescribeClustersResponse#next_token #next_token} => String
478
+ #
479
+ # @example Request syntax with placeholder values
480
+ #
481
+ # resp = client.describe_clusters({
482
+ # filters: {
483
+ # "Field" => ["String"],
484
+ # },
485
+ # next_token: "NextToken",
486
+ # max_results: 1,
487
+ # })
488
+ #
489
+ # @example Response structure
490
+ #
491
+ # resp.clusters #=> Array
492
+ # resp.clusters[0].backup_policy #=> String, one of "DEFAULT"
493
+ # resp.clusters[0].cluster_id #=> String
494
+ # resp.clusters[0].create_timestamp #=> Time
495
+ # resp.clusters[0].hsms #=> Array
496
+ # resp.clusters[0].hsms[0].availability_zone #=> String
497
+ # resp.clusters[0].hsms[0].cluster_id #=> String
498
+ # resp.clusters[0].hsms[0].subnet_id #=> String
499
+ # resp.clusters[0].hsms[0].eni_id #=> String
500
+ # resp.clusters[0].hsms[0].eni_ip #=> String
501
+ # resp.clusters[0].hsms[0].hsm_id #=> String
502
+ # resp.clusters[0].hsms[0].state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
503
+ # resp.clusters[0].hsms[0].state_message #=> String
504
+ # resp.clusters[0].hsm_type #=> String
505
+ # resp.clusters[0].pre_co_password #=> String
506
+ # resp.clusters[0].security_group #=> String
507
+ # resp.clusters[0].source_backup_id #=> String
508
+ # resp.clusters[0].state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
509
+ # resp.clusters[0].state_message #=> String
510
+ # resp.clusters[0].subnet_mapping #=> Hash
511
+ # resp.clusters[0].subnet_mapping["ExternalAz"] #=> String
512
+ # resp.clusters[0].vpc_id #=> String
513
+ # resp.clusters[0].certificates.cluster_csr #=> String
514
+ # resp.clusters[0].certificates.hsm_certificate #=> String
515
+ # resp.clusters[0].certificates.aws_hardware_certificate #=> String
516
+ # resp.clusters[0].certificates.manufacturer_hardware_certificate #=> String
517
+ # resp.clusters[0].certificates.cluster_certificate #=> String
518
+ # resp.next_token #=> String
519
+ #
520
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters AWS API Documentation
521
+ #
522
+ # @overload describe_clusters(params = {})
523
+ # @param [Hash] params ({})
524
+ def describe_clusters(params = {}, options = {})
525
+ req = build_request(:describe_clusters, params)
526
+ req.send_request(options)
527
+ end
528
+
529
+ # Claims an AWS CloudHSM cluster by submitting the cluster certificate
530
+ # issued by your issuing certificate authority (CA) and the CA's root
531
+ # certificate. Before you can claim a cluster, you must sign the
532
+ # cluster's certificate signing request (CSR) with your issuing CA. To
533
+ # get the cluster's CSR, use DescribeClusters.
534
+ #
535
+ # @option params [required, String] :cluster_id
536
+ # The identifier (ID) of the cluster that you are claiming. To find the
537
+ # cluster ID, use DescribeClusters.
538
+ #
539
+ # @option params [required, String] :signed_cert
540
+ # The cluster certificate issued (signed) by your issuing certificate
541
+ # authority (CA). The certificate must be in PEM format.
542
+ #
543
+ # @option params [required, String] :trust_anchor
544
+ # The issuing certificate of the issuing certificate authority (CA) that
545
+ # issued (signed) the cluster certificate. This can be a root
546
+ # (self-signed) certificate or a certificate chain that begins with the
547
+ # certificate that issued the cluster certificate and ends with a root
548
+ # certificate. The certificate or certificate chain must be in PEM
549
+ # format.
550
+ #
551
+ # @return [Types::InitializeClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
552
+ #
553
+ # * {Types::InitializeClusterResponse#state #state} => String
554
+ # * {Types::InitializeClusterResponse#state_message #state_message} => String
555
+ #
556
+ # @example Request syntax with placeholder values
557
+ #
558
+ # resp = client.initialize_cluster({
559
+ # cluster_id: "ClusterId", # required
560
+ # signed_cert: "Cert", # required
561
+ # trust_anchor: "Cert", # required
562
+ # })
563
+ #
564
+ # @example Response structure
565
+ #
566
+ # resp.state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
567
+ # resp.state_message #=> String
568
+ #
569
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster AWS API Documentation
570
+ #
571
+ # @overload initialize_cluster(params = {})
572
+ # @param [Hash] params ({})
573
+ def initialize_cluster(params = {}, options = {})
574
+ req = build_request(:initialize_cluster, params)
575
+ req.send_request(options)
576
+ end
577
+
578
+ # Gets a list of tags for the specified AWS CloudHSM cluster.
579
+ #
580
+ # This is a paginated operation, which means that each response might
581
+ # contain only a subset of all the tags. When the response contains only
582
+ # a subset of tags, it includes a `NextToken` value. Use this value in a
583
+ # subsequent `ListTags` request to get more tags. When you receive a
584
+ # response with no `NextToken` (or an empty or null value), that means
585
+ # there are no more tags to get.
586
+ #
587
+ # @option params [required, String] :resource_id
588
+ # The cluster identifier (ID) for the cluster whose tags you are
589
+ # getting. To find the cluster ID, use DescribeClusters.
590
+ #
591
+ # @option params [String] :next_token
592
+ # The `NextToken` value that you received in the previous response. Use
593
+ # this value to get more tags.
594
+ #
595
+ # @option params [Integer] :max_results
596
+ # The maximum number of tags to return in the response. When there are
597
+ # more tags than the number you specify, the response contains a
598
+ # `NextToken` value.
599
+ #
600
+ # @return [Types::ListTagsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
601
+ #
602
+ # * {Types::ListTagsResponse#tag_list #tag_list} => Array&lt;Types::Tag&gt;
603
+ # * {Types::ListTagsResponse#next_token #next_token} => String
604
+ #
605
+ # @example Request syntax with placeholder values
606
+ #
607
+ # resp = client.list_tags({
608
+ # resource_id: "ClusterId", # required
609
+ # next_token: "NextToken",
610
+ # max_results: 1,
611
+ # })
612
+ #
613
+ # @example Response structure
614
+ #
615
+ # resp.tag_list #=> Array
616
+ # resp.tag_list[0].key #=> String
617
+ # resp.tag_list[0].value #=> String
618
+ # resp.next_token #=> String
619
+ #
620
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags AWS API Documentation
621
+ #
622
+ # @overload list_tags(params = {})
623
+ # @param [Hash] params ({})
624
+ def list_tags(params = {}, options = {})
625
+ req = build_request(:list_tags, params)
626
+ req.send_request(options)
627
+ end
628
+
629
+ # Adds or overwrites one or more tags for the specified AWS CloudHSM
630
+ # cluster.
631
+ #
632
+ # @option params [required, String] :resource_id
633
+ # The cluster identifier (ID) for the cluster that you are tagging. To
634
+ # find the cluster ID, use DescribeClusters.
635
+ #
636
+ # @option params [required, Array<Types::Tag>] :tag_list
637
+ # A list of one or more tags.
638
+ #
639
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
640
+ #
641
+ # @example Request syntax with placeholder values
642
+ #
643
+ # resp = client.tag_resource({
644
+ # resource_id: "ClusterId", # required
645
+ # tag_list: [ # required
646
+ # {
647
+ # key: "TagKey", # required
648
+ # value: "TagValue", # required
649
+ # },
650
+ # ],
651
+ # })
652
+ #
653
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource AWS API Documentation
654
+ #
655
+ # @overload tag_resource(params = {})
656
+ # @param [Hash] params ({})
657
+ def tag_resource(params = {}, options = {})
658
+ req = build_request(:tag_resource, params)
659
+ req.send_request(options)
660
+ end
661
+
662
+ # Removes the specified tag or tags from the specified AWS CloudHSM
663
+ # cluster.
664
+ #
665
+ # @option params [required, String] :resource_id
666
+ # The cluster identifier (ID) for the cluster whose tags you are
667
+ # removing. To find the cluster ID, use DescribeClusters.
668
+ #
669
+ # @option params [required, Array<String>] :tag_key_list
670
+ # A list of one or more tag keys for the tags that you are removing.
671
+ # Specify only the tag keys, not the tag values.
672
+ #
673
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
674
+ #
675
+ # @example Request syntax with placeholder values
676
+ #
677
+ # resp = client.untag_resource({
678
+ # resource_id: "ClusterId", # required
679
+ # tag_key_list: ["TagKey"], # required
680
+ # })
681
+ #
682
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource AWS API Documentation
683
+ #
684
+ # @overload untag_resource(params = {})
685
+ # @param [Hash] params ({})
686
+ def untag_resource(params = {}, options = {})
687
+ req = build_request(:untag_resource, params)
688
+ req.send_request(options)
689
+ end
690
+
691
+ # @!endgroup
692
+
693
+ # @param params ({})
694
+ # @api private
695
+ def build_request(operation_name, params = {})
696
+ handlers = @handlers.for(operation_name)
697
+ context = Seahorse::Client::RequestContext.new(
698
+ operation_name: operation_name,
699
+ operation: config.api.operation(operation_name),
700
+ client: self,
701
+ params: params,
702
+ config: config)
703
+ context[:gem_name] = 'aws-sdk-cloudhsmv2'
704
+ context[:gem_version] = '1.0.0.rc1'
705
+ Seahorse::Client::Request.new(handlers, context)
706
+ end
707
+
708
+ # @api private
709
+ # @deprecated
710
+ def waiter_names
711
+ []
712
+ end
713
+
714
+ class << self
715
+
716
+ # @api private
717
+ attr_reader :identifier
718
+
719
+ # @api private
720
+ def errors_module
721
+ Errors
722
+ end
723
+
724
+ end
725
+ end
726
+ end