Class: SDM::ManagedSecret

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

Overview

ManagedSecret contains details about managed secret

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, expires_at: nil, id: nil, last_rotated_at: nil, name: nil, policy: nil, secret_engine_id: nil, secret_store_path: nil, tags: nil, value: nil) ⇒ ManagedSecret

Returns a new instance of ManagedSecret.



10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
# File 'lib/models/porcelain.rb', line 10486

def initialize(
  config: nil,
  expires_at: nil,
  id: nil,
  last_rotated_at: nil,
  name: nil,
  policy: nil,
  secret_engine_id: nil,
  secret_store_path: nil,
  tags: nil,
  value: nil
)
  @config = config == nil ? "" : config
  @expires_at = expires_at == nil ? nil : expires_at
  @id = id == nil ? "" : id
  @last_rotated_at = last_rotated_at == nil ? nil : last_rotated_at
  @name = name == nil ? "" : name
  @policy = policy == nil ? nil : policy
  @secret_engine_id = secret_engine_id == nil ? "" : secret_engine_id
  @secret_store_path = secret_store_path == nil ? "" : secret_store_path
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
  @value = value == nil ? "" : value
end

Instance Attribute Details

#configObject

public part of the secret value



10466
10467
10468
# File 'lib/models/porcelain.rb', line 10466

def config
  @config
end

#expires_atObject

Timestamp of when secret is going to be rotated



10468
10469
10470
# File 'lib/models/porcelain.rb', line 10468

def expires_at
  @expires_at
end

#idObject

Unique identifier of the Managed Secret.



10470
10471
10472
# File 'lib/models/porcelain.rb', line 10470

def id
  @id
end

#last_rotated_atObject

Timestamp of when secret was last rotated



10472
10473
10474
# File 'lib/models/porcelain.rb', line 10472

def last_rotated_at
  @last_rotated_at
end

#nameObject

Unique human-readable name of the Managed Secret.



10474
10475
10476
# File 'lib/models/porcelain.rb', line 10474

def name
  @name
end

#policyObject

Password and rotation policy for the secret



10476
10477
10478
# File 'lib/models/porcelain.rb', line 10476

def policy
  @policy
end

#secret_engine_idObject

An ID of a Secret Engine linked with the Managed Secret.



10478
10479
10480
# File 'lib/models/porcelain.rb', line 10478

def secret_engine_id
  @secret_engine_id
end

#secret_store_pathObject

Path in a secret store.



10480
10481
10482
# File 'lib/models/porcelain.rb', line 10480

def secret_store_path
  @secret_store_path
end

#tagsObject

Tags is a map of key, value pairs.



10482
10483
10484
# File 'lib/models/porcelain.rb', line 10482

def tags
  @tags
end

#valueObject

Sensitive value of the secret.



10484
10485
10486
# File 'lib/models/porcelain.rb', line 10484

def value
  @value
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10510
10511
10512
10513
10514
10515
10516
# File 'lib/models/porcelain.rb', line 10510

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