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.
8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 |
# File 'lib/models/porcelain.rb', line 8565 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
8545 8546 8547 |
# File 'lib/models/porcelain.rb', line 8545 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
8547 8548 8549 |
# File 'lib/models/porcelain.rb', line 8547 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
8549 8550 8551 |
# File 'lib/models/porcelain.rb', line 8549 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
8551 8552 8553 |
# File 'lib/models/porcelain.rb', line 8551 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
8553 8554 8555 |
# File 'lib/models/porcelain.rb', line 8553 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
8555 8556 8557 |
# File 'lib/models/porcelain.rb', line 8555 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
8557 8558 8559 |
# File 'lib/models/porcelain.rb', line 8557 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
8559 8560 8561 |
# File 'lib/models/porcelain.rb', line 8559 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
8561 8562 8563 |
# File 'lib/models/porcelain.rb', line 8561 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
8563 8564 8565 |
# File 'lib/models/porcelain.rb', line 8563 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8589 8590 8591 8592 8593 8594 8595 |
# File 'lib/models/porcelain.rb', line 8589 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 |