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(id: nil, name: nil, healthy: nil, tags: nil, secret_store_id: nil, access_key: nil, secret_access_key: nil, healthcheck_region: nil, role_arn: nil) ⇒ AWS

Returns a new instance of AWS.



755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/models/porcelain.rb', line 755

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  access_key: nil,
  secret_access_key: nil,
  healthcheck_region: nil,
  role_arn: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if tags != nil
    @tags = tags
  end
  if secret_store_id != nil
    @secret_store_id = secret_store_id
  end
  if access_key != nil
    @access_key = access_key
  end
  if secret_access_key != nil
    @secret_access_key = secret_access_key
  end
  if healthcheck_region != nil
    @healthcheck_region = healthcheck_region
  end
  if role_arn != nil
    @role_arn = role_arn
  end
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



747
748
749
# File 'lib/models/porcelain.rb', line 747

def access_key
  @access_key
end

#healthcheck_regionObject

Returns the value of attribute healthcheck_region.



751
752
753
# File 'lib/models/porcelain.rb', line 751

def healthcheck_region
  @healthcheck_region
end

#healthyObject

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



741
742
743
# File 'lib/models/porcelain.rb', line 741

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



737
738
739
# File 'lib/models/porcelain.rb', line 737

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



739
740
741
# File 'lib/models/porcelain.rb', line 739

def name
  @name
end

#role_arnObject

Returns the value of attribute role_arn.



753
754
755
# File 'lib/models/porcelain.rb', line 753

def role_arn
  @role_arn
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



749
750
751
# File 'lib/models/porcelain.rb', line 749

def secret_access_key
  @secret_access_key
end

#secret_store_idObject

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



745
746
747
# File 'lib/models/porcelain.rb', line 745

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



743
744
745
# File 'lib/models/porcelain.rb', line 743

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



795
796
797
798
799
800
801
# File 'lib/models/porcelain.rb', line 795

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