Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API class Google::Cloud::Kms::V1::EkmService::Client.
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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all EkmService clients ::Google::Cloud::Kms::V1::EkmService::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
create_ekm_connection
via a request object, either of type
CreateEkmConnectionRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::EkmConnection)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::CreateEkmConnectionRequest.new # Call the create_ekm_connection method. result = client.create_ekm_connection request # The returned object is of type Google::Cloud::Kms::V1::EkmConnection. p result
#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.
def get_ekm_config(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConfig
get_ekm_config
via a request object, either of type
GetEkmConfigRequest or an equivalent Hash.
- 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
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).
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::EkmConfig)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::GetEkmConfigRequest.new # Call the get_ekm_config method. result = client.get_ekm_config request # The returned object is of type Google::Cloud::Kms::V1::EkmConfig. p result
#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.
def get_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
get_ekm_connection
via a request object, either of type
GetEkmConnectionRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the EkmConnection to get.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::EkmConnection)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::GetEkmConnectionRequest.new # Call the get_ekm_connection method. result = client.get_ekm_connection request # The returned object is of type Google::Cloud::Kms::V1::EkmConnection. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new EkmService client object.
- (config) — Configure the EkmService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Kms::V1::EkmService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Kms::V1::EkmService::Client.new do |config| config.timeout = 10.0 end
#list_ekm_connections
def list_ekm_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
def list_ekm_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
Lists EkmConnections.
def list_ekm_connections(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
list_ekm_connections
via a request object, either of type
ListEkmConnectionsRequest or an equivalent Hash.
- 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::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>
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).
-
parent (::String) — Required. The resource name of the location associated with the
EkmConnections to list, in the format
projects/*/locations/*
. - page_size (::Integer) — Optional. Optional limit on the number of EkmConnections to include in the response. Further EkmConnections can subsequently be obtained by including the ListEkmConnectionsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.
- page_token (::String) — Optional. Optional pagination token, returned earlier via ListEkmConnectionsResponse.next_page_token.
- filter (::String) — Optional. Only include resources that match the filter in the response. For more information, see Sorting and filtering list results.
- order_by (::String) — Optional. Specify how the results should be sorted. If not specified, the results will be sorted in the default order. For more information, see Sorting and filtering list results.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Kms::V1::EkmConnection>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::ListEkmConnectionsRequest.new # Call the list_ekm_connections method. result = client.list_ekm_connections request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Kms::V1::EkmConnection. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#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.
def update_ekm_config(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConfig
update_ekm_config
via a request object, either of type
UpdateEkmConfigRequest or an equivalent Hash.
- 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
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).
- ekm_config (::Google::Cloud::Kms::V1::EkmConfig, ::Hash) — Required. EkmConfig with updated values.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. List of fields to be updated in this request.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::EkmConfig)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::UpdateEkmConfigRequest.new # Call the update_ekm_config method. result = client.update_ekm_config request # The returned object is of type Google::Cloud::Kms::V1::EkmConfig. p result
#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.
def update_ekm_connection(request, options = nil) -> ::Google::Cloud::Kms::V1::EkmConnection
update_ekm_connection
via a request object, either of type
UpdateEkmConnectionRequest or an equivalent Hash.
- 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
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).
- ekm_connection (::Google::Cloud::Kms::V1::EkmConnection, ::Hash) — Required. EkmConnection with updated values.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. List of fields to be updated in this request.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::EkmConnection)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::UpdateEkmConnectionRequest.new # Call the update_ekm_connection method. result = client.update_ekm_connection request # The returned object is of type Google::Cloud::Kms::V1::EkmConnection. p result
#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.
def verify_connectivity(request, options = nil) -> ::Google::Cloud::Kms::V1::VerifyConnectivityResponse
verify_connectivity
via a request object, either of type
VerifyConnectivityRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the EkmConnection to verify.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::VerifyConnectivityResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::EkmService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::VerifyConnectivityRequest.new # Call the verify_connectivity method. result = client.verify_connectivity request # The returned object is of type Google::Cloud::Kms::V1::VerifyConnectivityResponse. p result