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.



9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
# File 'lib/models/porcelain.rb', line 9097

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.



9083
9084
9085
# File 'lib/models/porcelain.rb', line 9083

def id
  @id
end

#key_rotation_interval_daysObject

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



9085
9086
9087
# File 'lib/models/porcelain.rb', line 9085

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



9087
9088
9089
# File 'lib/models/porcelain.rb', line 9087

def name
  @name
end

#public_keyObject

Public key linked with a secret engine



9089
9090
9091
# File 'lib/models/porcelain.rb', line 9089

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



9091
9092
9093
# File 'lib/models/porcelain.rb', line 9091

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



9093
9094
9095
# File 'lib/models/porcelain.rb', line 9093

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



9095
9096
9097
# File 'lib/models/porcelain.rb', line 9095

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9115
9116
9117
9118
9119
9120
9121
# File 'lib/models/porcelain.rb', line 9115

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