Class: Google::Apis::SecretmanagerV1beta1::Secret

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

Overview

A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of zero or more SecretVersions that represent the secret data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Secret

Returns a new instance of Secret.



846
847
848
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 846

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

Instance Attribute Details

#create_timeString

Output only. The time at which the Secret was created. Corresponds to the JSON property createTime

Returns:

  • (String)


815
816
817
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 815

def create_time
  @create_time
end

#labelsHash<String,String>

The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: \pLl\pLo0,62 Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\pLl\p Lo\pN_-]0,63`No more than 64 labels can be assigned to a given resource. Corresponds to the JSON propertylabels`

Returns:

  • (Hash<String,String>)


825
826
827
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 825

def labels
  @labels
end

#nameString

Output only. The resource name of the Secret in the format projects/*/secrets/ *. Corresponds to the JSON property name

Returns:

  • (String)


831
832
833
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 831

def name
  @name
end

#replicationGoogle::Apis::SecretmanagerV1beta1::Replication

A policy that defines the replication configuration of data. Corresponds to the JSON property replication



836
837
838
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 836

def replication
  @replication
end

#tagsHash<String,String>

Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. Corresponds to the JSON property tags

Returns:

  • (Hash<String,String>)


844
845
846
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 844

def tags
  @tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



851
852
853
854
855
856
857
# File 'lib/google/apis/secretmanager_v1beta1/classes.rb', line 851

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @replication = args[:replication] if args.key?(:replication)
  @tags = args[:tags] if args.key?(:tags)
end