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.
9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 |
# File 'lib/models/porcelain.rb', line 9499 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
9479 9480 9481 |
# File 'lib/models/porcelain.rb', line 9479 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
9481 9482 9483 |
# File 'lib/models/porcelain.rb', line 9481 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
9483 9484 9485 |
# File 'lib/models/porcelain.rb', line 9483 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
9485 9486 9487 |
# File 'lib/models/porcelain.rb', line 9485 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
9487 9488 9489 |
# File 'lib/models/porcelain.rb', line 9487 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
9489 9490 9491 |
# File 'lib/models/porcelain.rb', line 9489 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
9491 9492 9493 |
# File 'lib/models/porcelain.rb', line 9491 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
9493 9494 9495 |
# File 'lib/models/porcelain.rb', line 9493 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
9495 9496 9497 |
# File 'lib/models/porcelain.rb', line 9495 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
9497 9498 9499 |
# File 'lib/models/porcelain.rb', line 9497 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9523 9524 9525 9526 9527 9528 9529 |
# File 'lib/models/porcelain.rb', line 9523 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 |