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.
10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 |
# File 'lib/models/porcelain.rb', line 10866 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
10844 10845 10846 |
# File 'lib/models/porcelain.rb', line 10844 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
10846 10847 10848 |
# File 'lib/models/porcelain.rb', line 10846 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
10848 10849 10850 |
# File 'lib/models/porcelain.rb', line 10848 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
10850 10851 10852 |
# File 'lib/models/porcelain.rb', line 10850 def last_rotated_at @last_rotated_at end |
#lock_required ⇒ Object
Whether the secret requires a lock to access
10852 10853 10854 |
# File 'lib/models/porcelain.rb', line 10852 def lock_required @lock_required end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
10854 10855 10856 |
# File 'lib/models/porcelain.rb', line 10854 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
10856 10857 10858 |
# File 'lib/models/porcelain.rb', line 10856 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
10858 10859 10860 |
# File 'lib/models/porcelain.rb', line 10858 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
10860 10861 10862 |
# File 'lib/models/porcelain.rb', line 10860 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
10862 10863 10864 |
# File 'lib/models/porcelain.rb', line 10862 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
10864 10865 10866 |
# File 'lib/models/porcelain.rb', line 10864 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
10892 10893 10894 10895 10896 10897 10898 |
# File 'lib/models/porcelain.rb', line 10892 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 |