Tags - Get
Get all available tag keys for the defined scope
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/tags?api-version=2023-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
scope
|
path | True |
string |
The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope.. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. The current version is 2023-03-01. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. The request has succeeded. |
|
204 No Content |
An empty response is sent when there is no information available within the selected scope. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Tags_Get
Sample Request
GET https://management.azure.com/providers/Microsoft.CostManagement/billingAccounts/1234/providers/Microsoft.Consumption/tags?api-version=2023-05-01
Sample Response
{
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1",
"name": "tags1",
"type": "Microsoft.Consumption/tags",
"eTag": "\"1d34d012214157f\"",
"properties": {
"tags": [
{
"key": "Department"
},
{
"key": "CostCenter"
},
{
"key": "Portal"
},
{
"key": "OrgName"
},
{
"key": "Namespace"
},
{
"key": "resourceType"
},
{
"key": "Subsystem"
},
{
"key": "Environment"
},
{
"key": "clusterName"
}
],
"nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/?$expand=properties/tags/value&api-version=2023-05-01&startDate=2020-12-01&endDate=2020-12-31&$top=1000&$skiptoken=AwAAAA%3D%3D",
"previousLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/?$expand=properties/tags/value&api-version=2023-05-01&startDate=2020-12-01&endDate=2020-12-31&$top=1000&$skiptoken=AQAAAA%3D%3D"
}
}
Definitions
Name | Description |
---|---|
Error |
The details of the error. |
Error |
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. Some Error responses:
|
Tag |
The tag resource. |
Tags |
A resource listing all tags. |
ErrorDetails
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
ErrorResponse
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
Some Error responses:
429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.
503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.
Name | Type | Description |
---|---|---|
error |
The details of the error. |
Tag
The tag resource.
Name | Type | Description |
---|---|---|
key |
string |
Tag key. |
value |
string[] |
Tag values. |
TagsResult
A resource listing all tags.
Name | Type | Description |
---|---|---|
eTag |
string |
eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
id |
string |
Resource Id. |
name |
string |
Resource name. |
properties.nextLink |
string |
The link (url) to the next page of results. |
properties.previousLink |
string |
The link (url) to the previous page of results. |
properties.tags |
Tag[] |
A list of Tag. |
type |
string |
Resource type. |