You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CloudHSMV2::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#create_cluster(params = {}) ⇒ Types::CreateClusterResponse

Creates a new AWS CloudHSM cluster.

Examples:

Request syntax with placeholder values


resp = client.create_cluster({
  subnet_ids: ["SubnetId"], # required
  hsm_type: "HsmType", # required
  source_backup_id: "BackupId",
})

Response structure


resp.cluster.backup_policy #=> String, one of "DEFAULT"
resp.cluster.cluster_id #=> String
resp.cluster.create_timestamp #=> Time
resp.cluster.hsms #=> Array
resp.cluster.hsms[0].availability_zone #=> String
resp.cluster.hsms[0].cluster_id #=> String
resp.cluster.hsms[0].subnet_id #=> String
resp.cluster.hsms[0].eni_id #=> String
resp.cluster.hsms[0].eni_ip #=> String
resp.cluster.hsms[0].hsm_id #=> String
resp.cluster.hsms[0].state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
resp.cluster.hsms[0].state_message #=> String
resp.cluster.hsm_type #=> String
resp.cluster.pre_co_password #=> String
resp.cluster.security_group #=> String
resp.cluster.source_backup_id #=> String
resp.cluster.state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
resp.cluster.state_message #=> String
resp.cluster.subnet_mapping #=> Hash
resp.cluster.subnet_mapping["ExternalAz"] #=> String
resp.cluster.vpc_id #=> String
resp.cluster.certificates.cluster_csr #=> String
resp.cluster.certificates.hsm_certificate #=> String
resp.cluster.certificates.aws_hardware_certificate #=> String
resp.cluster.certificates.manufacturer_hardware_certificate #=> String
resp.cluster.certificates.cluster_certificate #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :subnet_ids (required, Array<String>)

    The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If you specify multiple subnets, they must meet the following criteria:

    • All subnets must be in the same virtual private cloud (VPC).

    • You can specify only one subnet per Availability Zone.

  • :hsm_type (required, String)

    The type of HSM to use in the cluster. Currently the only allowed value is hsm1.medium.

  • :source_backup_id (String)

    The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead of creating a new cluster. To find the backup ID, use DescribeBackups.

Returns:

See Also:



223
224
225
226
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 223

def create_cluster(params = {}, options = {})
  req = build_request(:create_cluster, params)
  req.send_request(options)
end

#create_hsm(params = {}) ⇒ Types::CreateHsmResponse

Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.

Examples:

Request syntax with placeholder values


resp = client.create_hsm({
  cluster_id: "ClusterId", # required
  availability_zone: "ExternalAz", # required
  ip_address: "IpAddress",
})

Response structure


resp.hsm.availability_zone #=> String
resp.hsm.cluster_id #=> String
resp.hsm.subnet_id #=> String
resp.hsm.eni_id #=> String
resp.hsm.eni_ip #=> String
resp.hsm.hsm_id #=> String
resp.hsm.state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
resp.hsm.state_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters.

  • :availability_zone (required, String)

    The Availability Zone where you are creating the HSM. To find the cluster's Availability Zones, use DescribeClusters.

  • :ip_address (String)

    The HSM's IP address. If you specify an IP address, use an available address from the subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify an IP address, one is chosen for you from that subnet.

Returns:

See Also:



272
273
274
275
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 272

def create_hsm(params = {}, options = {})
  req = build_request(:create_hsm, params)
  req.send_request(options)
end

#delete_cluster(params = {}) ⇒ Types::DeleteClusterResponse

Deletes the specified AWS 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.

Examples:

Request syntax with placeholder values


resp = client.delete_cluster({
  cluster_id: "ClusterId", # required
})

Response structure


resp.cluster.backup_policy #=> String, one of "DEFAULT"
resp.cluster.cluster_id #=> String
resp.cluster.create_timestamp #=> Time
resp.cluster.hsms #=> Array
resp.cluster.hsms[0].availability_zone #=> String
resp.cluster.hsms[0].cluster_id #=> String
resp.cluster.hsms[0].subnet_id #=> String
resp.cluster.hsms[0].eni_id #=> String
resp.cluster.hsms[0].eni_ip #=> String
resp.cluster.hsms[0].hsm_id #=> String
resp.cluster.hsms[0].state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
resp.cluster.hsms[0].state_message #=> String
resp.cluster.hsm_type #=> String
resp.cluster.pre_co_password #=> String
resp.cluster.security_group #=> String
resp.cluster.source_backup_id #=> String
resp.cluster.state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
resp.cluster.state_message #=> String
resp.cluster.subnet_mapping #=> Hash
resp.cluster.subnet_mapping["ExternalAz"] #=> String
resp.cluster.vpc_id #=> String
resp.cluster.certificates.cluster_csr #=> String
resp.cluster.certificates.hsm_certificate #=> String
resp.cluster.certificates.aws_hardware_certificate #=> String
resp.cluster.certificates.manufacturer_hardware_certificate #=> String
resp.cluster.certificates.cluster_certificate #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier (ID) of the cluster that you are deleting. To find the cluster ID, use DescribeClusters.

Returns:

See Also:



329
330
331
332
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 329

def delete_cluster(params = {}, options = {})
  req = build_request(:delete_cluster, params)
  req.send_request(options)
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.

Examples:

Request syntax with placeholder values


resp = client.delete_hsm({
  cluster_id: "ClusterId", # required
  hsm_id: "HsmId",
  eni_id: "EniId",
  eni_ip: "IpAddress",
})

Response structure


resp.hsm_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier (ID) of the cluster that contains the HSM that you are deleting.

  • :hsm_id (String)

    The identifier (ID) of the HSM that you are deleting.

  • :eni_id (String)

    The identifier (ID) of the elastic network interface (ENI) of the HSM that you are deleting.

  • :eni_ip (String)

    The IP address of the elastic network interface (ENI) of the HSM that you are deleting.

Returns:

See Also:



375
376
377
378
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 375

def delete_hsm(params = {}, options = {})
  req = build_request(:delete_hsm, params)
  req.send_request(options)
end

#describe_backups(params = {}) ⇒ Types::DescribeBackupsResponse

Gets information about backups of AWS CloudHSM clusters.

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.

Examples:

Request syntax with placeholder values


resp = client.describe_backups({
  next_token: "NextToken",
  max_results: 1,
  filters: {
    "Field" => ["String"],
  },
})

Response structure


resp.backups #=> Array
resp.backups[0].backup_id #=> String
resp.backups[0].backup_state #=> String, one of "CREATE_IN_PROGRESS", "READY", "DELETED"
resp.backups[0].cluster_id #=> String
resp.backups[0].create_timestamp #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The NextToken value that you received in the previous response. Use this value to get more backups.

  • :max_results (Integer)

    The maximum number of backups to return in the response. When there are more backups than the number you specify, the response contains a NextToken value.

  • :filters (Hash<String,Array>)

    One or more filters to limit the items returned in the response.

    Use the backupIds filter to return only the specified backups. Specify backups by their backup identifier (ID).

    Use the clusterIds filter to return only the backups for the specified clusters. Specify clusters by their cluster identifier (ID).

    Use the states filter to return only backups that match the specified state.

Returns:

See Also:



438
439
440
441
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 438

def describe_backups(params = {}, options = {})
  req = build_request(:describe_backups, params)
  req.send_request(options)
end

#describe_clusters(params = {}) ⇒ Types::DescribeClustersResponse

Gets information about AWS 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.

Examples:

Request syntax with placeholder values


resp = client.describe_clusters({
  filters: {
    "Field" => ["String"],
  },
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.clusters #=> Array
resp.clusters[0].backup_policy #=> String, one of "DEFAULT"
resp.clusters[0].cluster_id #=> String
resp.clusters[0].create_timestamp #=> Time
resp.clusters[0].hsms #=> Array
resp.clusters[0].hsms[0].availability_zone #=> String
resp.clusters[0].hsms[0].cluster_id #=> String
resp.clusters[0].hsms[0].subnet_id #=> String
resp.clusters[0].hsms[0].eni_id #=> String
resp.clusters[0].hsms[0].eni_ip #=> String
resp.clusters[0].hsms[0].hsm_id #=> String
resp.clusters[0].hsms[0].state #=> String, one of "CREATE_IN_PROGRESS", "ACTIVE", "DEGRADED", "DELETE_IN_PROGRESS", "DELETED"
resp.clusters[0].hsms[0].state_message #=> String
resp.clusters[0].hsm_type #=> String
resp.clusters[0].pre_co_password #=> String
resp.clusters[0].security_group #=> String
resp.clusters[0].source_backup_id #=> String
resp.clusters[0].state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
resp.clusters[0].state_message #=> String
resp.clusters[0].subnet_mapping #=> Hash
resp.clusters[0].subnet_mapping["ExternalAz"] #=> String
resp.clusters[0].vpc_id #=> String
resp.clusters[0].certificates.cluster_csr #=> String
resp.clusters[0].certificates.hsm_certificate #=> String
resp.clusters[0].certificates.aws_hardware_certificate #=> String
resp.clusters[0].certificates.manufacturer_hardware_certificate #=> String
resp.clusters[0].certificates.cluster_certificate #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Hash<String,Array>)

    One or more filters to limit the items returned in the response.

    Use the clusterIds filter to return only the specified clusters. Specify clusters by their cluster identifier (ID).

    Use the vpcIds filter to return only the clusters in the specified virtual private clouds (VPCs). Specify VPCs by their VPC identifier (ID).

    Use the states filter to return only clusters that match the specified state.

  • :next_token (String)

    The NextToken value that you received in the previous response. Use this value to get more clusters.

  • :max_results (Integer)

    The maximum number of clusters to return in the response. When there are more clusters than the number you specify, the response contains a NextToken value.

Returns:

See Also:



524
525
526
527
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 524

def describe_clusters(params = {}, options = {})
  req = build_request(:describe_clusters, params)
  req.send_request(options)
end

#initialize_cluster(params = {}) ⇒ Types::InitializeClusterResponse

Claims an AWS 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.

Examples:

Request syntax with placeholder values


resp = client.initialize_cluster({
  cluster_id: "ClusterId", # required
  signed_cert: "Cert", # required
  trust_anchor: "Cert", # required
})

Response structure


resp.state #=> String, one of "CREATE_IN_PROGRESS", "UNINITIALIZED", "INITIALIZE_IN_PROGRESS", "INITIALIZED", "ACTIVE", "UPDATE_IN_PROGRESS", "DELETE_IN_PROGRESS", "DELETED", "DEGRADED"
resp.state_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use DescribeClusters.

  • :signed_cert (required, String)

    The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format.

  • :trust_anchor (required, String)

    The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. This can be a root (self-signed) certificate or a certificate chain that begins with the certificate that issued the cluster certificate and ends with a root certificate. The certificate or certificate chain must be in PEM format.

Returns:

See Also:



573
574
575
576
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 573

def initialize_cluster(params = {}, options = {})
  req = build_request(:initialize_cluster, params)
  req.send_request(options)
end

#list_tags(params = {}) ⇒ Types::ListTagsResponse

Gets a list of tags for the specified AWS 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.

Examples:

Request syntax with placeholder values


resp = client.list_tags({
  resource_id: "ClusterId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The cluster identifier (ID) for the cluster whose tags you are getting. To find the cluster ID, use DescribeClusters.

  • :next_token (String)

    The NextToken value that you received in the previous response. Use this value to get more tags.

  • :max_results (Integer)

    The maximum number of tags to return in the response. When there are more tags than the number you specify, the response contains a NextToken value.

Returns:

See Also:



624
625
626
627
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 624

def list_tags(params = {}, options = {})
  req = build_request(:list_tags, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_id: "ClusterId", # required
  tag_list: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The cluster identifier (ID) for the cluster that you are tagging. To find the cluster ID, use DescribeClusters.

  • :tag_list (required, Array<Types::Tag>)

    A list of one or more tags.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



657
658
659
660
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 657

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes the specified tag or tags from the specified AWS CloudHSM cluster.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_id: "ClusterId", # required
  tag_key_list: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The cluster identifier (ID) for the cluster whose tags you are removing. To find the cluster ID, use DescribeClusters.

  • :tag_key_list (required, Array<String>)

    A list of one or more tag keys for the tags that you are removing. Specify only the tag keys, not the tag values.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



686
687
688
689
# File 'gems/aws-sdk-cloudhsmv2/lib/aws-sdk-cloudhsmv2/client.rb', line 686

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end