Class: Google::Apis::SecretmanagerV1::Secret

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/secretmanager_v1/classes.rb,
lib/google/apis/secretmanager_v1/representations.rb,
lib/google/apis/secretmanager_v1/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.



792
793
794
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 792

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)


752
753
754
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 752

def create_time
  @create_time
end

#expire_timeString

Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. Corresponds to the JSON property expireTime

Returns:

  • (String)


758
759
760
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 758

def expire_time
  @expire_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>)


768
769
770
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 768

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)


774
775
776
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 774

def name
  @name
end

#replicationGoogle::Apis::SecretmanagerV1::Replication

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



779
780
781
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 779

def replication
  @replication
end

#topicsArray<Google::Apis::SecretmanagerV1::Topic>

Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. Corresponds to the JSON property topics



785
786
787
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 785

def topics
  @topics
end

#ttlString

Input only. The TTL for the Secret. Corresponds to the JSON property ttl

Returns:

  • (String)


790
791
792
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 790

def ttl
  @ttl
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



797
798
799
800
801
802
803
804
805
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 797

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