Dialogflow V2 API - Class Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client (v1.5.0)

Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.

REST client for the EncryptionSpecService service.

Manages encryption spec settings for Dialogflow and Agent Assist.

Inherits

  • Object

Methods

.configure

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

Configure the EncryptionSpecService 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 EncryptionSpecService clients
::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the EncryptionSpecService 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

#get_encryption_spec

def get_encryption_spec(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::EncryptionSpec
def get_encryption_spec(name: nil) -> ::Google::Cloud::Dialogflow::V2::EncryptionSpec

Gets location-level encryption key specification.

Overloads
def get_encryption_spec(request, options = nil) -> ::Google::Cloud::Dialogflow::V2::EncryptionSpec
Pass arguments to get_encryption_spec via a request object, either of type GetEncryptionSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest, ::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_encryption_spec(name: nil) -> ::Google::Cloud::Dialogflow::V2::EncryptionSpec
Pass arguments to get_encryption_spec 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 encryption spec resource 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.
Example

Basic example

require "google/cloud/dialogflow/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest.new

# Call the get_encryption_spec method.
result = client.get_encryption_spec request

# The returned object is of type Google::Cloud::Dialogflow::V2::EncryptionSpec.
p result

#initialize

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

Create a new EncryptionSpecService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#initialize_encryption_spec

def initialize_encryption_spec(request, options = nil) -> ::Gapic::Operation
def initialize_encryption_spec(encryption_spec: nil) -> ::Gapic::Operation

Initializes a location-level encryption key specification. An error will be thrown if the location has resources already created before the initialization. Once the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.

Overloads
def initialize_encryption_spec(request, options = nil) -> ::Gapic::Operation
Pass arguments to initialize_encryption_spec via a request object, either of type InitializeEncryptionSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest, ::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 initialize_encryption_spec(encryption_spec: nil) -> ::Gapic::Operation
Pass arguments to initialize_encryption_spec 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
  • encryption_spec (::Google::Cloud::Dialogflow::V2::EncryptionSpec, ::Hash) — Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms_key_name is left empty, no encryption will be enforced.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/dialogflow/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest.new

# Call the initialize_encryption_spec method.
result = client.initialize_encryption_spec 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

#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)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)