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.
10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 |
# File 'lib/models/porcelain.rb', line 10200 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
10180 10181 10182 |
# File 'lib/models/porcelain.rb', line 10180 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
10182 10183 10184 |
# File 'lib/models/porcelain.rb', line 10182 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
10184 10185 10186 |
# File 'lib/models/porcelain.rb', line 10184 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
10186 10187 10188 |
# File 'lib/models/porcelain.rb', line 10186 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
10188 10189 10190 |
# File 'lib/models/porcelain.rb', line 10188 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
10190 10191 10192 |
# File 'lib/models/porcelain.rb', line 10190 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
10192 10193 10194 |
# File 'lib/models/porcelain.rb', line 10192 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
10194 10195 10196 |
# File 'lib/models/porcelain.rb', line 10194 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
10196 10197 10198 |
# File 'lib/models/porcelain.rb', line 10196 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
10198 10199 10200 |
# File 'lib/models/porcelain.rb', line 10198 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
10224 10225 10226 10227 10228 10229 10230 |
# File 'lib/models/porcelain.rb', line 10224 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 |