Class: Google::Apis::SecretmanagerV1::Secret
- Inherits:
-
Object
- Object
- Google::Apis::SecretmanagerV1::Secret
- 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
-
#annotations ⇒ Hash<String,String>
Optional.
-
#create_time ⇒ String
Output only.
-
#customer_managed_encryption ⇒ Google::Apis::SecretmanagerV1::CustomerManagedEncryption
Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK).
-
#etag ⇒ String
Optional.
-
#expire_time ⇒ String
Optional.
-
#labels ⇒ Hash<String,String>
The labels assigned to this Secret.
-
#name ⇒ String
Output only.
-
#policy_member ⇒ Google::Apis::SecretmanagerV1::ResourcePolicyMember
Output-only policy member strings of a Google Cloud resource's built-in identity.
-
#replication ⇒ Google::Apis::SecretmanagerV1::Replication
A policy that defines the replication and encryption configuration of data.
-
#rotation ⇒ Google::Apis::SecretmanagerV1::Rotation
The rotation time and period for a Secret.
-
#secret_type ⇒ String
Optional.
-
#tags ⇒ Hash<String,String>
Optional.
-
#topics ⇒ Array<Google::Apis::SecretmanagerV1::Topic>
Optional.
-
#ttl ⇒ String
Input only.
-
#version_aliases ⇒ Hash<String,Fixnum>
Optional.
-
#version_destroy_ttl ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Secret
constructor
A new instance of Secret.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Secret
Returns a new instance of Secret.
1257 1258 1259 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1257 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<String,String>
Optional. Custom metadata about the secret. Annotations are distinct from
various forms of labels. Annotations exist to allow client tools to store
their own state information without requiring a database. Annotation keys must
be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128
bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may
have dashes (-), underscores (_), dots (.), and alphanumerics in between these
symbols. The total size of annotation keys and values must be less than 16KiB.
Corresponds to the JSON property annotations
1153 1154 1155 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1153 def annotations @annotations end |
#create_time ⇒ String
Output only. The time at which the Secret was created.
Corresponds to the JSON property createTime
1158 1159 1160 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1158 def create_time @create_time end |
#customer_managed_encryption ⇒ Google::Apis::SecretmanagerV1::CustomerManagedEncryption
Configuration for encrypting secret payloads using customer-managed encryption
keys (CMEK).
Corresponds to the JSON property customerManagedEncryption
1164 1165 1166 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1164 def customer_managed_encryption @customer_managed_encryption end |
#etag ⇒ String
Optional. Etag of the currently stored Secret.
Corresponds to the JSON property etag
1169 1170 1171 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1169 def etag @etag end |
#expire_time ⇒ String
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
1175 1176 1177 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1175 def expire_time @expire_time end |
#labels ⇒ Hash<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`
1185 1186 1187 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1185 def labels @labels end |
#name ⇒ String
Output only. The resource name of the Secret in the format projects/*/secrets/
*.
Corresponds to the JSON property name
1191 1192 1193 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1191 def name @name end |
#policy_member ⇒ Google::Apis::SecretmanagerV1::ResourcePolicyMember
Output-only policy member strings of a Google Cloud resource's built-in
identity.
Corresponds to the JSON property policyMember
1197 1198 1199 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1197 def policy_member @policy_member end |
#replication ⇒ Google::Apis::SecretmanagerV1::Replication
A policy that defines the replication and encryption configuration of data.
Corresponds to the JSON property replication
1202 1203 1204 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1202 def replication @replication end |
#rotation ⇒ Google::Apis::SecretmanagerV1::Rotation
The rotation time and period for a Secret. At next_rotation_time, Secret
Manager will send a Pub/Sub notification to the topics configured on the
Secret. Secret.topics must be set to configure rotation.
Corresponds to the JSON property rotation
1209 1210 1211 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1209 def rotation @rotation end |
#secret_type ⇒ String
Optional. Immutable. This defines the type of the secret. Enforces certain
structural requirements on the SecretVersions. For secret of type UNSPECIFIED,
the SecretVersions can be of any type.
Corresponds to the JSON property secretType
1216 1217 1218 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1216 def secret_type @secret_type end |
#tags ⇒ Hash<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
1224 1225 1226 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1224 def @tags end |
#topics ⇒ Array<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
1230 1231 1232 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1230 def topics @topics end |
#ttl ⇒ String
Input only. The TTL for the Secret.
Corresponds to the JSON property ttl
1235 1236 1237 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1235 def ttl @ttl end |
#version_aliases ⇒ Hash<String,Fixnum>
Optional. Mapping from version alias to version name. A version alias is a
string with a maximum length of 63 characters and can contain uppercase and
lowercase letters, numerals, and the hyphen (-) and underscore ('_')
characters. An alias string must start with a letter and cannot be the string '
latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.
Version-Alias pairs will be viewable via GetSecret and modifiable via
UpdateSecret. Access by alias is only be supported on GetSecretVersion and
AccessSecretVersion.
Corresponds to the JSON property versionAliases
1247 1248 1249 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1247 def version_aliases @version_aliases end |
#version_destroy_ttl ⇒ String
Optional. Secret Version TTL after destruction request This is a part of the
Delayed secret version destroy feature. For secret with TTL>0, version
destruction doesn't happen immediately on calling destroy instead the version
goes to a disabled state and destruction happens after the TTL expires.
Corresponds to the JSON property versionDestroyTtl
1255 1256 1257 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1255 def version_destroy_ttl @version_destroy_ttl end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 |
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 1262 def update!(**args) @annotations = args[:annotations] if args.key?(:annotations) @create_time = args[:create_time] if args.key?(:create_time) @customer_managed_encryption = args[:customer_managed_encryption] if args.key?(:customer_managed_encryption) @etag = args[:etag] if args.key?(:etag) @expire_time = args[:expire_time] if args.key?(:expire_time) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @policy_member = args[:policy_member] if args.key?(:policy_member) @replication = args[:replication] if args.key?(:replication) @rotation = args[:rotation] if args.key?(:rotation) @secret_type = args[:secret_type] if args.key?(:secret_type) @tags = args[:tags] if args.key?(:tags) @topics = args[:topics] if args.key?(:topics) @ttl = args[:ttl] if args.key?(:ttl) @version_aliases = args[:version_aliases] if args.key?(:version_aliases) @version_destroy_ttl = args[:version_destroy_ttl] if args.key?(:version_destroy_ttl) end |