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.
9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 |
# File 'lib/models/porcelain.rb', line 9584 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
9564 9565 9566 |
# File 'lib/models/porcelain.rb', line 9564 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
9566 9567 9568 |
# File 'lib/models/porcelain.rb', line 9566 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
9568 9569 9570 |
# File 'lib/models/porcelain.rb', line 9568 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
9570 9571 9572 |
# File 'lib/models/porcelain.rb', line 9570 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
9572 9573 9574 |
# File 'lib/models/porcelain.rb', line 9572 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
9574 9575 9576 |
# File 'lib/models/porcelain.rb', line 9574 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
9576 9577 9578 |
# File 'lib/models/porcelain.rb', line 9576 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
9578 9579 9580 |
# File 'lib/models/porcelain.rb', line 9578 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
9580 9581 9582 |
# File 'lib/models/porcelain.rb', line 9580 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
9582 9583 9584 |
# File 'lib/models/porcelain.rb', line 9582 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
9608 9609 9610 9611 9612 9613 9614 |
# File 'lib/models/porcelain.rb', line 9608 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 |