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, public_key: nil, secret_store_id: nil, secret_store_root_path: nil, tags: nil) ⇒ KeyValueEngine

Returns a new instance of KeyValueEngine.



8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
# File 'lib/models/porcelain.rb', line 8561

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.



8547
8548
8549
# File 'lib/models/porcelain.rb', line 8547

def id
  @id
end

#key_rotation_interval_daysObject

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



8549
8550
8551
# File 'lib/models/porcelain.rb', line 8549

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



8551
8552
8553
# File 'lib/models/porcelain.rb', line 8551

def name
  @name
end

#public_keyObject

Public key linked with a secret engine



8553
8554
8555
# File 'lib/models/porcelain.rb', line 8553

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



8555
8556
8557
# File 'lib/models/porcelain.rb', line 8555

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



8557
8558
8559
# File 'lib/models/porcelain.rb', line 8557

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



8559
8560
8561
# File 'lib/models/porcelain.rb', line 8559

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8579
8580
8581
8582
8583
8584
8585
# File 'lib/models/porcelain.rb', line 8579

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