class SDM::Relay

Relay represents a StrongDM CLI installation running in relay mode.

Attributes

gateway_filter[RW]

GatewayFilter can be used to restrict the peering between relays and gateways.

id[RW]

Unique identifier of the Relay.

name[RW]

Unique human-readable name of the Relay. Node names must include only letters, numbers, and hyphens (no spaces, underscores, or other special characters). Generated if not provided on create.

state[RW]

The current state of the relay. One of: “new”, “verifying_restart”, “awaiting_restart”, “restarting”, “started”, “stopped”, “dead”, “unknown”.

tags[RW]

Tags is a map of key, value pairs.

Public Class Methods

new( id: nil, name: nil, state: nil, tags: nil, gateway_filter: nil ) click to toggle source
# File lib/models/porcelain.rb, line 6076
def initialize(
  id: nil,
  name: nil,
  state: nil,
  tags: nil,
  gateway_filter: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if state != nil
    @state = state
  end
  if tags != nil
    @tags = tags
  end
  if gateway_filter != nil
    @gateway_filter = gateway_filter
  end
end

Public Instance Methods

to_json(options = {}) click to toggle source
# File lib/models/porcelain.rb, line 6100
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