Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@
},
"CustomerDimensionsListWithFilter-Modern": {
"$ref": "./examples/MCACustomerDimensionsListWithFilter.json"
}
},
"ExternalBillingAccountDimensionList": {
"$ref": "./examples/ExternalBillingAccountsDimensions.json"
},
"ExternalSubscriptionDimensionList": {
"$ref": "./examples/ExternalSubscriptionsDimensions.json"
}
},
"parameters": [
{
Expand Down Expand Up @@ -251,7 +257,13 @@
},
"CustomerQueryGrouping-Modern": {
"$ref": "./examples/MCACustomerQueryGrouping.json"
}
},
"ExternalBillingAccountQueryList": {
"$ref": "./examples/ExternalBillingAccountsQuery.json"
},
"ExternalSubscriptionsQuery": {
"$ref": "./examples/ExternalSubscriptionsQuery.json"
}
},
"parameters": [
{
Expand Down Expand Up @@ -1428,7 +1440,7 @@
"in": "path",
"required": true,
"type": "string",
"description": "The scope associated with dimension 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, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.",
"description": "The scope associated with dimension 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, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
},
Expand All @@ -1437,7 +1449,7 @@
"in": "path",
"required": true,
"type": "string",
"description": "The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.",
"description": "The scope associated with query and export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners, 'providers/Microsoft.CostManagement/ExternalSubscriptions/{externalSubscriptionId}' for linked account and 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}' for consolidated account",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
},
Expand All @@ -1446,7 +1458,7 @@
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request. The current version is 2018-05-31."
"description": "Version of the API to be used with the client request. The current version is 2019-10-01."
},
"subscriptionIdParameter": {
"name": "subscriptionId",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"parameters": {
"api-version": "2019-10-01",
"externalBillingAccountId": "100",
"scope": "providers/Microsoft.CostManagement/externalBillingAccounts/100"
},
"responses": {
"200": {
"body": {
"value": [{
"id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceType_2019-12-01_2019-12-31",
"name": "dimensions_ResourceType_2019-12-01_2019-12-31",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [],
"total": 0,
"category": "ResourceType",
"description": "Resource type",
"usageStart": "2019-12-01T00:00:00Z",
"usageEnd": "2019-12-31T00:00:00Z",
"filterEnabled": true,
"groupingEnabled": true
}
},
{
"id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/dimensions_ResourceId_2019-12-01_2019-12-31",
"name": "dimensions_ResourceId_2019-12-01_2019-12-31",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [],
"total": 0,
"category": "ResourceId",
"description": "Resource ID",
"usageStart": "2019-12-01T00:00:00Z",
"usageEnd": "2019-12-31T00:00:00Z",
"filterEnabled": true,
"groupingEnabled": true
}
}]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"parameters": {
"api-version": "2019-10-01",
"externalBillingAccountId": "100",
"scope": "providers/Microsoft.CostManagement/externalBillingAccounts/100",
"parameters": {
"type": "Usage",
"timeframe": "MonthToDate",
"dataset": {
"granularity": "Daily",
"filter": {
"and": [
{
"or": [
{
"dimension": {
"name": "ResourceLocation",
"operator": "In",
"values": [
"East US",
"West Europe"
]
}
},
{
"tag": {
"name": "Environment",
"operator": "In",
"values": [
"UAT",
"Prod"
]
}
}
]
},
{
"dimension": {
"name": "ResourceGroup",
"operator": "In",
"values": [
"API"
]
}
}
]
}
}
}
},
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/externalBillingAccounts/100/query/6dc7b06a-d90a-4df5-b655-ce6cf1c0814d",
"name": "6dc7b06a-d90a-4df5-b655-ce6cf1c0814d",
"type": "Microsoft.CostManagement/query",
"properties": {
"nextLink": null,
"columns": [{
"name": "PreTaxCost",
"type": "Number"
}, {
"name": "ServiceName",
"type": "String"
}, {
"name": "Currency",
"type": "String"
}
],
"rows": [
[0.0, "abc db", "USD"],
[30.2572751438, "abc compute cloud", "USD"],
[0.076757602000000022, "abc file system", "USD"],
[50.430964190400012, "abc elasticache", "USD"]
]}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"api-version": "2019-10-01",
"externalSubscriptionId": "100",
"scope": "providers/Microsoft.CostManagement/externalSubscriptions/123"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceType_2019-12-01_2019-12-31",
"name": "dimensions_ResourceType_2019-12-01_2019-12-31",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [],
"total": 0,
"category": "ResourceType",
"description": "Resource type",
"usageStart": "2019-12-01T00:00:00Z",
"usageEnd": "2019-12-31T00:00:00Z",
"filterEnabled": true,
"groupingEnabled": true
}
},
{
"id": "providers/Microsoft.CostManagement/externalSubscriptions/123/dimensions_ResourceId_2019-12-01_2019-12-31",
"name": "dimensions_ResourceId_2019-12-01_2019-12-31",
"type": "microsoft.consumption/dimensions",
"properties": {
"data": [],
"total": 0,
"category": "ResourceId",
"description": "Resource ID",
"usageStart": "2019-12-01T00:00:00Z",
"usageEnd": "2019-12-31T00:00:00Z",
"filterEnabled": true,
"groupingEnabled": true
}
}]
}
}
}
Comment thread
ArcturusZhang marked this conversation as resolved.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"parameters": {
"api-version": "2019-10-01",
"externalSubscriptionId": "123",
"scope": "providers/Microsoft.CostManagement/externalSubscriptions/123",
"parameters":{
"type": "Usage",
"timeframe": "MonthToDate",
"dataset": {
"granularity": "Daily",
"filter" : {
"and": [
{
"or": [
{
"dimension": {
"name": "ResourceLocation",
"operator": "In",
"values": [
"East US",
"West Europe"
]
}
},
{
"tag": {
"name": "Environment",
"operator": "In",
"values": [
"UAT",
"Prod"
]
}
}
]
},
{
"dimension": {
"name": "ResourceGroup",
"operator": "In",
"values": [
"API"
]
}
}
]
}
}
}
},
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/externalSubscriptions/123/query/d99477af-7510-40ee-aca2-e59bdca0d10d",
"name": "d99477af-7510-40ee-aca2-e59bdca0d10d",
"type": "Microsoft.CostManagement/query",
"properties": {
"nextLink": null,
"columns": [{
"name": "PreTaxCost",
"type": "Number"
}, {
"name": "UsageDate",
"type": "Number"
}, {
"name": "Currency",
"type": "String"
}
],
"rows": []
}
}
}
}
}