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.



9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
# File 'lib/models/porcelain.rb', line 9584

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



9564
9565
9566
# File 'lib/models/porcelain.rb', line 9564

def config
  @config
end

#expires_atObject

Timestamp of when secret is going to be rotated



9566
9567
9568
# File 'lib/models/porcelain.rb', line 9566

def expires_at
  @expires_at
end

#idObject

Unique identifier of the Managed Secret.



9568
9569
9570
# File 'lib/models/porcelain.rb', line 9568

def id
  @id
end

#last_rotated_atObject

Timestamp of when secret was last rotated



9570
9571
9572
# File 'lib/models/porcelain.rb', line 9570

def last_rotated_at
  @last_rotated_at
end

#nameObject

Unique human-readable name of the Managed Secret.



9572
9573
9574
# File 'lib/models/porcelain.rb', line 9572

def name
  @name
end

#policyObject

Password and rotation policy for the secret



9574
9575
9576
# File 'lib/models/porcelain.rb', line 9574

def policy
  @policy
end

#secret_engine_idObject

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



9576
9577
9578
# File 'lib/models/porcelain.rb', line 9576

def secret_engine_id
  @secret_engine_id
end

#secret_store_pathObject

Path in a secret store.



9578
9579
9580
# File 'lib/models/porcelain.rb', line 9578

def secret_store_path
  @secret_store_path
end

#tagsObject

Tags is a map of key, value pairs.



9580
9581
9582
# File 'lib/models/porcelain.rb', line 9580

def tags
  @tags
end

#valueObject

Sensitive value of the secret.



9582
9583
9584
# File 'lib/models/porcelain.rb', line 9582

def value
  @value
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9608
9609
9610
9611
9612
9613
9614
# File 'lib/models/porcelain.rb', line 9608

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