Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.
Client for the CmekConfigService service.
Service for managing CMEK related tasks
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the CmekConfigService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CmekConfigService clients ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the CmekConfigService 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)
#delete_cmek_config
def delete_cmek_config(request, options = nil) -> ::Gapic::Operation
def delete_cmek_config(name: nil) -> ::Gapic::Operation
De-provisions a CmekConfig.
def delete_cmek_config(request, options = nil) -> ::Gapic::Operation
delete_cmek_config
via a request object, either of type
DeleteCmekConfigRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest, ::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 delete_cmek_config(name: nil) -> ::Gapic::Operation
delete_cmek_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).
-
name (::String) — Required. The resource name of the
CmekConfig to delete, such as
projects/{project}/locations/{location}/cmekConfigs/{cmek_config}
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::DeleteCmekConfigRequest.new # Call the delete_cmek_config method. result = client.delete_cmek_config request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_cmek_config
def get_cmek_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::CmekConfig
def get_cmek_config(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::CmekConfig
Gets the CmekConfig.
def get_cmek_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::CmekConfig
get_cmek_config
via a request object, either of type
GetCmekConfigRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest, ::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_cmek_config(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::CmekConfig
get_cmek_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).
-
name (::String) — Required. Resource name of
CmekConfig, such as
projects/*/locations/*/cmekConfig
orprojects/*/locations/*/cmekConfigs/*
.If the caller does not have permission to access the CmekConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1::CmekConfig)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::GetCmekConfigRequest.new # Call the get_cmek_config method. result = client.get_cmek_config request # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CmekConfig. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new CmekConfigService client object.
- (config) — Configure the CmekConfigService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new do |config| config.timeout = 10.0 end
#list_cmek_configs
def list_cmek_configs(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse
def list_cmek_configs(parent: nil) -> ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse
Lists all the {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s with the project.
def list_cmek_configs(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse
list_cmek_configs
via a request object, either of type
ListCmekConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest, ::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_cmek_configs(parent: nil) -> ::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse
list_cmek_configs
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 parent location resource name, such as
projects/{project}/locations/{location}
.If the caller does not have permission to list {::Google::Cloud::DiscoveryEngine::V1::CmekConfig CmekConfig}s under this location, regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsRequest.new # Call the list_cmek_configs method. result = client.list_cmek_configs request # The returned object is of type Google::Cloud::DiscoveryEngine::V1::ListCmekConfigsResponse. p result
#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)
#operations_client
def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_cmek_config
def update_cmek_config(request, options = nil) -> ::Gapic::Operation
def update_cmek_config(config: nil, set_default: nil) -> ::Gapic::Operation
Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.
def update_cmek_config(request, options = nil) -> ::Gapic::Operation
update_cmek_config
via a request object, either of type
UpdateCmekConfigRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest, ::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_cmek_config(config: nil, set_default: nil) -> ::Gapic::Operation
update_cmek_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).
- config (::Google::Cloud::DiscoveryEngine::V1::CmekConfig, ::Hash) — Required. The CmekConfig resource.
- set_default (::Boolean) — Set the following CmekConfig as the default to be used for child resources if one is not specified.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::UpdateCmekConfigRequest.new # Call the update_cmek_config method. result = client.update_cmek_config request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end