Class: Google::Apis::ApikeysV2::V2Key
- Inherits:
-
Object
- Object
- Google::Apis::ApikeysV2::V2Key
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/apikeys_v2/classes.rb,
lib/google/apis/apikeys_v2/representations.rb,
lib/google/apis/apikeys_v2/representations.rb
Overview
The representation of a key managed by the API Keys API.
Instance Attribute Summary collapse
-
#annotations ⇒ Hash<String,String>
Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.
-
#create_time ⇒ String
Output only.
-
#delete_time ⇒ String
Output only.
-
#display_name ⇒ String
Human-readable display name of this key that you can modify.
-
#etag ⇒ String
A checksum computed by the server based on the current value of the Key resource.
-
#key_string ⇒ String
Output only.
-
#name ⇒ String
Identifier.
-
#restrictions ⇒ Google::Apis::ApikeysV2::V2Restrictions
Describes the restrictions on the key.
-
#service_account_email ⇒ String
Optional.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ V2Key
constructor
A new instance of V2Key.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ V2Key
Returns a new instance of V2Key.
333 334 335 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 333 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<String,String>
Annotations is an unstructured key-value map stored with a policy that may be
set by external tools to store and retrieve arbitrary metadata. They are not
queryable and should be preserved when modifying objects.
Corresponds to the JSON property annotations
272 273 274 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 272 def annotations @annotations end |
#create_time ⇒ String
Output only. A timestamp identifying the time this key was originally created.
Corresponds to the JSON property createTime
277 278 279 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 277 def create_time @create_time end |
#delete_time ⇒ String
Output only. A timestamp when this key was deleted. If the resource is not
deleted, this must be empty.
Corresponds to the JSON property deleteTime
283 284 285 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 283 def delete_time @delete_time end |
#display_name ⇒ String
Human-readable display name of this key that you can modify. The maximum
length is 63 characters.
Corresponds to the JSON property displayName
289 290 291 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 289 def display_name @display_name end |
#etag ⇒ String
A checksum computed by the server based on the current value of the Key
resource. This may be sent on update and delete requests to ensure the client
has an up-to-date value before proceeding. See https://google.aip.dev/154.
Corresponds to the JSON property etag
296 297 298 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 296 def etag @etag end |
#key_string ⇒ String
Output only. An encrypted and signed value held by this key. This field can be
accessed only through the GetKeyString method.
Corresponds to the JSON property keyString
302 303 304 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 302 def key_string @key_string end |
#name ⇒ String
Identifier. The resource name of the key. The name has the form: projects//
locations/global/keys/. For example: projects/123456867718/locations/global/
keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2 NOTE: Key is a global resource;
hence the only supported value for location is global.
Corresponds to the JSON property name
310 311 312 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 310 def name @name end |
#restrictions ⇒ Google::Apis::ApikeysV2::V2Restrictions
Describes the restrictions on the key.
Corresponds to the JSON property restrictions
315 316 317 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 315 def restrictions @restrictions end |
#service_account_email ⇒ String
Optional. The email address of the service account the key is bound to.
Corresponds to the JSON property serviceAccountEmail
321 322 323 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 321 def service_account_email @service_account_email end |
#uid ⇒ String
Output only. Unique id in UUID4 format.
Corresponds to the JSON property uid
326 327 328 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 326 def uid @uid end |
#update_time ⇒ String
Output only. A timestamp identifying the time this key was last updated.
Corresponds to the JSON property updateTime
331 332 333 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 331 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/google/apis/apikeys_v2/classes.rb', line 338 def update!(**args) @annotations = args[:annotations] if args.key?(:annotations) @create_time = args[:create_time] if args.key?(:create_time) @delete_time = args[:delete_time] if args.key?(:delete_time) @display_name = args[:display_name] if args.key?(:display_name) @etag = args[:etag] if args.key?(:etag) @key_string = args[:key_string] if args.key?(:key_string) @name = args[:name] if args.key?(:name) @restrictions = args[:restrictions] if args.key?(:restrictions) @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) end |