@Override @Deprecated public StorageAccountImpl withSku(SkuName skuName) { return withSku(StorageAccountSkuType.fromSkuName(skuName)); }
@Override @Deprecated public StorageAccountImpl withSku(SkuName skuName) { return withSku(StorageAccountSkuType.fromSkuName(skuName)); }
@Override public StorageAccountSkuType skuType() { // We deprecated the sku() getter. When we remove it we wanted to rename this // 'beta' getter skuType() to sku(). // return StorageAccountSkuType.fromSkuName(this.inner().sku().name()); }
@Override public StorageAccountSkuType skuType() { // We deprecated the sku() getter. When we remove it we wanted to rename this // 'beta' getter skuType() to sku(). // return StorageAccountSkuType.fromSkuName(this.inner().sku().name()); }
@Override public StorageAccountSkuType storageAccountSku() { if (this.resourceType() != null && this.resourceType().equals(StorageResourceType.STORAGE_ACCOUNTS)) { return StorageAccountSkuType.fromSkuName(this.inner.name()); } return null; }
@Override public StorageAccountSkuType storageAccountSku() { if (this.resourceType() != null && this.resourceType().equals(StorageResourceType.STORAGE_ACCOUNTS)) { return StorageAccountSkuType.fromSkuName(this.inner.name()); } return null; }
public static StorageAccount createStorageAccount(String subscriptionId, String name, String region, boolean newResourceGroup, String resourceGroup, Kind kind, AccessTier accessTier, boolean enableEncription, String skuName) throws Exception { AzureManager azureManager = AuthMethodManager.getInstance().getAzureManager(); Azure azure = azureManager.getAzure(subscriptionId); StorageAccount.DefinitionStages.WithGroup newStorageAccountBlank = azure.storageAccounts().define(name).withRegion(region); StorageAccount.DefinitionStages.WithCreate newStorageAccountWithGroup; if (newResourceGroup) { newStorageAccountWithGroup = newStorageAccountBlank.withNewResourceGroup(resourceGroup); } else { newStorageAccountWithGroup = newStorageAccountBlank.withExistingResourceGroup(resourceGroup); } switch (kind) { case STORAGE: newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKind(); break; case STORAGE_V2: newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKindV2(); break; case BLOB_STORAGE: newStorageAccountWithGroup = newStorageAccountWithGroup.withBlobStorageAccountKind().withAccessTier(accessTier); break; default: throw new Exception("Unknown Storage Account Kind:" + kind.toString()); } if (enableEncription) { newStorageAccountWithGroup = newStorageAccountWithGroup.withBlobEncryption(); } return newStorageAccountWithGroup.withSku(StorageAccountSkuType.fromSkuName(SkuName.fromString(skuName))).create(); }