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.
-
#lock_required ⇒ Object
Whether the secret requires a lock to access.
-
#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, lock_required: 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, lock_required: nil, name: nil, policy: nil, secret_engine_id: nil, secret_store_path: nil, tags: nil, value: nil) ⇒ ManagedSecret
Returns a new instance of ManagedSecret.
11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 |
# File 'lib/models/porcelain.rb', line 11137 def initialize( config: nil, expires_at: nil, id: nil, last_rotated_at: nil, lock_required: 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 @lock_required = lock_required == nil ? false : lock_required @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
11115 11116 11117 |
# File 'lib/models/porcelain.rb', line 11115 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
11117 11118 11119 |
# File 'lib/models/porcelain.rb', line 11117 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
11119 11120 11121 |
# File 'lib/models/porcelain.rb', line 11119 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
11121 11122 11123 |
# File 'lib/models/porcelain.rb', line 11121 def last_rotated_at @last_rotated_at end |
#lock_required ⇒ Object
Whether the secret requires a lock to access
11123 11124 11125 |
# File 'lib/models/porcelain.rb', line 11123 def lock_required @lock_required end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
11125 11126 11127 |
# File 'lib/models/porcelain.rb', line 11125 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
11127 11128 11129 |
# File 'lib/models/porcelain.rb', line 11127 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
11129 11130 11131 |
# File 'lib/models/porcelain.rb', line 11129 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
11131 11132 11133 |
# File 'lib/models/porcelain.rb', line 11131 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
11133 11134 11135 |
# File 'lib/models/porcelain.rb', line 11133 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
11135 11136 11137 |
# File 'lib/models/porcelain.rb', line 11135 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
11163 11164 11165 11166 11167 11168 11169 |
# File 'lib/models/porcelain.rb', line 11163 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 |