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.



9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
# File 'lib/models/porcelain.rb', line 9383

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.



9369
9370
9371
# File 'lib/models/porcelain.rb', line 9369

def id
  @id
end

#key_rotation_interval_daysObject

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



9371
9372
9373
# File 'lib/models/porcelain.rb', line 9371

def key_rotation_interval_days
  @key_rotation_interval_days
end

#nameObject

Unique human-readable name of the Secret Engine.



9373
9374
9375
# File 'lib/models/porcelain.rb', line 9373

def name
  @name
end

#public_keyObject

Public key linked with a secret engine



9375
9376
9377
# File 'lib/models/porcelain.rb', line 9375

def public_key
  @public_key
end

#secret_store_idObject

Backing secret store identifier



9377
9378
9379
# File 'lib/models/porcelain.rb', line 9377

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



9379
9380
9381
# File 'lib/models/porcelain.rb', line 9379

def secret_store_root_path
  @secret_store_root_path
end

#tagsObject

Tags is a map of key, value pairs.



9381
9382
9383
# File 'lib/models/porcelain.rb', line 9381

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9401
9402
9403
9404
9405
9406
9407
# File 'lib/models/porcelain.rb', line 9401

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