Class: Vault::Secret
Overview
Secret is a representation of a secret from Vault. Almost all data returned from Vault is represented as a secret.
Instance Attribute Summary collapse
-
#auth ⇒ SecretAuth?
readonly
Authentication information for this secret, if any.
-
#data ⇒ Hash<Symbol, Object>
readonly
Arbitrary data returned by the secret.
-
#lease_duration ⇒ Fixnum
readonly
The number of seconds this lease is valid.
-
#lease_id ⇒ String
readonly
Unique ID for the lease associated with this secret.
-
#warnings ⇒ Array<String>?
readonly
List of warnings returned by the Vault server.
-
#wrap_info ⇒ WrapInfo?
readonly
Wrapped information sent with the request (only present in Vault 0.6+).
Instance Method Summary collapse
-
#renewable([r]) ⇒ Boolean
Returns whether this lease is renewable.
Methods inherited from Response
#==, decode, #initialize, #to_h
Constructor Details
This class inherits a constructor from Vault::Response
Instance Attribute Details
#auth ⇒ SecretAuth? (readonly)
Authentication information for this secret, if any. Most secrets will contain this field, but it may also be ‘nil`. When authenticating to Vault, the resulting Vault token will be included in this embedded field.
20 |
# File 'lib/vault/api/secret.rb', line 20 field :auth, load: ->(v) { SecretAuth.decode(v) } |
#data ⇒ Hash<Symbol, Object> (readonly)
Arbitrary data returned by the secret. The keys returned are dependent upon the request made. For more information on the names of the keys that may be returned, please see the Vault documentation.
33 |
# File 'lib/vault/api/secret.rb', line 33 field :data, freeze: true |
#lease_duration ⇒ Fixnum (readonly)
The number of seconds this lease is valid. If this number is 0 or nil, the secret does not expire.
44 |
# File 'lib/vault/api/secret.rb', line 44 field :lease_duration |
#lease_id ⇒ String (readonly)
Unique ID for the lease associated with this secret. The ‘lease_id` is a path and UUID that uniquely represents the secret. This may be used for renewing and revoking the secret, if permitted.
56 |
# File 'lib/vault/api/secret.rb', line 56 field :lease_id |
#warnings ⇒ Array<String>? (readonly)
List of warnings returned by the Vault server. These are returned by the Vault server and may include deprecation information, new APIs, or request using the API differently in the future.
78 |
# File 'lib/vault/api/secret.rb', line 78 field :warnings, freeze: true |
Instance Method Details
#renewable([r]) ⇒ Boolean
Returns whether this lease is renewable.
66 |
# File 'lib/vault/api/secret.rb', line 66 field :renewable, as: :renewable? |