c# - Get endpoint from CreateDBInstanceResponse class in AWS RDS .NET SDK -


i have following method:

public string add(string tenant, string databasename, string username, string password)         {             using (var client = new amazonrdsclient())             {                 var instance = new createdbinstancerequest();                 instance.dbinstanceidentifier = tenant;                 instance.dbinstanceclass = defaultmysqlsettings.dbinstanceclass;                 instance.allocatedstorage = defaultmysqlsettings.allocatedstorage;                 instance.dbname = databasename;                 instance.engine = defaultmysqlsettings.engine;                 instance.engineversion = defaultmysqlsettings.engineversion;                 instance.masterusername = username;                 instance.masteruserpassword = password;                 instance.licensemodel = defaultmysqlsettings.licensemodel;                 instance.port = defaultmysqlsettings.port;                 instance.autominorversionupgrade = true;                 createdbinstanceresponse response = client.createdbinstance(instance);                  return tenant;             }         } 

how can endpoint "createdbinstanceresponse"?

thanks

you need inspect response of call createdbinstance made.

the createdbinstanceresponse object contains property dbinstance. class contains property endpoint. db cluster's endpoint contained in object.

it may case endpoint not available in response; if so, can use dbclusteridentifier returned property of dbinstance poll describedbclusters until endpoint available.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -