use of com.microsoft.tooling.msservices.serviceexplorer.azure.mysql.MySQLProperty in project azure-tools-for-java by Microsoft.
the class MySQLPropertyView method refreshProperty.
private void refreshProperty(String sid, String resourceGroup, String name) {
final MySQLProperty newProperty = new MySQLProperty();
newProperty.setSubscriptionId(sid);
// find server
try {
newProperty.setServer(Azure.az(AzureMySql.class).subscription(sid).get(resourceGroup, name));
} catch (final Exception ex) {
final String error = "find Azure Database for MySQL server information";
final String action = "confirm your network is available and your server actually exists.";
throw new AzureToolkitRuntimeException(error, action);
}
if (StringUtils.equalsIgnoreCase("READY", newProperty.getServer().entity().getState())) {
// find firewalls
newProperty.setFirewallRules(newProperty.getServer().firewallRules().list());
}
this.property = newProperty;
}
Aggregations