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_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
#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 all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Kms::V1::EkmConnection. p response end
#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