Class: SDM::SqlserverEngine

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(after_read_ttl: nil, database: nil, hostname: nil, id: nil, key_rotation_interval_days: nil, name: nil, node_selector: nil, password: nil, path_credentials: nil, policy: nil, port: nil, public_key: nil, secret_store_id: nil, secret_store_root_path: nil, tags: nil, tls: nil, tls_skip_verify: nil, ttl: nil, username: nil) ⇒ SqlserverEngine

Returns a new instance of SqlserverEngine.



18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
# File 'lib/models/porcelain.rb', line 18045

def initialize(
  after_read_ttl: nil,
  database: nil,
  hostname: nil,
  id: nil,
  key_rotation_interval_days: nil,
  name: nil,
  node_selector: nil,
  password: nil,
  path_credentials: nil,
  policy: nil,
  port: nil,
  public_key: nil,
  secret_store_id: nil,
  secret_store_root_path: nil,
  tags: nil,
  tls: nil,
  tls_skip_verify: nil,
  ttl: nil,
  username: nil
)
  @after_read_ttl = after_read_ttl == nil ? nil : after_read_ttl
  @database = database == nil ? "" : database
  @hostname = hostname == nil ? "" : hostname
  @id = id == nil ? "" : id
  @key_rotation_interval_days = key_rotation_interval_days == nil ? 0 : key_rotation_interval_days
  @name = name == nil ? "" : name
  @node_selector = node_selector == nil ? "" : node_selector
  @password = password == nil ? "" : password
  @path_credentials = path_credentials == nil ? false : path_credentials
  @policy = policy == nil ? nil : policy
  @port = port == nil ? 0 : port
  @public_key = public_key == nil ? "" : public_key
  @secret_store_id = secret_store_id == nil ? "" : secret_store_id
  @secret_store_root_path = secret_store_root_path == nil ? "" : secret_store_root_path
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
  @tls = tls == nil ? false : tls
  @tls_skip_verify = tls_skip_verify == nil ? false : tls_skip_verify
  @ttl = ttl == nil ? nil : ttl
  @username = username == nil ? "" : username
end

Instance Attribute Details

#after_read_ttl ⇒ Object

The default time-to-live duration of the password after it's read. Once the ttl has passed, a password will be rotated.



18007
18008
18009
# File 'lib/models/porcelain.rb', line 18007

def after_read_ttl
  @after_read_ttl
end

#database ⇒ Object

Database is the database to verify credential against.



18009
18010
18011
# File 'lib/models/porcelain.rb', line 18009

def database
  @database
end

#hostname ⇒ Object

Hostname is the hostname or IP address of the SQL Server.



18011
18012
18013
# File 'lib/models/porcelain.rb', line 18011

def hostname
  @hostname
end

#id ⇒ Object

Unique identifier of the Secret Engine.



18013
18014
18015
# File 'lib/models/porcelain.rb', line 18013

def id
  @id
end

#key_rotation_interval_days ⇒ Object

An interval of public/private key rotation for secret engine in days



18015
18016
18017
# File 'lib/models/porcelain.rb', line 18015

def key_rotation_interval_days
  @key_rotation_interval_days
end

#name ⇒ Object

Unique human-readable name of the Secret Engine.



18017
18018
18019
# File 'lib/models/porcelain.rb', line 18017

def name
  @name
end

#node_selector ⇒ Object

node selector is used to narrow down the nodes used to communicate with with secret engine



18019
18020
18021
# File 'lib/models/porcelain.rb', line 18019

def node_selector
  @node_selector
end

#password ⇒ Object

Password is the password to connect to the SQL Server server. With path_credentials it is a secret store path in the resource format path?key=password, otherwise it is the literal password.



18021
18022
18023
# File 'lib/models/porcelain.rb', line 18021

def password
  @password
end

#path_credentials ⇒ Object

PathCredentials is true when username and password are secret store paths, which the control plane stores. When false, they are literal values and the password is rotated and kept in the engine's secret store.



18023
18024
18025
# File 'lib/models/porcelain.rb', line 18023

def path_credentials
  @path_credentials
end

#policy ⇒ Object

Policy for password creation



18025
18026
18027
# File 'lib/models/porcelain.rb', line 18025

def policy
  @policy
end

#port ⇒ Object

Port is the port number of the SQL Server server.



18027
18028
18029
# File 'lib/models/porcelain.rb', line 18027

def port
  @port
end

#public_key ⇒ Object

Public key linked with a secret engine



18029
18030
18031
# File 'lib/models/porcelain.rb', line 18029

def public_key
  @public_key
end

#secret_store_id ⇒ Object

Backing secret store identifier



18031
18032
18033
# File 'lib/models/porcelain.rb', line 18031

def secret_store_id
  @secret_store_id
end

#secret_store_root_path ⇒ Object

Backing Secret Store root path where managed secrets are going to be stored



18033
18034
18035
# File 'lib/models/porcelain.rb', line 18033

def secret_store_root_path
  @secret_store_root_path
end

#tags ⇒ Object

Tags is a map of key, value pairs.



18035
18036
18037
# File 'lib/models/porcelain.rb', line 18035

def tags
  @tags
end

#tls ⇒ Object

TLS enables TLS/SSL when connecting to the SQL Server server.



18037
18038
18039
# File 'lib/models/porcelain.rb', line 18037

def tls
  @tls
end

#tls_skip_verify ⇒ Object

TLS disable certificate verification



18039
18040
18041
# File 'lib/models/porcelain.rb', line 18039

def tls_skip_verify
  @tls_skip_verify
end

#ttl ⇒ Object

The default password time-to-live duration. Once the ttl has passed, a password will be rotated the next time it's requested.



18041
18042
18043
# File 'lib/models/porcelain.rb', line 18041

def ttl
  @ttl
end

#username ⇒ Object

Username is the username to connect to the SQL Server. With path_credentials it is a secret store path in the resource format path?key=username, otherwise it is the literal username.



18043
18044
18045
# File 'lib/models/porcelain.rb', line 18043

def username
  @username
end

Instance Method Details

#to_json(options = {}) ⇒ Object



18087
18088
18089
18090
18091
18092
18093
# File 'lib/models/porcelain.rb', line 18087

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