Cloud Key Management Service (KMS) V1 API - Class Google::Cloud::Kms::V1::EkmService::Rest::Client (v0.22.1)

Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API class Google::Cloud::Kms::V1::EkmService::Rest::Client.

REST client for the EkmService service.

Google Cloud Key Management EKM Service

Manages external cryptographic keys and operations using those keys. Implements a REST model with the following objects:

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the EkmService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all EkmService clients
::Google::Cloud::Kms::V1::EkmService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the EkmService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_ekm_connection

def create_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
def create_ekm_connection(parent: nil, ekm_connection_id: nil, ekm_connection: nil) -> ::Google::Cloud::Kms::V1::EkmConnection

Creates a new EkmConnection in a given Project and Location.

Overloads
def create_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
Pass arguments to create_ekm_connection via a request object, either of type CreateEkmConnectionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::CreateEkmConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_ekm_connection(parent: nil, ekm_connection_id: nil, ekm_connection: nil) -> ::Google::Cloud::Kms::V1::EkmConnection
Pass arguments to create_ekm_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the location associated with the EkmConnection, in the format projects/*/locations/*.
  • ekm_connection_id (::String) — Required. It must be unique within a location and match the regular expression [a-zA-Z0-9_-]{1,63}.
  • ekm_connection (::Google::Cloud::Kms::V1::EkmConnection, ::Hash) — Required. An EkmConnection with initial field values.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_ekm_config

def get_ekm_config(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConfig
def get_ekm_config(name: nil) -> ::Google::Cloud::Kms::V1::EkmConfig

Returns the EkmConfig singleton resource for a given project and location.

Overloads
def get_ekm_config(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConfig
Pass arguments to get_ekm_config via a request object, either of type GetEkmConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::GetEkmConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_ekm_config(name: nil) -> ::Google::Cloud::Kms::V1::EkmConfig
Pass arguments to get_ekm_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the EkmConfig to get.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_ekm_connection

def get_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
def get_ekm_connection(name: nil) -> ::Google::Cloud::Kms::V1::EkmConnection

Returns metadata for a given EkmConnection.

Overloads
def get_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
Pass arguments to get_ekm_connection via a request object, either of type GetEkmConnectionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::GetEkmConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_ekm_connection(name: nil) -> ::Google::Cloud::Kms::V1::EkmConnection
Pass arguments to get_ekm_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client

Get the associated client for mix-in of the IAMPolicy.

Returns
  • (Google::Iam::V1::IAMPolicy::Rest::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new EkmService REST client object.

Yields
  • (config) — Configure the EkmService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Kms::V1::EkmService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Kms::V1::EkmService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_ekm_connections

def list_ekm_connections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
def list_ekm_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
Overloads
def list_ekm_connections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
Pass arguments to list_ekm_connections via a request object, either of type ListEkmConnectionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::ListEkmConnectionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_ekm_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
Pass arguments to list_ekm_connections via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#update_ekm_config

def update_ekm_config(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConfig
def update_ekm_config(ekm_config: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::EkmConfig

Updates the EkmConfig singleton resource for a given project and location.

Overloads
def update_ekm_config(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConfig
Pass arguments to update_ekm_config via a request object, either of type UpdateEkmConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::UpdateEkmConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_ekm_config(ekm_config: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::EkmConfig
Pass arguments to update_ekm_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_ekm_connection

def update_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
def update_ekm_connection(ekm_connection: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::EkmConnection

Updates an EkmConnection's metadata.

Overloads
def update_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
Pass arguments to update_ekm_connection via a request object, either of type UpdateEkmConnectionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::UpdateEkmConnectionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_ekm_connection(ekm_connection: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::EkmConnection
Pass arguments to update_ekm_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#verify_connectivity

def verify_connectivity(request, options = nil) -> ::Google::Cloud::Kms::V1::VerifyConnectivityResponse
def verify_connectivity(name: nil) -> ::Google::Cloud::Kms::V1::VerifyConnectivityResponse

Verifies that Cloud KMS can successfully connect to the external key manager specified by an EkmConnection. If there is an error connecting to the EKM, this method returns a FAILED_PRECONDITION status containing structured information as described at https://cloud.google.com/kms/docs/reference/ekm_errors.

Overloads
def verify_connectivity(request, options = nil) -> ::Google::Cloud::Kms::V1::VerifyConnectivityResponse
Pass arguments to verify_connectivity via a request object, either of type VerifyConnectivityRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Kms::V1::VerifyConnectivityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def verify_connectivity(name: nil) -> ::Google::Cloud::Kms::V1::VerifyConnectivityResponse
Pass arguments to verify_connectivity via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.