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.



10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
# File 'lib/models/porcelain.rb', line 10848

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



10828
10829
10830
# File 'lib/models/porcelain.rb', line 10828

def config
  @config
end

#expires_atObject

Timestamp of when secret is going to be rotated



10830
10831
10832
# File 'lib/models/porcelain.rb', line 10830

def expires_at
  @expires_at
end

#idObject

Unique identifier of the Managed Secret.



10832
10833
10834
# File 'lib/models/porcelain.rb', line 10832

def id
  @id
end

#last_rotated_atObject

Timestamp of when secret was last rotated



10834
10835
10836
# File 'lib/models/porcelain.rb', line 10834

def last_rotated_at
  @last_rotated_at
end

#nameObject

Unique human-readable name of the Managed Secret.



10836
10837
10838
# File 'lib/models/porcelain.rb', line 10836

def name
  @name
end

#policyObject

Password and rotation policy for the secret



10838
10839
10840
# File 'lib/models/porcelain.rb', line 10838

def policy
  @policy
end

#secret_engine_idObject

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



10840
10841
10842
# File 'lib/models/porcelain.rb', line 10840

def secret_engine_id
  @secret_engine_id
end

#secret_store_pathObject

Path in a secret store.



10842
10843
10844
# File 'lib/models/porcelain.rb', line 10842

def secret_store_path
  @secret_store_path
end

#tagsObject

Tags is a map of key, value pairs.



10844
10845
10846
# File 'lib/models/porcelain.rb', line 10844

def tags
  @tags
end

#valueObject

Sensitive value of the secret.



10846
10847
10848
# File 'lib/models/porcelain.rb', line 10846

def value
  @value
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10872
10873
10874
10875
10876
10877
10878
# File 'lib/models/porcelain.rb', line 10872

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