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



9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
# File 'lib/models/porcelain.rb', line 9981

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



9961
9962
9963
# File 'lib/models/porcelain.rb', line 9961

def config
  @config
end

#expires_atObject

Timestamp of when secret is going to be rotated



9963
9964
9965
# File 'lib/models/porcelain.rb', line 9963

def expires_at
  @expires_at
end

#idObject

Unique identifier of the Managed Secret.



9965
9966
9967
# File 'lib/models/porcelain.rb', line 9965

def id
  @id
end

#last_rotated_atObject

Timestamp of when secret was last rotated



9967
9968
9969
# File 'lib/models/porcelain.rb', line 9967

def last_rotated_at
  @last_rotated_at
end

#nameObject

Unique human-readable name of the Managed Secret.



9969
9970
9971
# File 'lib/models/porcelain.rb', line 9969

def name
  @name
end

#policyObject

Password and rotation policy for the secret



9971
9972
9973
# File 'lib/models/porcelain.rb', line 9971

def policy
  @policy
end

#secret_engine_idObject

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



9973
9974
9975
# File 'lib/models/porcelain.rb', line 9973

def secret_engine_id
  @secret_engine_id
end

#secret_store_pathObject

Path in a secret store.



9975
9976
9977
# File 'lib/models/porcelain.rb', line 9975

def secret_store_path
  @secret_store_path
end

#tagsObject

Tags is a map of key, value pairs.



9977
9978
9979
# File 'lib/models/porcelain.rb', line 9977

def tags
  @tags
end

#valueObject

Sensitive value of the secret.



9979
9980
9981
# File 'lib/models/porcelain.rb', line 9979

def value
  @value
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10005
10006
10007
10008
10009
10010
10011
# File 'lib/models/porcelain.rb', line 10005

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