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.
8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 |
# File 'lib/models/porcelain.rb', line 8073 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
8053 8054 8055 |
# File 'lib/models/porcelain.rb', line 8053 def config @config end |
#expires_at ⇒ Object
Timestamp of when secret is going to be rotated
8055 8056 8057 |
# File 'lib/models/porcelain.rb', line 8055 def expires_at @expires_at end |
#id ⇒ Object
Unique identifier of the Managed Secret.
8057 8058 8059 |
# File 'lib/models/porcelain.rb', line 8057 def id @id end |
#last_rotated_at ⇒ Object
Timestamp of when secret was last rotated
8059 8060 8061 |
# File 'lib/models/porcelain.rb', line 8059 def last_rotated_at @last_rotated_at end |
#name ⇒ Object
Unique human-readable name of the Managed Secret.
8061 8062 8063 |
# File 'lib/models/porcelain.rb', line 8061 def name @name end |
#policy ⇒ Object
Password and rotation policy for the secret
8063 8064 8065 |
# File 'lib/models/porcelain.rb', line 8063 def policy @policy end |
#secret_engine_id ⇒ Object
An ID of a Secret Engine linked with the Managed Secret.
8065 8066 8067 |
# File 'lib/models/porcelain.rb', line 8065 def secret_engine_id @secret_engine_id end |
#secret_store_path ⇒ Object
Path in a secret store.
8067 8068 8069 |
# File 'lib/models/porcelain.rb', line 8067 def secret_store_path @secret_store_path end |
#tags ⇒ Object
Tags is a map of key, value pairs.
8069 8070 8071 |
# File 'lib/models/porcelain.rb', line 8069 def @tags end |
#value ⇒ Object
Sensitive value of the secret.
8071 8072 8073 |
# File 'lib/models/porcelain.rb', line 8071 def value @value end |
Instance Method Details
#to_json(options = {}) ⇒ Object
8097 8098 8099 8100 8101 8102 8103 |
# File 'lib/models/porcelain.rb', line 8097 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 |