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.



9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
# File 'lib/models/porcelain.rb', line 9816

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

#id ⇒ Object

Unique identifier of the Secret Engine.



9800
9801
9802
# File 'lib/models/porcelain.rb', line 9800

def id
  @id
end

#key_rotation_interval_days ⇒ Object

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



9802
9803
9804
# File 'lib/models/porcelain.rb', line 9802

def key_rotation_interval_days
  @key_rotation_interval_days
end

#name ⇒ Object

Unique human-readable name of the Secret Engine.



9804
9805
9806
# File 'lib/models/porcelain.rb', line 9804

def name
  @name
end

#node_selector ⇒ Object

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



9806
9807
9808
# File 'lib/models/porcelain.rb', line 9806

def node_selector
  @node_selector
end

#public_key ⇒ Object

Public key linked with a secret engine



9808
9809
9810
# File 'lib/models/porcelain.rb', line 9808

def public_key
  @public_key
end

#secret_store_id ⇒ Object

Backing secret store identifier



9810
9811
9812
# File 'lib/models/porcelain.rb', line 9810

def secret_store_id
  @secret_store_id
end

#secret_store_root_path ⇒ Object

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



9812
9813
9814
# File 'lib/models/porcelain.rb', line 9812

def secret_store_root_path
  @secret_store_root_path
end

#tags ⇒ Object

Tags is a map of key, value pairs.



9814
9815
9816
# File 'lib/models/porcelain.rb', line 9814

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9836
9837
9838
9839
9840
9841
9842
# File 'lib/models/porcelain.rb', line 9836

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