Class: Google::Apis::CesV1::ApiKeyConfig

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb

Overview

Configurations for authentication with API key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ApiKeyConfig

Returns a new instance of ApiKeyConfig.



563
564
565
# File 'lib/google/apis/ces_v1/classes.rb', line 563

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#api_key_secret_versionString

Required. The name of the SecretManager secret version resource storing the API key. Format: projects/project/secrets/secret/versions/version`Note: You should grantroles/secretmanager.secretAccessorrole to the CES service agentservice-@gcp-sa-ces.iam.gserviceaccount.com. Corresponds to the JSON propertyapiKeySecretVersion`

Returns:

  • (String)


549
550
551
# File 'lib/google/apis/ces_v1/classes.rb', line 549

def api_key_secret_version
  @api_key_secret_version
end

#key_nameString

Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. Corresponds to the JSON property keyName

Returns:

  • (String)


556
557
558
# File 'lib/google/apis/ces_v1/classes.rb', line 556

def key_name
  @key_name
end

#request_locationString

Required. Key location in the request. Corresponds to the JSON property requestLocation

Returns:

  • (String)


561
562
563
# File 'lib/google/apis/ces_v1/classes.rb', line 561

def request_location
  @request_location
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



568
569
570
571
572
# File 'lib/google/apis/ces_v1/classes.rb', line 568

def update!(**args)
  @api_key_secret_version = args[:api_key_secret_version] if args.key?(:api_key_secret_version)
  @key_name = args[:key_name] if args.key?(:key_name)
  @request_location = args[:request_location] if args.key?(:request_location)
end