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.



8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
# File 'lib/models/porcelain.rb', line 8005

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



7985
7986
7987
# File 'lib/models/porcelain.rb', line 7985

def config
  @config
end

#expires_atObject

Timestamp of when secret is going to be rotated



7987
7988
7989
# File 'lib/models/porcelain.rb', line 7987

def expires_at
  @expires_at
end

#idObject

Unique identifier of the Managed Secret.



7989
7990
7991
# File 'lib/models/porcelain.rb', line 7989

def id
  @id
end

#last_rotated_atObject

Timestamp of when secret was last rotated



7991
7992
7993
# File 'lib/models/porcelain.rb', line 7991

def last_rotated_at
  @last_rotated_at
end

#nameObject

Unique human-readable name of the Managed Secret.



7993
7994
7995
# File 'lib/models/porcelain.rb', line 7993

def name
  @name
end

#policyObject

Password and rotation policy for the secret



7995
7996
7997
# File 'lib/models/porcelain.rb', line 7995

def policy
  @policy
end

#secret_engine_idObject

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



7997
7998
7999
# File 'lib/models/porcelain.rb', line 7997

def secret_engine_id
  @secret_engine_id
end

#secret_store_pathObject

Path in a secret store.



7999
8000
8001
# File 'lib/models/porcelain.rb', line 7999

def secret_store_path
  @secret_store_path
end

#tagsObject

Tags is a map of key, value pairs.



8001
8002
8003
# File 'lib/models/porcelain.rb', line 8001

def tags
  @tags
end

#valueObject

Sensitive value of the secret.



8003
8004
8005
# File 'lib/models/porcelain.rb', line 8003

def value
  @value
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8029
8030
8031
8032
8033
8034
8035
# File 'lib/models/porcelain.rb', line 8029

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