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.
11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 |
# File 'lib/models/porcelain.rb', line 11042 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
11020 11021 11022 |
# File 'lib/models/porcelain.rb', line 11020 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
11022 11023 11024 |
# File 'lib/models/porcelain.rb', line 11022 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
11024 11025 11026 |
# File 'lib/models/porcelain.rb', line 11024 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
11026 11027 11028 |
# File 'lib/models/porcelain.rb', line 11026 def last_rotated_at @last_rotated_at end |
#lock_required ⇒ Object
Whether the secret requires a lock to access
11028 11029 11030 |
# File 'lib/models/porcelain.rb', line 11028 def lock_required @lock_required end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
11030 11031 11032 |
# File 'lib/models/porcelain.rb', line 11030 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
11032 11033 11034 |
# File 'lib/models/porcelain.rb', line 11032 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
11034 11035 11036 |
# File 'lib/models/porcelain.rb', line 11034 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
11036 11037 11038 |
# File 'lib/models/porcelain.rb', line 11036 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
11038 11039 11040 |
# File 'lib/models/porcelain.rb', line 11038 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
11040 11041 11042 |
# File 'lib/models/porcelain.rb', line 11040 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
11068 11069 11070 11071 11072 11073 11074 |
# File 'lib/models/porcelain.rb', line 11068 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 |