Class: SDM::ManagedSecret
- Inherits:
-
Object
- Object
- SDM::ManagedSecret
- Defined in:
- lib/models/porcelain.rb
Overview
ManagedSecret contains details about managed secret
Instance Attribute Summary collapse
-
#config ⇒ Object
public part of the secret value.
-
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated.
-
#id ⇒ Object
Unique identifier of the Managed Secret.
-
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated.
-
#name ⇒ Object
Unique human-readable name of the Managed Secret.
-
#policy ⇒ Object
Password and rotation policy for the secret.
-
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
-
#secret_store_path ⇒ Object
Path in a secret store.
-
#tags ⇒ Object
Tags is a map of key, value pairs.
-
#value ⇒ Object
Sensitive value of the secret.
Instance Method Summary collapse
-
#initialize(config: nil, expires_at: nil, id: nil, last_rotated_at: nil, name: nil, policy: nil, secret_engine_id: nil, secret_store_path: nil, tags: nil, value: nil) ⇒ ManagedSecret
constructor
A new instance of ManagedSecret.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(config: nil, expires_at: nil, id: nil, last_rotated_at: nil, name: nil, policy: nil, secret_engine_id: nil, secret_store_path: nil, tags: nil, value: nil) ⇒ ManagedSecret
Returns a new instance of ManagedSecret.
8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 |
# File 'lib/models/porcelain.rb', line 8390 def initialize( config: nil, expires_at: nil, id: nil, last_rotated_at: nil, name: nil, policy: nil, secret_engine_id: nil, secret_store_path: nil, tags: nil, value: nil ) @config = config == nil ? "" : config @expires_at = expires_at == nil ? nil : expires_at @id = id == nil ? "" : id @last_rotated_at = last_rotated_at == nil ? nil : last_rotated_at @name = name == nil ? "" : name @policy = policy == nil ? nil : policy @secret_engine_id = secret_engine_id == nil ? "" : secret_engine_id @secret_store_path = secret_store_path == nil ? "" : secret_store_path @tags = == nil ? SDM::() : @value = value == nil ? "" : value end |
Instance Attribute Details
#config ⇒ Object
public part of the secret value
8370 8371 8372 |
# File 'lib/models/porcelain.rb', line 8370 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
8372 8373 8374 |
# File 'lib/models/porcelain.rb', line 8372 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
8374 8375 8376 |
# File 'lib/models/porcelain.rb', line 8374 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
8376 8377 8378 |
# File 'lib/models/porcelain.rb', line 8376 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
8378 8379 8380 |
# File 'lib/models/porcelain.rb', line 8378 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
8380 8381 8382 |
# File 'lib/models/porcelain.rb', line 8380 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
8382 8383 8384 |
# File 'lib/models/porcelain.rb', line 8382 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
8384 8385 8386 |
# File 'lib/models/porcelain.rb', line 8384 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
8386 8387 8388 |
# File 'lib/models/porcelain.rb', line 8386 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
8388 8389 8390 |
# File 'lib/models/porcelain.rb', line 8388 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8414 8415 8416 8417 8418 8419 8420 |
# File 'lib/models/porcelain.rb', line 8414 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |