Class: SDM::AmazonES

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

Returns a new instance of AmazonES.



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
# File 'lib/models/porcelain.rb', line 1294

def initialize(
  id: nil,
  name: nil,
  healthy: nil,
  tags: nil,
  secret_store_id: nil,
  region: nil,
  secret_access_key: nil,
  endpoint: nil,
  access_key: nil,
  port_override: 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 region != nil
    @region = region
  end
  if secret_access_key != nil
    @secret_access_key = secret_access_key
  end
  if endpoint != nil
    @endpoint = endpoint
  end
  if access_key != nil
    @access_key = access_key
  end
  if port_override != nil
    @port_override = port_override
  end
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



1290
1291
1292
# File 'lib/models/porcelain.rb', line 1290

def access_key
  @access_key
end

#endpointObject

Returns the value of attribute endpoint.



1288
1289
1290
# File 'lib/models/porcelain.rb', line 1288

def endpoint
  @endpoint
end

#healthyObject

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



1278
1279
1280
# File 'lib/models/porcelain.rb', line 1278

def healthy
  @healthy
end

#idObject

Unique identifier of the Resource.



1274
1275
1276
# File 'lib/models/porcelain.rb', line 1274

def id
  @id
end

#nameObject

Unique human-readable name of the Resource.



1276
1277
1278
# File 'lib/models/porcelain.rb', line 1276

def name
  @name
end

#port_overrideObject

Returns the value of attribute port_override.



1292
1293
1294
# File 'lib/models/porcelain.rb', line 1292

def port_override
  @port_override
end

#regionObject

Returns the value of attribute region.



1284
1285
1286
# File 'lib/models/porcelain.rb', line 1284

def region
  @region
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



1286
1287
1288
# File 'lib/models/porcelain.rb', line 1286

def secret_access_key
  @secret_access_key
end

#secret_store_idObject

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



1282
1283
1284
# File 'lib/models/porcelain.rb', line 1282

def secret_store_id
  @secret_store_id
end

#tagsObject

Tags is a map of key, value pairs.



1280
1281
1282
# File 'lib/models/porcelain.rb', line 1280

def tags
  @tags
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1338
1339
1340
1341
1342
1343
1344
# File 'lib/models/porcelain.rb', line 1338

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