Class: SDM::AWS

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_key: nil, bind_interface: nil, egress_filter: nil, healthcheck_region: nil, healthy: nil, id: nil, name: nil, port_override: nil, proxy_cluster_id: nil, role_arn: nil, role_external_id: nil, secret_access_key: nil, secret_store_id: nil, subdomain: nil, tags: nil) ⇒ AWS

Returns a new instance of AWS.



549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
# File 'lib/models/porcelain.rb', line 549

def initialize(
  access_key: nil,
  bind_interface: nil,
  egress_filter: nil,
  healthcheck_region: nil,
  healthy: nil,
  id: nil,
  name: nil,
  port_override: nil,
  proxy_cluster_id: nil,
  role_arn: nil,
  role_external_id: nil,
  secret_access_key: nil,
  secret_store_id: nil,
  subdomain: nil,
  tags: nil
)
  @access_key = access_key == nil ? "" : access_key
  @bind_interface = bind_interface == nil ? "" : bind_interface
  @egress_filter = egress_filter == nil ? "" : egress_filter
  @healthcheck_region = healthcheck_region == nil ? "" : healthcheck_region
  @healthy = healthy == nil ? false : healthy
  @id = id == nil ? "" : id
  @name = name == nil ? "" : name
  @port_override = port_override == nil ? 0 : port_override
  @proxy_cluster_id = proxy_cluster_id == nil ? "" : proxy_cluster_id
  @role_arn = role_arn == nil ? "" : role_arn
  @role_external_id = role_external_id == nil ? "" : role_external_id
  @secret_access_key = secret_access_key == nil ? "" : secret_access_key
  @secret_store_id = secret_store_id == nil ? "" : secret_store_id
  @subdomain = subdomain == nil ? "" : subdomain
  @tags = tags == nil ? SDM::_porcelain_zero_value_tags() : tags
end

Instance Attribute Details

#access_keyObject

The Access Key ID to use to authenticate.



519
520
521
# File 'lib/models/porcelain.rb', line 519

def access_key
  @access_key
end

#bind_interfaceObject

The bind interface is the IP address to which the port override of a resource is bound (for example, 127.0.0.1). It is automatically generated if not provided and may also be set to one of the ResourceIPAllocationMode constants to select between VNM, loopback, or default allocation.



521
522
523
# File 'lib/models/porcelain.rb', line 521

def bind_interface
  @bind_interface
end

#egress_filterObject

A filter applied to the routing logic to pin datasource to nodes.



523
524
525
# File 'lib/models/porcelain.rb', line 523

def egress_filter
  @egress_filter
end

#healthcheck_regionObject

The AWS region healthcheck requests should attempt to connect to.



525
526
527
# File 'lib/models/porcelain.rb', line 525

def healthcheck_region
  @healthcheck_region
end

#healthyObject

True if the datasource is reachable and the credentials are valid.



527
528
529
# File 'lib/models/porcelain.rb', line 527

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



529
530
531
# File 'lib/models/porcelain.rb', line 529

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



531
532
533
# File 'lib/models/porcelain.rb', line 531

def name
  @name
end

#port_overrideObject

The local port used by clients to connect to this resource. It is automatically generated if not provided on create and may be re-generated on update by specifying a value of -1.



533
534
535
# File 'lib/models/porcelain.rb', line 533

def port_override
  @port_override
end

#proxy_cluster_idObject

ID of the proxy cluster for this resource, if any.



535
536
537
# File 'lib/models/porcelain.rb', line 535

def proxy_cluster_id
  @proxy_cluster_id
end

#role_arnObject

The role to assume after logging in.



537
538
539
# File 'lib/models/porcelain.rb', line 537

def role_arn
  @role_arn
end

#role_external_idObject

The external ID to associate with assume role requests. Does nothing if a role ARN is not provided.



539
540
541
# File 'lib/models/porcelain.rb', line 539

def role_external_id
  @role_external_id
end

#secret_access_keyObject

The Secret Access Key to use to authenticate.



541
542
543
# File 'lib/models/porcelain.rb', line 541

def secret_access_key
  @secret_access_key
end

#secret_store_idObject

ID of the secret store containing credentials for this resource, if any.



543
544
545
# File 'lib/models/porcelain.rb', line 543

def secret_store_id
  @secret_store_id
end

#subdomainObject

Subdomain is the local DNS address. (e.g. app-prod1 turns into app-prod1.your-org-name.sdm.network)



545
546
547
# File 'lib/models/porcelain.rb', line 545

def subdomain
  @subdomain
end

#tagsObject

Tags is a map of key, value pairs.



547
548
549
# File 'lib/models/porcelain.rb', line 547

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



583
584
585
586
587
588
589
# File 'lib/models/porcelain.rb', line 583

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