Class: SDM::KeyValueEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

KeyValueEngine is currently unstable, and its API may change, or it may be removed, without a major version bump.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, key_rotation_interval_days: nil, name: nil, public_key: nil, secret_store_id: nil, secret_store_root_path: nil, tags: nil) ⇒ KeyValueEngine

Returns a new instance of KeyValueEngine.



7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
# File 'lib/models/porcelain.rb', line 7194

def initialize(
  id: nil,
  key_rotation_interval_days: nil,
  name: nil,
  public_key: nil,
  secret_store_id: nil,
  secret_store_root_path: nil,
  tags: nil
)
  @id = id == nil ? "" : id
  @key_rotation_interval_days = key_rotation_interval_days == nil ? 0 : key_rotation_interval_days
  @name = name == nil ? "" : name
  @public_key = public_key == nil ? "" : public_key
  @secret_store_id = secret_store_id == nil ? "" : secret_store_id
  @secret_store_root_path = secret_store_root_path == nil ? "" : secret_store_root_path
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
end

Instance Attribute Details

#idObject

Unique identifier of the Secret Engine.



7180
7181
7182
# File 'lib/models/porcelain.rb', line 7180

def id
  @id
end

#key_rotation_interval_daysObject

An interval of public/private key rotation for secret engine in days



7182
7183
7184
# File 'lib/models/porcelain.rb', line 7182

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



7184
7185
7186
# File 'lib/models/porcelain.rb', line 7184

def name
  @name
end

#public_keyObject

Public key linked with a secret engine



7186
7187
7188
# File 'lib/models/porcelain.rb', line 7186

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



7188
7189
7190
# File 'lib/models/porcelain.rb', line 7188

def secret_store_id
  @secret_store_id
end

#secret_store_root_pathObject

Backing Secret Store root path where managed secrets are going to be stored



7190
7191
7192
# File 'lib/models/porcelain.rb', line 7190

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



7192
7193
7194
# File 'lib/models/porcelain.rb', line 7192

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7212
7213
7214
7215
7216
7217
7218
# File 'lib/models/porcelain.rb', line 7212

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end