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.
8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 |
# File 'lib/models/porcelain.rb', line 8325 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 = == nil ? SDM::() : @value = value == nil ? "" : value end |
Instance Attribute Details
#config ⇒ Object
public part of the secret value
8305 8306 8307 |
# File 'lib/models/porcelain.rb', line 8305 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
8307 8308 8309 |
# File 'lib/models/porcelain.rb', line 8307 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
8309 8310 8311 |
# File 'lib/models/porcelain.rb', line 8309 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
8311 8312 8313 |
# File 'lib/models/porcelain.rb', line 8311 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
8313 8314 8315 |
# File 'lib/models/porcelain.rb', line 8313 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
8315 8316 8317 |
# File 'lib/models/porcelain.rb', line 8315 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
8317 8318 8319 |
# File 'lib/models/porcelain.rb', line 8317 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
8319 8320 8321 |
# File 'lib/models/porcelain.rb', line 8319 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
8321 8322 8323 |
# File 'lib/models/porcelain.rb', line 8321 def end |
#value ⇒ Object
Sensitive value of the secret.
8323 8324 8325 |
# File 'lib/models/porcelain.rb', line 8323 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8349 8350 8351 8352 8353 8354 8355 |
# File 'lib/models/porcelain.rb', line 8349 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 |