Class: SDM::DynamoDB

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, access_key: nil, secret_access_key: nil, region: nil, endpoint: nil, port_override: nil) ⇒ DynamoDB

Returns a new instance of DynamoDB.



911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
# File 'lib/models/porcelain.rb', line 911

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  access_key: nil,
  secret_access_key: nil,
  region: nil,
  endpoint: nil,
  port_override: nil
)
  if id != nil
    @id = id
  end
  if name != nil
    @name = name
  end
  if healthy != nil
    @healthy = healthy
  end
  if access_key != nil
    @access_key = access_key
  end
  if secret_access_key != nil
    @secret_access_key = secret_access_key
  end
  if region != nil
    @region = region
  end
  if endpoint != nil
    @endpoint = endpoint
  end
  if port_override != nil
    @port_override = port_override
  end
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



901
902
903
# File 'lib/models/porcelain.rb', line 901

def access_key
  @access_key
end

#endpointObject

Returns the value of attribute endpoint.



907
908
909
# File 'lib/models/porcelain.rb', line 907

def endpoint
  @endpoint
end

#healthyObject

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



899
900
901
# File 'lib/models/porcelain.rb', line 899

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



895
896
897
# File 'lib/models/porcelain.rb', line 895

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



897
898
899
# File 'lib/models/porcelain.rb', line 897

def name
  @name
end

#port_overrideObject

Returns the value of attribute port_override.



909
910
911
# File 'lib/models/porcelain.rb', line 909

def port_override
  @port_override
end

#regionObject

Returns the value of attribute region.



905
906
907
# File 'lib/models/porcelain.rb', line 905

def region
  @region
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



903
904
905
# File 'lib/models/porcelain.rb', line 903

def secret_access_key
  @secret_access_key
end

Instance Method Details

#to_json(options = {}) ⇒ Object



947
948
949
950
951
952
953
# File 'lib/models/porcelain.rb', line 947

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