Skip to content

Commit a613ce4

Browse files
archerzzazure-sdkm-nash
authored
feat(mgmt): add Resource suffix (Azure#27588)
* feat(mgmt): add `Resource` suffix * update remaining track2 SDKs - appconfiguration - azurestackhci * update `cdn` track2 mgmt sdk * update track2 mgmt sdk - communication - compute - connectedvmwarevshpere - cosmosdb: disable autoscaling operation tests - desktopvirtualiation - deviceupdate * update resource manager * update based on updated resource manager * update based on the latest resource manager * regen based on latest autorest.csharp * Update AutoRest C# version to 3.0.0-beta.20220322.2 * adopt latest autorest changes * bump autorest to `20220322.4` * regen after merges * regen after merges * update api * update snippets * update core tests * more snippets and storage dataplane tests Co-authored-by: azure-sdk <azuresdk@microsoft.com> Co-authored-by: m-nash <prognash@gmail.com>
1 parent 5da60b9 commit a613ce4

File tree

2,190 files changed

+224425
-224399
lines changed

Some content is hidden

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

2,190 files changed

+224425
-224399
lines changed

common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ protected void CleanupResourceGroups()
125125
{
126126
try
127127
{
128-
_cleanupClient.GetManagementGroup(new ResourceIdentifier(mgmtGroupId)).Delete(_waitForCleanup);
128+
_cleanupClient.GetManagementGroupResource(new ResourceIdentifier(mgmtGroupId)).Delete(_waitForCleanup);
129129
}
130130
catch (RequestFailedException e) when (e.Status == 404 || e.Status == 403)
131131
{
@@ -218,7 +218,7 @@ public void OneTimeCleanupResourceGroups()
218218
});
219219
Parallel.ForEach(OneTimeManagementGroupCleanupPolicy.ManagementGroupsCreated, mgmtGroupId =>
220220
{
221-
_cleanupClient.GetManagementGroup(new ResourceIdentifier(mgmtGroupId)).Delete(_waitForCleanup);
221+
_cleanupClient.GetManagementGroupResource(new ResourceIdentifier(mgmtGroupId)).Delete(_waitForCleanup);
222222
});
223223
}
224224

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
All should have PrivateAssets="All" set so they don't become package dependencies
153153
-->
154154
<ItemGroup>
155-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20220321.5" PrivateAssets="All" />
155+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20220322.2" PrivateAssets="All" />
156156
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20220111.2" PrivateAssets="All" />
157157
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
158158
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />

sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/api/Azure.ResourceManager.AppConfiguration.netstandard2.0.cs

Lines changed: 69 additions & 69 deletions
Large diffs are not rendered by default.

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ When you first create your ARM client, choose the subscription you're going to w
2020

2121
```C# Snippet:Readme_DefaultSubscription
2222
ArmClient armClient = new ArmClient(new DefaultAzureCredential());
23-
Subscription subscription = armClient.GetDefaultSubscriptionAsync().Result;
23+
SubscriptionResource subscription = armClient.GetDefaultSubscriptionAsync().Result;
2424
```
2525

2626
This is a scoped operations object, and any operations you perform will be done under that subscription. From this object, you have access to all children via Collection objects. Or you can access individual children by ID.
@@ -30,7 +30,7 @@ ResourceGroupCollection rgCollection = subscription.GetResourceGroups();
3030
// With the Collection, we can create a new resource group with an specific name
3131
string rgName = "myRgName";
3232
AzureLocation location = AzureLocation.WestUS2;
33-
ResourceGroup resourceGroup = (await rgCollection.CreateOrUpdateAsync(WaitUntil.Completed, rgName, new ResourceGroupData(location))).Value;
33+
ResourceGroupResource resourceGroup = (await rgCollection.CreateOrUpdateAsync(WaitUntil.Completed, rgName, new ResourceGroupData(location))).Value;
3434
```
3535

3636
Now that we have the resource group created, we can manage the ConfigurationStore inside this resource group.
@@ -43,15 +43,15 @@ ConfigurationStoreData configurationStoreData = new ConfigurationStoreData("west
4343
{
4444
PublicNetworkAccess = PublicNetworkAccess.Disabled
4545
};
46-
ConfigurationStore configurationStore = (await resourceGroup.GetConfigurationStores().CreateOrUpdateAsync(WaitUntil.Completed, configurationStoreName, configurationStoreData)).Value;
46+
ConfigurationStoreResource configurationStore = (await resourceGroup.GetConfigurationStores().CreateOrUpdateAsync(WaitUntil.Completed, configurationStoreName, configurationStoreData)).Value;
4747
```
4848

4949
***List all configurationStores***
5050

5151
```C# Snippet:Managing_ConfigurationStores_ListAllConfigurationStores
52-
AsyncPageable<ConfigurationStore> configurationStores = resourceGroup.GetConfigurationStores().GetAllAsync();
52+
AsyncPageable<ConfigurationStoreResource> configurationStores = resourceGroup.GetConfigurationStores().GetAllAsync();
5353

54-
await foreach (ConfigurationStore item in configurationStores)
54+
await foreach (ConfigurationStoreResource item in configurationStores)
5555
{
5656
Console.WriteLine(item.Data.Name);
5757
}
@@ -60,7 +60,7 @@ await foreach (ConfigurationStore item in configurationStores)
6060
***Get a configurationStore***
6161

6262
```C# Snippet:Managing_ConfigurationStores_GetAConfigurationStore
63-
ConfigurationStore configurationStore = await resourceGroup.GetConfigurationStores().GetAsync("myApp");
63+
ConfigurationStoreResource configurationStore = await resourceGroup.GetConfigurationStores().GetAsync("myApp");
6464
Console.WriteLine(configurationStore.Data.Name);
6565
```
6666

@@ -69,15 +69,15 @@ Console.WriteLine(configurationStore.Data.Name);
6969
```C# Snippet:Managing_ConfigurationStores_GetAConfigurationStoreIfExists
7070
ConfigurationStoreCollection configurationStoreCollection = resourceGroup.GetConfigurationStores();
7171

72-
ConfigurationStore configurationStore = await configurationStoreCollection.GetIfExistsAsync("foo");
72+
ConfigurationStoreResource configurationStore = await configurationStoreCollection.GetIfExistsAsync("foo");
7373
if (configurationStore != null)
7474
{
7575
Console.WriteLine(configurationStore.Data.Name);
7676
}
7777

7878
if (await configurationStoreCollection.ExistsAsync("myApp"))
7979
{
80-
Console.WriteLine("ConfigurationStore 'myApp' exists.");
80+
Console.WriteLine("ConfigurationStoreResource 'myApp' exists.");
8181
}
8282
```
8383

@@ -86,6 +86,6 @@ if (await configurationStoreCollection.ExistsAsync("myApp"))
8686
```C# Snippet:Managing_ConfigurationStores_DeleteAConfigurationStore
8787
ConfigurationStoreCollection configurationStoreCollection = resourceGroup.GetConfigurationStores();
8888

89-
ConfigurationStore configStore = await configurationStoreCollection.GetAsync("myApp");
89+
ConfigurationStoreResource configStore = await configurationStoreCollection.GetAsync("myApp");
9090
await configStore.DeleteAsync(WaitUntil.Completed);
9191
```

0 commit comments

Comments
 (0)