Skip to content

Commit 7afbf84

Browse files
committed
Update docs metadata
1 parent 23a99ce commit 7afbf84

File tree

2 files changed

+64
-15
lines changed

2 files changed

+64
-15
lines changed

api/overview/azure/preview/resourcemanager-readme.md

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title:
33
keywords: Azure, dotnet, SDK, API, Azure.ResourceManager, resourcemanager
4-
ms.date: 03/23/2024
4+
ms.date: 06/23/2025
55
ms.topic: reference
66
ms.devlang: dotnet
77
ms.service: resourcemanager
@@ -37,11 +37,11 @@ dotnet add package Azure.ResourceManager
3737
- Set up a way to authenticate to Azure with Azure Identity.
3838

3939
Some options are:
40-
- Through the [Azure CLI sign in](/cli/azure/authenticate-azure-cli).
41-
- Via [Visual Studio](/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#authenticating-via-visual-studio).
42-
- Setting [Environment Variables](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.12.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/AuthUsingEnvironmentVariables.md).
40+
- Through the [Azure CLI sign in](https://learn.microsoft.com/cli/azure/authenticate-azure-cli).
41+
- Via [Visual Studio](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#authenticating-via-visual-studio).
42+
- Setting [Environment Variables](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.14.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/AuthUsingEnvironmentVariables.md).
4343

44-
More information and different authentication approaches using Azure Identity can be found in [this document](/dotnet/api/overview/azure/identity-readme?view=azure-dotnet).
44+
More information and different authentication approaches using Azure Identity can be found in [this document](https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet).
4545

4646
### Authenticate the Client
4747

@@ -54,15 +54,31 @@ using System;
5454
using System.Threading.Tasks;
5555
using Azure.Core;
5656
using Azure.Identity;
57-
using Azure.ResourceManager;
5857
using Azure.ResourceManager.Compute;
5958
using Azure.ResourceManager.Resources;
6059
```
6160
```C# Snippet:Readme_AuthClient
6261
ArmClient client = new ArmClient(new DefaultAzureCredential());
6362
```
6463

65-
More documentation for the `Azure.Identity.DefaultAzureCredential` class can be found in [this document](/dotnet/api/azure.identity.defaultazurecredential).
64+
Note: if you want to authenticate with the azure in China, you can use the following code:
65+
```C# Snippet:Readme_AuthClientChina
66+
// Please replace the following placeholders with your Azure information
67+
string tenantId = "your-tenant-id";
68+
string clientId = "your-client-id";
69+
string clientSecret = "your-client-secret";
70+
string subscriptionId = "your-subscription-id";
71+
//ArmClientOptions to set the Azure China environment
72+
ArmClientOptions armOptions = new ArmClientOptions { Environment = ArmEnvironment.AzureChina };
73+
// AzureAuthorityHosts to set the Azure China environment
74+
Uri authorityHost = AzureAuthorityHosts.AzureChina;
75+
// Create ClientSecretCredential for authentication
76+
TokenCredential credential = new ClientSecretCredential(tenantId, clientId, clientSecret, new TokenCredentialOptions { AuthorityHost = authorityHost });
77+
// Create the Azure Resource Manager client
78+
ArmClient client = new ArmClient(credential, subscriptionId, armOptions);
79+
```
80+
81+
More documentation for the `Azure.Identity.DefaultAzureCredential` class can be found in [this document](https://learn.microsoft.com/dotnet/api/azure.identity.defaultazurecredential).
6682

6783
## Key concepts
6884

@@ -438,7 +454,25 @@ var deleteResult = await resource.DeleteAsync(WaitUntil.Completed);
438454
Console.WriteLine($"Resource deletion response status code: {deleteResult.WaitForCompletionResponse().Status}");
439455
```
440456

441-
For more detailed examples, take a look at [samples](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager_1.12.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/samples) we have available.
457+
### Rehydrate a long-running operation
458+
```C# Snippet:Readme_LRORehydration
459+
ArmClient client = new ArmClient(new DefaultAzureCredential());
460+
SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync();
461+
ResourceGroupCollection resourceGroups = subscription.GetResourceGroups();
462+
var orgData = new ResourceGroupData(AzureLocation.WestUS2);
463+
// We initialize a long-running operation
464+
var rgOp = await resourceGroups.CreateOrUpdateAsync(WaitUntil.Started, "orgName", orgData);
465+
// We get the rehydration token from the operation
466+
var rgOpRehydrationToken = rgOp.GetRehydrationToken();
467+
// We rehydrate the long-running operation with the rehydration token, we can also do this asynchronously
468+
var rehydratedOrgOperation = ArmOperation.Rehydrate<ResourceGroupResource>(client, rgOpRehydrationToken!.Value);
469+
var rehydratedOrgOperationAsync = await ArmOperation.RehydrateAsync<ResourceGroupResource>(client, rgOpRehydrationToken!.Value);
470+
// Now we can operate with the rehydrated operation
471+
var rawResponse = rehydratedOrgOperation.GetRawResponse();
472+
await rehydratedOrgOperation.WaitForCompletionAsync();
473+
```
474+
475+
For more detailed examples, take a look at [samples](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager_1.14.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/samples) we have available.
442476

443477
## Azure Resource Manager Tests
444478

@@ -465,13 +499,13 @@ To run test with code coverage and auto generate an html report with just a sing
465499
## Next steps
466500
### More sample code
467501

468-
- [Managing Resource Groups](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.12.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/Sample2_ManagingResourceGroups.md)
469-
- [Creating a Virtual Network](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.12.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/Sample3_CreatingAVirtualNetwork.md)
470-
- [.NET Management Library Code Samples](/samples/browse/?branch=master&languages=csharp&term=managing%20using%20Azure%20.NET%20SDK)
502+
- [Managing Resource Groups](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.14.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/Sample2_ManagingResourceGroups.md)
503+
- [Creating a Virtual Network](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.14.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/Sample3_CreatingAVirtualNetwork.md)
504+
- [.NET Management Library Code Samples](https://learn.microsoft.com/samples/browse/?branch=master&languages=csharp&term=managing%20using%20Azure%20.NET%20SDK)
471505

472506
### Other Documentation
473507

474-
If you're migrating from the old SDK, check out this [Migration guide](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.12.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/MigrationGuide.md).
508+
If you're migrating from the old SDK, check out this [Migration guide](https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.14.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/MigrationGuide.md).
475509

476510
For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
477511

@@ -496,7 +530,7 @@ more information, see the [Code of Conduct FAQ][coc_faq] or contact
496530
<opencode@microsoft.com> with any other questions or comments.
497531

498532
<!-- LINKS -->
499-
[cg]: https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.12.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
533+
[cg]: https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager_1.14.0-beta.1/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
500534
[coc]: https://opensource.microsoft.com/codeofconduct/
501535
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
502536

metadata/preview/Azure.ResourceManager.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "Azure.ResourceManager",
3-
"Version": "1.12.0-beta.1",
3+
"Version": "1.14.0-beta.1",
44
"DevVersion": null,
55
"DirectoryPath": "sdk/resourcemanager/Azure.ResourceManager",
66
"ServiceDirectory": "resourcemanager",
@@ -10,7 +10,22 @@
1010
"SdkType": "mgmt",
1111
"IsNewSdk": true,
1212
"ArtifactName": "Azure.ResourceManager",
13-
"ReleaseStatus": "2024-03-22",
13+
"ReleaseStatus": "2025-06-23",
14+
"IncludedForValidation": false,
15+
"AdditionalValidationPackages": null,
16+
"ArtifactDetails": {
17+
"safeName": "AzureResourceManager",
18+
"triggeringPaths": [
19+
"/sdk/resourcemanager/ci.mgmt.yml"
20+
],
21+
"name": "Azure.ResourceManager"
22+
},
23+
"CIParameters": {
24+
"BuildSnippets": false,
25+
"AOTTestInputs": [],
26+
"CheckAOTCompat": false,
27+
"CIMatrixConfigs": []
28+
},
1429
"Namespaces": [
1530
"Azure.ResourceManager",
1631
"Azure.ResourceManager.ManagementGroups",

0 commit comments

Comments
 (0)