diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json b/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json index 132b13c5efb90..24e51a5b338b5 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-appservice", - "Tag": "java/resourcemanager/azure-resourcemanager-appservice_12f37b1142" + "Tag": "java/resourcemanager/azure-resourcemanager-appservice_6d9bee9aaa" } diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java index faaa068ee396d..d2d36b468595f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java @@ -1838,7 +1838,9 @@ public FluentImplT withoutIpAddressRangeAccess(String ipAddressCidr) { @Override @SuppressWarnings("unchecked") public FluentImplT enablePublicNetworkAccess() { - this.ensureIpSecurityRestrictions(); + if (Objects.isNull(this.siteConfig)) { + this.siteConfig = new SiteConfigResourceInner(); + } this.siteConfig.withPublicNetworkAccess("Enabled"); return (FluentImplT) this; } @@ -1846,7 +1848,9 @@ public FluentImplT enablePublicNetworkAccess() { @Override @SuppressWarnings("unchecked") public FluentImplT disablePublicNetworkAccess() { - this.ensureIpSecurityRestrictions(); + if (Objects.isNull(this.siteConfig)) { + this.siteConfig = new SiteConfigResourceInner(); + } this.siteConfig.withPublicNetworkAccess("Disabled"); return (FluentImplT) this; } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json b/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json index 9cba213624e7e..7ec4d96adc784 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-containerservice", - "Tag": "java/resourcemanager/azure-resourcemanager-containerservice_526a0eef6a" + "Tag": "java/resourcemanager/azure-resourcemanager-containerservice_bb2ea4e1ac" } diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java index 4181ca1b37a13..673716a5d74d8 100644 --- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java @@ -303,7 +303,7 @@ public String agentPoolResourceGroup() { @Override public PublicNetworkAccess publicNetworkAccess() { - return Objects.isNull(this.innerModel().publicNetworkAccess()) ? null : this.innerModel().publicNetworkAccess(); + return this.innerModel().publicNetworkAccess(); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json b/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json index 67ea77cbf30c1..8537a56123aee 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-cosmos", - "Tag": "java/resourcemanager/azure-resourcemanager-cosmos_df14ca8256" + "Tag": "java/resourcemanager/azure-resourcemanager-cosmos_dbcf178bc8" } diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java index 7845c9acef8d9..c58c2cc807dc4 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java @@ -84,7 +84,7 @@ public DatabaseAccountOfferType databaseAccountOfferType() { @Override public PublicNetworkAccess publicNetworkAccess() { - return Objects.isNull(this.innerModel().publicNetworkAccess()) ? null : this.innerModel().publicNetworkAccess(); + return this.innerModel().publicNetworkAccess(); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java index c667550cb225e..2adebade83627 100644 --- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java +++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java @@ -37,9 +37,9 @@ public interface CosmosDBAccount DatabaseAccountOfferType databaseAccountOfferType(); /** - * Whether the cosmos db can be accessed from public network. + * Whether the CosmosD account can be accessed from public network. * - * @return whether the cosmos db can be accessed from public network. + * @return whether the CosmosD account can be accessed from public network. */ PublicNetworkAccess publicNetworkAccess(); @@ -405,10 +405,10 @@ PrivateEndpointConnection.DefinitionStages.Blank defineNewPrivateEnd String name); } - /** The stage of cosmos db definition allowing to configure network access settings. */ + /** The stage of CosmosDB account definition allowing to configure network access settings. */ interface WithPublicNetworkAccess { /** - * Disables public network access for the cosmos db. + * Disables public network access for the CosmosDB account. * * @return the next stage of the definition */ @@ -633,16 +633,16 @@ PrivateEndpointConnection.UpdateDefinitionStages.Blank defineNewP WithOptionals withoutPrivateEndpointConnection(String name); } - /** The stage of cosmos db update allowing to configure network access settings. */ + /** The stage of CosmosDB account update allowing to configure network access settings. */ interface WithPublicNetworkAccess { /** - * Enables public network access for the cosmos db. + * Enables public network access for the CosmosDB account. * * @return the next stage of the update */ Update enablePublicNetworkAccess(); /** - * Disables public network access for the cosmos db. + * Disables public network access for the CosmosDB account. * * @return the next stage of the update */ diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/assets.json b/sdk/resourcemanager/azure-resourcemanager-redis/assets.json index e7383f511e773..fb78b8e4a21aa 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-redis/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-redis", - "Tag": "java/resourcemanager/azure-resourcemanager-redis_40e6247ac9" + "Tag": "java/resourcemanager/azure-resourcemanager-redis_50169e9af1" } diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java index 50995ac48dc08..0705dda664cf7 100644 --- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java @@ -200,7 +200,7 @@ public RedisAccessKeys regenerateKey(RedisKeyType keyType) { @Override public PublicNetworkAccess publicNetworkAccess() { - return Objects.isNull(this.innerModel().publicNetworkAccess()) ? null : this.innerModel().publicNetworkAccess(); + return this.innerModel().publicNetworkAccess(); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/assets.json b/sdk/resourcemanager/azure-resourcemanager-storage/assets.json index 14831773310c2..f11fbbe8e8a3c 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/assets.json +++ b/sdk/resourcemanager/azure-resourcemanager-storage/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/resourcemanager/azure-resourcemanager-storage", - "Tag": "java/resourcemanager/azure-resourcemanager-storage_c87db8bc2f" + "Tag": "java/resourcemanager/azure-resourcemanager-storage_3aaa86972f" } diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java index d915a43d1ab09..526ce0f2a4766 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java @@ -284,7 +284,7 @@ public String userAssignedIdentityIdForCustomerEncryptionKey() { @Override public PublicNetworkAccess publicNetworkAccess() { - return Objects.isNull(this.innerModel().publicNetworkAccess()) ? null : this.innerModel().publicNetworkAccess(); + return this.innerModel().publicNetworkAccess(); } @Override diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java index 9463aaad475b1..ba729c4d2869a 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java @@ -253,9 +253,9 @@ public interface StorageAccount */ String userAssignedIdentityIdForCustomerEncryptionKey(); /** - * Whether the storage can be accessed from public network. + * Whether the storage account can be accessed from public network. * - * @return whether the storage can be accessed from public network. + * @return whether the storage account can be accessed from public network. */ PublicNetworkAccess publicNetworkAccess(); @@ -563,10 +563,10 @@ interface WithBlobAccess { WithCreate disableSharedKeyAccess(); } - /** The stage of storage definition allowing to configure network access settings. */ + /** The stage of storage account definition allowing to configure network access settings. */ interface WithNetworkAccess { /** - * Disables public network access for the storage. + * Disables public network access for the storage account. * * @return the next stage of the definition */ @@ -999,17 +999,17 @@ interface WithBlobAccess { Update disableSharedKeyAccess(); } - /** The stage of storage update allowing to configure network access. */ + /** The stage of storage account update allowing to configure network access. */ interface WithNetworkAccess { /** - * Enables public network access for the storage. + * Enables public network access for the storage account. * * @return the next stage of the update */ Update enablePublicNetworkAccess(); /** - * Disables public network access for the storage. + * Disables public network access for the storage account. * * @return the next stage of the update */ diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java index 12c9e68715842..beef09f1d178f 100644 --- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java +++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java @@ -717,7 +717,7 @@ public void updateIdentityFromNoneToSystemUserAssigned() { } @Test - public void createStorageAccountWithDisabledPublicNetworkAccess() { + public void canCreateStorageAccountWithDisabledPublicNetworkAccess() { resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create(); StorageAccount storageAccount = storageManager .storageAccounts() @@ -731,7 +731,7 @@ public void createStorageAccountWithDisabledPublicNetworkAccess() { } @Test - public void updatePublicNetworkAccess() { + public void canUpdatePublicNetworkAccess() { resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create(); StorageAccount storageAccount = storageManager .storageAccounts()