Class: SDM::KeyValueEngine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of KeyValueEngine.



9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
# File 'lib/models/porcelain.rb', line 9700

def initialize(
  id: nil,
  key_rotation_interval_days: nil,
  name: nil,
  node_selector: 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
  @node_selector = node_selector == nil ? "" : node_selector
  @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.



9684
9685
9686
# File 'lib/models/porcelain.rb', line 9684

def id
  @id
end

#key_rotation_interval_daysObject

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



9686
9687
9688
# File 'lib/models/porcelain.rb', line 9686

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



9688
9689
9690
# File 'lib/models/porcelain.rb', line 9688

def name
  @name
end

#node_selectorObject

node selector is used to narrow down the nodes used to communicate with with secret engine



9690
9691
9692
# File 'lib/models/porcelain.rb', line 9690

def node_selector
  @node_selector
end

#public_keyObject

Public key linked with a secret engine



9692
9693
9694
# File 'lib/models/porcelain.rb', line 9692

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



9694
9695
9696
# File 'lib/models/porcelain.rb', line 9694

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



9696
9697
9698
# File 'lib/models/porcelain.rb', line 9696

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



9698
9699
9700
# File 'lib/models/porcelain.rb', line 9698

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9720
9721
9722
9723
9724
9725
9726
# File 'lib/models/porcelain.rb', line 9720

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