use of com.azure.resourcemanager.storage.models.Reason in project azure-maven-plugins by microsoft.
the class AzureStorageAccount method checkNameAvailability.
public CheckNameAvailabilityResultEntity checkNameAvailability(String subscriptionId, String name) {
StorageManager manager = StorageManagerFactory.create(subscriptionId);
CheckNameAvailabilityResult result = manager.storageAccounts().checkNameAvailability(name);
return new CheckNameAvailabilityResultEntity(result.isAvailable(), Optional.ofNullable(result.reason()).map(Reason::toString).orElse(null), result.message());
}
Aggregations