You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/governance/resource-graph/concepts/arg-get-list-api.md
+19-80Lines changed: 19 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,20 @@ ms.custom: devx-track-csharp
8
8
9
9
# Azure Resource Graph (ARG) GET/LIST API
10
10
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.
12
12
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.
14
18
15
19
> [!NOTE]
16
20
> 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.
17
21
18
22
## Using the ARG GET/LIST API
19
23
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.
21
25
22
26
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.
23
27
@@ -85,21 +89,6 @@ For this specific example, use the following requests to get a virtual machine w
85
89
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines/{vm}?api-version=2024-07-01&$expand=instanceView&useResourceGraph=true
86
90
```
87
91
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
-
103
92
### List VMs under ResourceGroup
104
93
105
94
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
110
99
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.compute/virtualmachines?api-version=2024-07-01&$expand=instanceView&useResourceGraph=true
111
100
```
112
101
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
-
129
102
### List VMSS VM (Uniform) with InstanceView
130
103
131
104
#### ARG GET/LIST Request
@@ -134,20 +107,6 @@ HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGro
134
107
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
135
108
```
136
109
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
-
151
110
## List VMSS VM (Flex) with InstanceView
152
111
153
112
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
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
-
177
120
### List storage accounts in subscription
178
121
179
122
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
184
127
HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/microsoft.storage/storageAccounts?api-version=2024-01-01&useResourceGraph=true
185
128
```
186
129
187
-
#### ARG Query
188
-
189
-
```sql
190
-
Resources
191
-
192
-
| where type =~ ‘microsoft.storage/storageAccounts’
193
-
```
194
-
195
130
#### SRP request
196
131
197
132
```api
@@ -201,16 +136,22 @@ HTTP GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGro
201
136
## Known Limitations
202
137
203
138
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.
- If a client uses REST API to issue GET calls, there should generally be no concerns regarding deserialization due to API version differences.
209
150
- 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**
211
152
- 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.
212
153
- 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**
214
155
- 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.
215
156
- 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").
216
157
@@ -245,8 +186,6 @@ ArmClient defaultClient = new ArmClient(new DefaultAzureCredential(), null, new
245
186
246
187
Then use this policy to add query parameters for every request through the client:
247
188
248
-
internal class ARG GET/LISTHttpPipelinePolicy : HttpPipelineSynchronousPolicy
249
-
250
189
```bicep
251
190
internal class ArgGetListHttpPipelinePolicy : HttpPipelineSynchronousPolicy
Copy file name to clipboardExpand all lines: articles/governance/resource-graph/concepts/guidance-for-throttled-requests.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,10 +239,10 @@ You should consider the ARG GET/LIST API if your service falls into one (or many
239
239
- Facing throttling.
240
240
- Competing for throttling quota with other customers.
241
241
- 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. )
244
244
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)
0 commit comments