Class: Google::Apis::RunV1::SecretKeySelector

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

Overview

SecretKeySelector selects a key of a Secret.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SecretKeySelector

Returns a new instance of SecretKeySelector.



2976
2977
2978
# File 'lib/google/apis/run_v1/classes.rb', line 2976

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

Instance Attribute Details

#keyString

Required. A Cloud Secret Manager secret version. Must be 'latest' for the latest version, an integer for a specific version, or a version alias. The key of the secret to select from. Must be a valid secret key. Corresponds to the JSON property key

Returns:

  • (String)


2952
2953
2954
# File 'lib/google/apis/run_v1/classes.rb', line 2952

def key
  @key
end

#local_object_referenceGoogle::Apis::RunV1::LocalObjectReference

Not supported by Cloud Run. LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. Corresponds to the JSON property localObjectReference



2958
2959
2960
# File 'lib/google/apis/run_v1/classes.rb', line 2958

def local_object_reference
  @local_object_reference
end

#nameString

The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: :projects//secrets/. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation. The name of the secret in the pod's namespace to select from. Corresponds to the JSON property name

Returns:

  • (String)


2968
2969
2970
# File 'lib/google/apis/run_v1/classes.rb', line 2968

def name
  @name
end

#optionalBoolean Also known as: optional?

Specify whether the Secret or its key must be defined. Corresponds to the JSON property optional

Returns:

  • (Boolean)


2973
2974
2975
# File 'lib/google/apis/run_v1/classes.rb', line 2973

def optional
  @optional
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2981
2982
2983
2984
2985
2986
# File 'lib/google/apis/run_v1/classes.rb', line 2981

def update!(**args)
  @key = args[:key] if args.key?(:key)
  @local_object_reference = args[:local_object_reference] if args.key?(:local_object_reference)
  @name = args[:name] if args.key?(:name)
  @optional = args[:optional] if args.key?(:optional)
end