Search in sources :

Example 1 with AppSetting

use of com.microsoft.azure.management.appservice.AppSetting in project azure-sdk-for-java by Azure.

the class Utils method print.

/**
     * Print a web app.
     * @param resource a web app
     */
public static void print(WebAppBase resource) {
    StringBuilder builder = new StringBuilder().append("Web app: ").append(resource.id()).append("Name: ").append(resource.name()).append("\n\tState: ").append(resource.state()).append("\n\tResource group: ").append(resource.resourceGroupName()).append("\n\tRegion: ").append(resource.region()).append("\n\tDefault hostname: ").append(resource.defaultHostName()).append("\n\tApp service plan: ").append(resource.appServicePlanId()).append("\n\tHost name bindings: ");
    for (HostNameBinding binding : resource.getHostNameBindings().values()) {
        builder = builder.append("\n\t\t" + binding.toString());
    }
    builder = builder.append("\n\tSSL bindings: ");
    for (HostNameSslState binding : resource.hostNameSslStates().values()) {
        builder = builder.append("\n\t\t" + binding.name() + ": " + binding.sslState());
        if (binding.sslState() != null && binding.sslState() != SslState.DISABLED) {
            builder = builder.append(" - " + binding.thumbprint());
        }
    }
    builder = builder.append("\n\tApp settings: ");
    for (AppSetting setting : resource.appSettings().values()) {
        builder = builder.append("\n\t\t" + setting.key() + ": " + setting.value() + (setting.sticky() ? " - slot setting" : ""));
    }
    builder = builder.append("\n\tConnection strings: ");
    for (ConnectionString conn : resource.connectionStrings().values()) {
        builder = builder.append("\n\t\t" + conn.name() + ": " + conn.value() + " - " + conn.type() + (conn.sticky() ? " - slot setting" : ""));
    }
    System.out.println(builder.toString());
}
Also used : HostNameSslState(com.microsoft.azure.management.appservice.HostNameSslState) ConnectionString(com.microsoft.azure.management.appservice.ConnectionString) HostNameBinding(com.microsoft.azure.management.appservice.HostNameBinding) AppSetting(com.microsoft.azure.management.appservice.AppSetting)

Aggregations

AppSetting (com.microsoft.azure.management.appservice.AppSetting)1 ConnectionString (com.microsoft.azure.management.appservice.ConnectionString)1 HostNameBinding (com.microsoft.azure.management.appservice.HostNameBinding)1 HostNameSslState (com.microsoft.azure.management.appservice.HostNameSslState)1