Class: Aws::CloudHSMV2::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CloudHSMV2::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- lib/aws-sdk-cloudhsmv2/client.rb
Overview
An API client for CloudHSMV2. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::CloudHSMV2::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#copy_backup_to_region(params = {}) ⇒ Types::CopyBackupToRegionResponse
Copy an CloudHSM cluster backup to a different region.
-
#create_cluster(params = {}) ⇒ Types::CreateClusterResponse
Creates a new CloudHSM cluster.
-
#create_hsm(params = {}) ⇒ Types::CreateHsmResponse
Creates a new hardware security module (HSM) in the specified CloudHSM cluster.
-
#delete_backup(params = {}) ⇒ Types::DeleteBackupResponse
Deletes a specified CloudHSM backup.
-
#delete_cluster(params = {}) ⇒ Types::DeleteClusterResponse
Deletes the specified CloudHSM cluster.
-
#delete_hsm(params = {}) ⇒ Types::DeleteHsmResponse
Deletes the specified HSM.
-
#delete_resource_policy(params = {}) ⇒ Types::DeleteResourcePolicyResponse
Deletes an CloudHSM resource policy.
-
#describe_backups(params = {}) ⇒ Types::DescribeBackupsResponse
Gets information about backups of CloudHSM clusters.
-
#describe_clusters(params = {}) ⇒ Types::DescribeClustersResponse
Gets information about CloudHSM clusters.
-
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Retrieves the resource policy document attached to a given resource.
-
#initialize_cluster(params = {}) ⇒ Types::InitializeClusterResponse
Claims an CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA’s root certificate.
-
#list_tags(params = {}) ⇒ Types::ListTagsResponse
Gets a list of tags for the specified CloudHSM cluster.
-
#modify_backup_attributes(params = {}) ⇒ Types::ModifyBackupAttributesResponse
Modifies attributes for CloudHSM backup.
-
#modify_cluster(params = {}) ⇒ Types::ModifyClusterResponse
Modifies CloudHSM cluster.
-
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Creates or updates an CloudHSM resource policy.
-
#restore_backup(params = {}) ⇒ Types::RestoreBackupResponse
Restores a specified CloudHSM backup that is in the ‘PENDING_DELETION` state.
-
#tag_resource(params = {}) ⇒ Struct
Adds or overwrites one or more tags for the specified CloudHSM cluster.
-
#untag_resource(params = {}) ⇒ Struct
Removes the specified tag or tags from the specified CloudHSM cluster.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
474 475 476 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 474 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1608 1609 1610 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1608 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1611 1612 1613 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1611 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1581 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::CloudHSMV2') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-cloudhsmv2' context[:gem_version] = '1.74.0' Seahorse::Client::Request.new(handlers, context) end |
#copy_backup_to_region(params = {}) ⇒ Types::CopyBackupToRegionResponse
Copy an CloudHSM cluster backup to a different region.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
525 526 527 528 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 525 def copy_backup_to_region(params = {}, = {}) req = build_request(:copy_backup_to_region, params) req.send_request() end |
#create_cluster(params = {}) ⇒ Types::CreateClusterResponse
Creates a new CloudHSM cluster.
**Cross-account use:** Yes. To perform this operation with an CloudHSM backup in a different AWS account, specify the full backup ARN in the value of the SourceBackupId parameter.
637 638 639 640 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 637 def create_cluster(params = {}, = {}) req = build_request(:create_cluster, params) req.send_request() end |
#create_hsm(params = {}) ⇒ Types::CreateHsmResponse
Creates a new hardware security module (HSM) in the specified CloudHSM cluster.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Service account.
691 692 693 694 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 691 def create_hsm(params = {}, = {}) req = build_request(:create_hsm, params) req.send_request() end |
#delete_backup(params = {}) ⇒ Types::DeleteBackupResponse
Deletes a specified CloudHSM backup. A backup can be restored up to 7 days after the DeleteBackup request is made. For more information on restoring a backup, see RestoreBackup.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
740 741 742 743 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 740 def delete_backup(params = {}, = {}) req = build_request(:delete_backup, params) req.send_request() end |
#delete_cluster(params = {}) ⇒ Types::DeleteClusterResponse
Deletes the specified CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the cluster. To see if the cluster contains any HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
810 811 812 813 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 810 def delete_cluster(params = {}, = {}) req = build_request(:delete_cluster, params) req.send_request() end |
#delete_hsm(params = {}) ⇒ Types::DeleteHsmResponse
Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM’s elastic network interface (ENI), or the ID of the HSM’s ENI. You need to specify only one of these values. To find these values, use DescribeClusters.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM hsm in a different Amazon Web Services account.
859 860 861 862 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 859 def delete_hsm(params = {}, = {}) req = build_request(:delete_hsm, params) req.send_request() end |
#delete_resource_policy(params = {}) ⇒ Types::DeleteResourcePolicyResponse
Deletes an CloudHSM resource policy. Deleting a resource policy will result in the resource being unshared and removed from any RAM resource shares. Deleting the resource policy attached to a backup will not impact any clusters created from that backup.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
896 897 898 899 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 896 def delete_resource_policy(params = {}, = {}) req = build_request(:delete_resource_policy, params) req.send_request() end |
#describe_backups(params = {}) ⇒ Types::DescribeBackupsResponse
Gets information about backups of CloudHSM clusters. Lists either the backups you own or the backups shared with you when the Shared parameter is true.
This is a paginated operation, which means that each response might contain only a subset of all the backups. When the response contains only a subset of backups, it includes a ‘NextToken` value. Use this value in a subsequent `DescribeBackups` request to get more backups. When you receive a response with no `NextToken` (or an empty or null value), that means there are no more backups to get.
**Cross-account use:** Yes. Customers can describe backups in other Amazon Web Services accounts that are shared with them.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1012 1013 1014 1015 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1012 def describe_backups(params = {}, = {}) req = build_request(:describe_backups, params) req.send_request() end |
#describe_clusters(params = {}) ⇒ Types::DescribeClustersResponse
Gets information about CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters. When the response contains only a subset of clusters, it includes a ‘NextToken` value. Use this value in a subsequent `DescribeClusters` request to get more clusters. When you receive a response with no `NextToken` (or an empty or null value), that means there are no more clusters to get.
**Cross-account use:** No. You cannot perform this operation on CloudHSM clusters in a different Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1113 1114 1115 1116 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1113 def describe_clusters(params = {}, = {}) req = build_request(:describe_clusters, params) req.send_request() end |
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Retrieves the resource policy document attached to a given resource.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
1145 1146 1147 1148 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1145 def get_resource_policy(params = {}, = {}) req = build_request(:get_resource_policy, params) req.send_request() end |
#initialize_cluster(params = {}) ⇒ Types::InitializeClusterResponse
Claims an CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA’s root certificate. Before you can claim a cluster, you must sign the cluster’s certificate signing request (CSR) with your issuing CA. To get the cluster’s CSR, use DescribeClusters.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
1197 1198 1199 1200 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1197 def initialize_cluster(params = {}, = {}) req = build_request(:initialize_cluster, params) req.send_request() end |
#list_tags(params = {}) ⇒ Types::ListTagsResponse
Gets a list of tags for the specified CloudHSM cluster.
This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a ‘NextToken` value. Use this value in a subsequent `ListTags` request to get more tags. When you receive a response with no `NextToken` (or an empty or null value), that means there are no more tags to get.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1253 1254 1255 1256 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1253 def (params = {}, = {}) req = build_request(:list_tags, params) req.send_request() end |
#modify_backup_attributes(params = {}) ⇒ Types::ModifyBackupAttributesResponse
Modifies attributes for CloudHSM backup.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
1307 1308 1309 1310 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1307 def modify_backup_attributes(params = {}, = {}) req = build_request(:modify_backup_attributes, params) req.send_request() end |
#modify_cluster(params = {}) ⇒ Types::ModifyClusterResponse
Modifies CloudHSM cluster.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM cluster in a different Amazon Web Services account.
1385 1386 1387 1388 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1385 def modify_cluster(params = {}, = {}) req = build_request(:modify_cluster, params) req.send_request() end |
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Creates or updates an CloudHSM resource policy. A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your CloudHSM resources. The following resources support CloudHSM resource policies:
-
Backup - The resource policy allows you to describe the backup and restore a cluster from the backup in another Amazon Web Services account.
^
In order to share a backup, it must be in a ‘READY’ state and you must own it.
While you can share a backup using the CloudHSM PutResourcePolicy operation, we recommend using Resource Access Manager (RAM) instead. Using RAM provides multiple benefits as it creates the policy for you, allows multiple resources to be shared at one time, and increases the discoverability of shared resources. If you use PutResourcePolicy and want consumers to be able to describe the backups you share with them, you must promote the backup to a standard RAM Resource Share using the RAM PromoteResourceShareCreatedFromPolicy API operation. For more information, see [ Working with shared backups] in the CloudHSM User Guide
**Cross-account use:** No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
[1]: docs.aws.amazon.com/cloudhsm/latest/userguide/sharing.html
1457 1458 1459 1460 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1457 def put_resource_policy(params = {}, = {}) req = build_request(:put_resource_policy, params) req.send_request() end |
#restore_backup(params = {}) ⇒ Types::RestoreBackupResponse
Restores a specified CloudHSM backup that is in the ‘PENDING_DELETION` state. For more information on deleting a backup, see DeleteBackup.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM backup in a different Amazon Web Services account.
1505 1506 1507 1508 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1505 def restore_backup(params = {}, = {}) req = build_request(:restore_backup, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds or overwrites one or more tags for the specified CloudHSM cluster.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
1541 1542 1543 1544 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1541 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the specified tag or tags from the specified CloudHSM cluster.
**Cross-account use:** No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
1572 1573 1574 1575 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1572 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1601 1602 1603 |
# File 'lib/aws-sdk-cloudhsmv2/client.rb', line 1601 def waiter_names [] end |