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.



8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
# File 'lib/models/porcelain.rb', line 8471

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.



8457
8458
8459
# File 'lib/models/porcelain.rb', line 8457

def id
  @id
end

#key_rotation_interval_daysObject

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



8459
8460
8461
# File 'lib/models/porcelain.rb', line 8459

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



8461
8462
8463
# File 'lib/models/porcelain.rb', line 8461

def name
  @name
end

#public_keyObject

Public key linked with a secret engine



8463
8464
8465
# File 'lib/models/porcelain.rb', line 8463

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



8465
8466
8467
# File 'lib/models/porcelain.rb', line 8465

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



8467
8468
8469
# File 'lib/models/porcelain.rb', line 8467

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



8469
8470
8471
# File 'lib/models/porcelain.rb', line 8469

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8489
8490
8491
8492
8493
8494
8495
# File 'lib/models/porcelain.rb', line 8489

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