Skip to content

Commit fd03963

Browse files
committed
implementing feedback 6/5
1 parent d7437f9 commit fd03963

File tree

2 files changed

+22
-83
lines changed

2 files changed

+22
-83
lines changed

articles/governance/resource-graph/concepts/arg-get-list-api.md

Lines changed: 19 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ ms.custom: devx-track-csharp
88

99
# Azure Resource Graph (ARG) GET/LIST API
1010

11-
The ARG GET/LIST API significantly reduces READ throttling by serving all incoming GET and LIST calls against the ARG platform with smart routing controls in the control plane. The API aligns with the existing request and response contracts of Azure control plane APIs while addressing throttling issues for customers.
11+
The ARG GET/LIST API is designed to significantly reduce READ throttling by offloading GET and LIST requests to an alternate ARG platform. This is achieved through intelligent control plane routing, which directs requests to the alternate platform when a specific parameter is present. If the parameter is absent, requests are seamlessly routed back to the original Resource Provider, ensuring flexibility.
1212

13-
ARG GET/LIST provides a default quota of 4k per minute, user, and subscription, on a moving window. The API provides a response header “x-ms-user-quota-remaining" indicating remaining quota and "x-ms-user-quota-resets-after" indicating the time for a full quota reset based on which you can understand your quota consumption.
13+
ARG GET/LIST provides a default quota of 4k per minute, user, and subscription, on a moving window. This means that the default quota of 4k per minute allows you to make up to 4,000 requests per minute using these APIs. This quota is enforced per user per subscription. This means:
14+
- If User A is accessing Subscription X, they get up to 4,000 requests per minute.
15+
- If User A accesses Subscription Y, that’s a separate quota.
16+
- If User B accesses Subscription X, that’s also a separate quota.
17+
The API provides a response header “x-ms-user-quota-remaining" indicating remaining quota and "x-ms-user-quota-resets-after" indicating the time for a full quota reset based on which you can understand your quota consumption.
1418

1519
> [!NOTE]
1620
> Keep in mind that the Azure Resource Manager quota applies to these calls. Read about the [Azure Resource Manager limits](../../../azure-resource-manager/management/request-limits-and-throttling.md#azure-resource-graph-throttling), which are the new limits that ARM follows for Azure Public cloud. 
1721
1822
## Using the ARG GET/LIST API
1923

20-
To use the ARG GET/LIST API, first identify whether or not your scenario matches the conditions mentioned in the guidance for throttled requests. You can then append the flag `&useResourceGraph=true` to your applicable GET/LIST API calls, and the request will be routed to the ARG backend for response.
24+
To use the [ARG GET/LIST API](guidance-for-throttled-requests.md#still-being-throttled), first identify whether or not your scenario matches the conditions mentioned in the guidance for throttled requests. You can then append the flag `&useResourceGraph=true` to your applicable GET/LIST API calls, which will route the request to this ARG backend for response.
2125

2226
Contact the ARG product group by sending an email to Azure Resource Graph team sharing a brief overview of your scenario and the ARG team will reach out to you with next steps. Callers must also design appropriate retry logic and implement fallback mechanisms to ensure smooth and reliable experience. This opt-in model was deliberately chosen to allow the Azure Resource Graph team to better understand customer usage patterns and make improvements as needed.
2327

@@ -85,21 +89,6 @@ For this specific example, use the following requests to get a virtual machine w
8589
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines/{vm}?api-version=2024-07-01&$expand=instanceView&useResourceGraph=true
8690
```
8791

88-
#### ARG Query
89-
90-
```sql
91-
Resources
92-
93-
| where type =~ 'microsoft.compute/virtualmachines'
94-
| where id = ~ '/subscriptions/{subscriptionId}<br>/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines/{vm}'
95-
```
96-
97-
#### CRP Request
98-
99-
```api
100-
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines/{vm}?api-version=2024-07-01&$expand=instanceView
101-
```
102-
10392
### List VMs under ResourceGroup
10493

10594
For this specific example, use the following requests to retrieve the list of virtual machines under the resource group.
@@ -110,22 +99,6 @@ For this specific example, use the following requests to retrieve the list of vi
11099
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines?api-version=2024-07-01&$expand=instanceView&useResourceGraph=true
111100
```
112101

113-
#### ARG Query
114-
115-
```sxl
116-
Resources
117-
118-
| where resourceGroup =~ ‘{resourceGroup}’
119-
120-
| where type =~ 'microsoft.compute/virtualmachines'
121-
```
122-
123-
### CRP Request
124-
125-
```api
126-
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines?api-version=2024-07-01
127-
```
128-
129102
### List VMSS VM (Uniform) with InstanceView
130103

131104
#### ARG GET/LIST Request
@@ -134,20 +107,6 @@ HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGro
134107
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachinescalesets/{vmss}/virtualmachines?api-version=2024-07-01&$expand=instanceView&useResourceGraph=true
135108
```
136109

137-
#### ARG Query
138-
139-
```sql
140-
ComputeResources
141-
142-
| where type =~ 'microsoft.compute/virtualmachinescalesets/virtualmachines'
143-
144-
| where id startswith ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachinescalesets/{vmss}’
145-
```
146-
147-
### CRP Request
148-
149-
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachinescalesets/{vmss}/virtualmachines?api-version=2024-07-01&$expand=instanceView
150-
151110
## List VMSS VM (Flex) with InstanceView
152111

153112
For this specific example, use the following requests to retrieve the list of VMSS VM with InstanceView.
@@ -158,22 +117,6 @@ For this specific example, use the following requests to retrieve the list of VM
158117
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines?api-version=2024-07-01&$filter='virtualMachineScaleSet/id' eq '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachinescalesets/{vmss}'&$expand=instanceView&useResourceGraph=true
159118
```
160119

161-
### ARG Query
162-
163-
```sql
164-
Resources
165-
166-
| where type =~ ‘microsoft.compute/virtualmachines’
167-
168-
| where properties.virtualMachineScaleSet.id =~‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachinescalesets/{vmss}’
169-
```
170-
171-
### CRP Request
172-
173-
```api
174-
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines?api-version=2024-07-01&$expand=instanceView&$filter=’virtualMachineScaleSet/id’ eq ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachinescalesets/{vmss}’
175-
```
176-
177120
### List storage accounts in subscription
178121

179122
For this specific example, use the following requests to retrieve the list of storage accounts in the subscription.
@@ -184,14 +127,6 @@ For this specific example, use the following requests to retrieve the list of st
184127
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.storage/storageAccounts?api-version=2024-01-01&useResourceGraph=true
185128
```
186129

187-
#### ARG Query
188-
189-
```sql
190-
Resources
191-
192-
| where type =~ ‘microsoft.storage/storageAccounts’
193-
```
194-
195130
#### SRP request
196131

197132
```api
@@ -201,16 +136,22 @@ HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGro
201136
## Known Limitations
202137

203138
1. **VMSS VM health status** is not currently supported. If you require this data, you can share your scenario and propose the feature addition on our [feedback forums](https://feedback.azure.com/d365community/forum/675ae472-f324-ec11-b6e6-000d3a4f0da0).
204-
2. **Supported resources** - The ARG GET/LIST API supports all resource types as part of the `resources` and `computeresources` table. If you require a resource type which is not part of these tables, you can share your scenario and propose the feature addition on our [feedback forums](https://feedback.azure.com/d365community/forum/675ae472-f324-ec11-b6e6-000d3a4f0da0).
205-
3. **Single API version support** - ARG GET/LIST today only supports a single API version for each resource type, which is generally the latest non-preview version of the type that exists in the Azure REST API spec. The ARG GET/LIST functionality returns the `apiVersion` field in the resource payload of the response which indicates the version of the resource type that was used when retrieving the resource details. Callers can apply this field to understand the API version to use, if its relevant for their scenario.
206-
4. **Client support** - Azure REST API: Supported | Azure SDK: Supported [sample .NET code](#sample-sdk-code)| PowerShell: Currently not supported | Azure CLI: Currently not supported | Azure portal: Currently not supported
207-
5. **Client deserialization concerns**
139+
2. **VM and VMSS VM extensions** - The running states of VM and VMSS VM extensions is not supported. If you require this data, you can share your scenario and propose the feature addition on our [feedback forums](https://feedback.azure.com/d365community/forum/675ae472-f324-ec11-b6e6-000d3a4f0da0).
140+
3. **Supported resources** - The ARG GET/LIST API supports all resource types as part of the `resources` and `computeresources` table. If you require a resource type which is not part of these tables, you can share your scenario and propose the feature addition on our [feedback forums](https://feedback.azure.com/d365community/forum/675ae472-f324-ec11-b6e6-000d3a4f0da0).
141+
4. **Single API version support** - ARG GET/LIST today only supports a single API version for each resource type, which is generally the latest non-preview version of the type that exists in the Azure REST API spec. The ARG GET/LIST functionality returns the `apiVersion` field in the resource payload of the response which indicates the version of the resource type that was used when retrieving the resource details. Callers can apply this field to understand the API version to use, if its relevant for their scenario.
142+
5. **Client support**
143+
- Azure REST API: Supported
144+
- Azure SDK: Supported [sample .NET code](#sample-sdk-code)
145+
- PowerShell: Currently not supported
146+
- Azure CLI: Currently not supported
147+
- Azure portal: Currently not supported
148+
6. **Client deserialization concerns**
208149
- If a client uses REST API to issue GET calls, there should generally be no concerns regarding deserialization due to API version differences.
209150
- If a client uses Azure SDK to issue GET calls, due to relaxed deserialization setting across all languages, the deserialization issue shouldn't be a concern, unless there are contract breaking changes among different versions for the target resource type.
210-
6. **Unprocessable resource request**
151+
7. **Unprocessable resource request**
211152
- There are rare scenarios where ARG GET/LIST isn't able to index a resource correctly, other than the existence of the resource. To not sacrifice data quality, ARG GET/LIST refuses serving GET calls for these resources and returns an error code of HTTP 422.
212153
- Clients of ARG GET/LIST should treat HTTP 422 as a permanent error. Clients should retry by falling back to the resource provider (by removing `useResourceGraph=true` flag). Since the error is applicable specifically to ARG GET/LIST, fallback to resource providers should result in an E2E success.
213-
7. **Supported consistency level**
154+
8. **Supported consistency level**
214155
- When using ARG GET or LIST, the data you receive reflects recent changes with a slight delay—typically just a few seconds—rather than real-time updates. This is known as 'bounded staleness' and ensures fast, scalable queries while still providing a consistent and up-to-date view of your Azure resources. Unlike direct calls to Resource Providers, which guarantee real-time accuracy (strong consistency), ARG is optimized for performance with predictable, near-real-time data.
215156
- In resource Point Get responses, ARG GET/LIST provides a response header x-ms-arg-snapshot-timestamp that indicates the timestamp when the returned resource snapshot was indexed. The value of the header is UTC time in ISO8601 format. (An example, "x-ms-arg-snapshot-timestamp" : "2023-01-20T18:55:59.5610084Z").
216157

@@ -245,8 +186,6 @@ ArmClient defaultClient = new ArmClient(new DefaultAzureCredential(), null, new
245186

246187
Then use this policy to add query parameters for every request through the client:
247188

248-
internal class ARG GET/LISTHttpPipelinePolicy : HttpPipelineSynchronousPolicy
249-
250189
```bicep
251190
internal class ArgGetListHttpPipelinePolicy : HttpPipelineSynchronousPolicy
252191

articles/governance/resource-graph/concepts/guidance-for-throttled-requests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ You should consider the ARG GET/LIST API if your service falls into one (or many
239239
- Facing throttling.
240240
- Competing for throttling quota with other customers.
241241
- Your service may be or is prone to issuing a large burst of concurrent GET requests within a short period of time.
242-
- Your service requires high availability and faster performance for GET requests for single.
243-
- Resource management or enumeration of a list of resources within a certain scope.
242+
- Your service requires high availability and faster performance for GET requests, for single resource management or enumeration of a list of resources within a certain scope.
243+
- You require full instanceView of VMs and VMSS VMs in Uniform as well as Flex orchestration mode. (Note: ARG GET/LIST API doesn't support VM and VMSS VM Health Status and extension running status in the instanceView. )
244244

245-
If the resource you’re interested in, is in the resources table or `computeresources` table, *and* it falls in one of the above categories, then use the [ARG GET/LIST API](./arg-get-list-api.md)
245+
If the resource you’re interested in, is in the `resources` table or `computeresources` table, *and* it falls in one of the above categories, then use the [ARG GET/LIST API](./arg-get-list-api.md)
246246

247247
## Still being throttled?
248248

0 commit comments

Comments
 (0)