Skip to content

Commit 6afdb92

Browse files
authored
Fix Sku issue in Azure.ResourceManager (Azure#25916)
* add sku for generic resource and fix related RP * fix resource manager tests * update api * update autorest version
1 parent 18e14bb commit 6afdb92

File tree

41 files changed

+239
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+239
-67
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
All should have PrivateAssets="All" set so they don't become package dependencies
147147
-->
148148
<ItemGroup>
149-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211213.3" PrivateAssets="All" />
149+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20211213.5" PrivateAssets="All" />
150150
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210903.4" PrivateAssets="All" />
151151
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
152152
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />

sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/samples/Sample1_ManagingConfigurationStores.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Now that we have the resource group created, we can manage the ConfigurationStor
3838

3939
```C# Snippet:Managing_ConfigurationStores_CreateAConfigurationStore
4040
string configurationStoreName = ("myApp");
41-
ConfigurationStoreData configurationStoreData = new ConfigurationStoreData("westus", new Sku("Standard"))
41+
ConfigurationStoreData configurationStoreData = new ConfigurationStoreData("westus", new Models.Sku("Standard"))
4242
{
4343
PublicNetworkAccess = PublicNetworkAccess.Disabled
4444
};

sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreData.Serialization.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/tests/Samples/Sample1_ManagingConfigurationStores.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using NUnit.Framework;
1313
#endregion Snippet:Manage_ConfigurationStores_Namespaces
1414

15-
namespace Azure.ResourceManager.KeyVault.Tests.Samples
15+
namespace Azure.ResourceManager.AppConfiguration.Tests.Samples
1616
{
1717
public class Sample1_ManagingConfigurationStores
1818
{
@@ -24,7 +24,7 @@ public async Task CreateOrUpdate()
2424
{
2525
#region Snippet:Managing_ConfigurationStores_CreateAConfigurationStore
2626
string configurationStoreName = ("myApp");
27-
ConfigurationStoreData configurationStoreData = new ConfigurationStoreData("westus", new Sku("Standard"))
27+
ConfigurationStoreData configurationStoreData = new ConfigurationStoreData("westus", new Models.Sku("Standard"))
2828
{
2929
PublicNetworkAccess = PublicNetworkAccess.Disabled
3030
};

sdk/cdn/Azure.ResourceManager.Cdn/samples/Sample1_ManagingCdnOriginGroups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Now that we have the resource group created, we can manage the cdn origin group
3737
```C# Snippet:Managing_OriginGroups_CreateAnOriginGroup
3838
// Create a new cdn profile
3939
string profileName = "myProfile";
40-
var input1 = new ProfileData(Location.WestUS, new Sku { Name = SkuName.StandardMicrosoft });
40+
var input1 = new ProfileData(Location.WestUS, new Models.Sku { Name = SkuName.StandardMicrosoft });
4141
ProfileCreateOperation lro1 = await resourceGroup.GetProfiles().CreateOrUpdateAsync(profileName, input1);
4242
Profile profile = lro1.Value;
4343
// Get the cdn endpoint collection from the specific profile and create an endpoint

sdk/cdn/Azure.ResourceManager.Cdn/samples/Sample2_ManagingAfdRules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Now that we have the resource group created, we can manage the azure front door
3737
```C# Snippet:Managing_AfdRules_CreateAnAzureFrontDoorRule
3838
// Create a new azure front door profile
3939
string AfdProfileName = "myAfdProfile";
40-
var input1 = new ProfileData("Global", new Sku { Name = SkuName.StandardAzureFrontDoor });
40+
var input1 = new ProfileData("Global", new Models.Sku { Name = SkuName.StandardAzureFrontDoor });
4141
ProfileCreateOperation lro1 = await resourceGroup.GetProfiles().CreateOrUpdateAsync(AfdProfileName, input1);
4242
Profile AfdProfile = lro1.Value;
4343
// Get the rule set collection from the specific azure front door profile and create a rule set

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyData.Serialization.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/cdn/Azure.ResourceManager.Cdn/tests/Helper/ResourceDataHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ namespace Azure.ResourceManager.Cdn.Tests.Helper
1111
{
1212
public static class ResourceDataHelper
1313
{
14-
public static ProfileData CreateProfileData(SkuName skuName) => new ProfileData(Location.WestUS, new Sku { Name = skuName });
14+
public static ProfileData CreateProfileData(SkuName skuName) => new ProfileData(Location.WestUS, new Models.Sku { Name = skuName });
1515

16-
public static ProfileData CreateAfdProfileData(SkuName skuName) => new ProfileData("Global", new Sku { Name = skuName });
16+
public static ProfileData CreateAfdProfileData(SkuName skuName) => new ProfileData("Global", new Models.Sku { Name = skuName });
1717

1818
public static CdnEndpointData CreateEndpointData() => new CdnEndpointData(Location.WestUS)
1919
{
@@ -143,7 +143,7 @@ public static class ResourceDataHelper
143143
}
144144
};
145145

146-
public static CdnWebApplicationFirewallPolicyData CreateCdnWebApplicationFirewallPolicyData() => new CdnWebApplicationFirewallPolicyData("Global", new Sku
146+
public static CdnWebApplicationFirewallPolicyData CreateCdnWebApplicationFirewallPolicyData() => new CdnWebApplicationFirewallPolicyData("Global", new Models.Sku
147147
{
148148
Name = SkuName.StandardMicrosoft
149149
});

sdk/cdn/Azure.ResourceManager.Cdn/tests/Samples/Sample1_ManagingCdnOriginGroups.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public async Task CreateOriginGroups()
2424
#region Snippet:Managing_OriginGroups_CreateAnOriginGroup
2525
// Create a new cdn profile
2626
string profileName = "myProfile";
27-
var input1 = new ProfileData(Location.WestUS, new Sku { Name = SkuName.StandardMicrosoft });
27+
var input1 = new ProfileData(Location.WestUS, new Models.Sku { Name = SkuName.StandardMicrosoft });
2828
ProfileCreateOperation lro1 = await resourceGroup.GetProfiles().CreateOrUpdateAsync(profileName, input1);
2929
Profile profile = lro1.Value;
3030
// Get the cdn endpoint collection from the specific profile and create an endpoint

0 commit comments

Comments
 (0)