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.



7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
# File 'lib/models/porcelain.rb', line 7610

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.



7596
7597
7598
# File 'lib/models/porcelain.rb', line 7596

def id
  @id
end

#key_rotation_interval_daysObject

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



7598
7599
7600
# File 'lib/models/porcelain.rb', line 7598

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



7600
7601
7602
# File 'lib/models/porcelain.rb', line 7600

def name
  @name
end

#public_keyObject

Public key linked with a secret engine



7602
7603
7604
# File 'lib/models/porcelain.rb', line 7602

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



7604
7605
7606
# File 'lib/models/porcelain.rb', line 7604

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



7606
7607
7608
# File 'lib/models/porcelain.rb', line 7606

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



7608
7609
7610
# File 'lib/models/porcelain.rb', line 7608

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7628
7629
7630
7631
7632
7633
7634
# File 'lib/models/porcelain.rb', line 7628

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