Skip to content

Commit b7b8ece

Browse files
pednekarprajharryli0108
authored andcommitted
New version 2023-05-01 for RP Microsoft.Consumption (Azure#23958)
* Adds base for updating Microsoft.Consumption from version stable/2023-03-01 to version 2023-05-01 Updates readme Updates API version in new specs and examples New version 2023-05-01 for Consumption Avoid breaking change by accepting only subId via filter Changes from https://github.com/Azure/azure-rest-api-specs/pull/23914/files#diff-b9c73fdca8365cb39a74112db329608946bd326cfc04d63b201cec6a83c2250f Code style issues * Correct versions
1 parent c7ed03f commit b7b8ece

File tree

94 files changed

+11935
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+11935
-1
lines changed

specification/consumption/resource-manager/Microsoft.Consumption/stable/2023-05-01/consumption.json

+6,002
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2023-05-01",
5+
"title": "ConsumptionManagementClient",
6+
"description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions."
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow.",
31+
"scopes": {
32+
"user_impersonation": "impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/download": {
38+
"post": {
39+
"tags": [
40+
"PriceSheet"
41+
],
42+
"operationId": "PriceSheet_DownloadByBillingAccountPeriod",
43+
"description": "Generates the pricesheet for the provided billing period asynchronously based on the enrollment id",
44+
"externalDocs": {
45+
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
46+
},
47+
"x-ms-long-running-operation": true,
48+
"x-ms-long-running-operation-options": {
49+
"final-state-via": "location"
50+
},
51+
"x-ms-examples": {
52+
"EAPriceSheetForBillingPeriod": {
53+
"$ref": "./examples/EAPriceSheetForBillingPeriod.json"
54+
}
55+
},
56+
"parameters": [
57+
{
58+
"$ref": "#/parameters/billingAccountIdParameter"
59+
},
60+
{
61+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
62+
},
63+
{
64+
"$ref": "#/parameters/billingPeriodNameParameter"
65+
}
66+
],
67+
"responses": {
68+
"200": {
69+
"description": "Request processing completed.",
70+
"schema": {
71+
"$ref": "#/definitions/OperationStatus"
72+
}
73+
},
74+
"202": {
75+
"description": "Accepted",
76+
"headers": {
77+
"Location": {
78+
"type": "string"
79+
},
80+
"Retry-After": {
81+
"type": "integer",
82+
"format": "int64"
83+
}
84+
}
85+
},
86+
"default": {
87+
"description": "Error response describing why the operation failed.",
88+
"schema": {
89+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
90+
}
91+
}
92+
}
93+
}
94+
}
95+
},
96+
"definitions": {
97+
"OperationStatus": {
98+
"description": "The status of the long running operation.",
99+
"type": "object",
100+
"properties": {
101+
"status": {
102+
"description": "The status of the long running operation.",
103+
"type": "string",
104+
"enum": [
105+
"Running",
106+
"Completed",
107+
"Failed"
108+
],
109+
"x-ms-enum": {
110+
"name": "OperationStatusType",
111+
"modelAsString": true
112+
}
113+
},
114+
"properties": {
115+
"x-ms-client-flatten": true,
116+
"description": "The properties of the resource generated.",
117+
"$ref": "#/definitions/PricesheetDownloadProperties"
118+
}
119+
}
120+
},
121+
"PricesheetDownloadProperties": {
122+
"description": "The properties of the price sheet download.",
123+
"type": "object",
124+
"properties": {
125+
"downloadUrl": {
126+
"description": "The link (url) to download the pricesheet.",
127+
"type": "string",
128+
"readOnly": true
129+
},
130+
"validTill": {
131+
"description": "Download link validity.",
132+
"type": "string",
133+
"format": "date-time",
134+
"readOnly": true
135+
}
136+
}
137+
}
138+
},
139+
"parameters": {
140+
"billingAccountIdParameter": {
141+
"name": "billingAccountId",
142+
"in": "path",
143+
"description": "BillingAccount ID",
144+
"required": true,
145+
"type": "string",
146+
"x-ms-parameter-location": "method"
147+
},
148+
"billingPeriodNameParameter": {
149+
"name": "billingPeriodName",
150+
"in": "path",
151+
"description": "Billing Period Name.",
152+
"required": true,
153+
"type": "string",
154+
"pattern": "^[0-9]*$",
155+
"x-ms-parameter-location": "method"
156+
}
157+
}
158+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-05-01",
4+
"managementGroupId": "managementGroupForTest"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"id": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Consumption/aggregatedcostId1",
10+
"name": "aggregatedcostId1",
11+
"type": "Microsoft.Consumption/aggregatedcost",
12+
"properties": {
13+
"includedSubscriptions": [
14+
"1caaa5a3-2b66-438e-8ab4-bce37d518c5d"
15+
],
16+
"excludedSubscriptions": [],
17+
"usageStart": "2023-03-01T00:00:00.0000000Z",
18+
"usageEnd": "2023-05-01T00:00:00.0000000Z",
19+
"azureCharges": 250.9876,
20+
"marketplaceCharges": 150.786,
21+
"chargesBilledSeparately": 120.345,
22+
"currency": "USD",
23+
"children": [
24+
{
25+
"id": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Consumption/aggregatedcostId2",
26+
"name": "aggregatedcostId2",
27+
"type": "Microsoft.Consumption/aggregatedcost",
28+
"properties": {
29+
"includedSubscriptions": [
30+
"c349567d-c83a-48c9-ab0e-578c69dc97a4"
31+
],
32+
"excludedSubscriptions": [],
33+
"usageStart": "2023-03-01T00:00:00.0000000Z",
34+
"usageEnd": "2023-05-01T00:00:00.0000000Z",
35+
"azureCharges": 150.0,
36+
"marketplaceCharges": 50.786,
37+
"chargesBilledSeparately": 30.345,
38+
"currency": "USD",
39+
"children": []
40+
}
41+
}
42+
]
43+
}
44+
}
45+
}
46+
}
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-05-01",
4+
"managementGroupId": "managementGroupForTest",
5+
"$filter": "usageStart ge '2018-08-15' and properties/usageStart le '2018-08-31'"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Consumption/aggregatedcostId1",
11+
"name": "aggregatedcostId1",
12+
"type": "Microsoft.Consumption/aggregatedcost",
13+
"properties": {
14+
"includedSubscriptions": [
15+
"1caaa5a3-2b66-438e-8ab4-bce37d518c5d"
16+
],
17+
"excludedSubscriptions": [],
18+
"usageStart": "2018-08-15T00:00:00.0000000Z",
19+
"usageEnd": "2018-08-31T00:00:00.0000000Z",
20+
"azureCharges": 150.9876,
21+
"marketplaceCharges": 80.786,
22+
"chargesBilledSeparately": 90.345,
23+
"currency": "USD",
24+
"children": [
25+
{
26+
"id": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Consumption/aggregatedcostId2",
27+
"name": "aggregatedcostId2",
28+
"type": "Microsoft.Consumption/aggregatedcost",
29+
"properties": {
30+
"includedSubscriptions": [
31+
"c349567d-c83a-48c9-ab0e-578c69dc97a4"
32+
],
33+
"excludedSubscriptions": [],
34+
"usageStart": "2018-08-15T00:00:00.0000000Z",
35+
"usageEnd": "2018-08-31T00:00:00.0000000Z",
36+
"azureCharges": 50.0,
37+
"marketplaceCharges": 10.786,
38+
"chargesBilledSeparately": 30.345,
39+
"currency": "USD",
40+
"children": []
41+
}
42+
}
43+
]
44+
}
45+
}
46+
}
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-05-01",
4+
"managementGroupId": "managementGroupForTest",
5+
"billingPeriodName": "201807"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "/providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Consumption/aggregatedcostId1",
11+
"name": "aggregatedcostId1",
12+
"type": "Microsoft.Consumption/aggregatedcost",
13+
"properties": {
14+
"usageStart": "2018-07-01T00:00:00.0000000Z",
15+
"usageEnd": "2018-07-31T00:00:00.0000000Z",
16+
"azureCharges": 250.9876,
17+
"marketplaceCharges": 150.786,
18+
"chargesBilledSeparately": 120.345,
19+
"currency": "USD",
20+
"children": [
21+
{
22+
"id": "/providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Consumption/aggregatedcostId2",
23+
"name": "aggregatedcostId2",
24+
"type": "Microsoft.Consumption/aggregatedcost",
25+
"properties": {
26+
"usageStart": "2018-07-01T00:00:00.0000000Z",
27+
"usageEnd": "2018-07-31T00:00:00.0000000Z",
28+
"azureCharges": 150.0,
29+
"marketplaceCharges": 50.786,
30+
"chargesBilledSeparately": 30.345,
31+
"currency": "USD",
32+
"children": []
33+
}
34+
}
35+
]
36+
}
37+
}
38+
}
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-05-01",
4+
"billingAccountId": "123456"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1",
10+
"name": "balanceId1",
11+
"type": "Microsoft.Consumption/balances",
12+
"properties": {
13+
"currency": "USD ",
14+
"beginningBalance": 3396469.19,
15+
"endingBalance": 2922371.02,
16+
"newPurchases": 0,
17+
"adjustments": 0,
18+
"utilized": 474098.17,
19+
"serviceOverage": 0,
20+
"chargesBilledSeparately": 0,
21+
"totalOverage": 0,
22+
"totalUsage": 474098.17,
23+
"azureMarketplaceServiceCharges": 609.82,
24+
"billingFrequency": "Month",
25+
"priceHidden": false,
26+
"overageRefund": 2012.61,
27+
"newPurchasesDetails": [
28+
{
29+
"name": "Promo Purchase",
30+
"value": 1
31+
}
32+
],
33+
"adjustmentDetails": [
34+
{
35+
"name": "Promo Credit",
36+
"value": 1.1
37+
},
38+
{
39+
"name": "SIE Credit",
40+
"value": 1.0
41+
}
42+
]
43+
}
44+
}
45+
}
46+
}
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"parameters": {
3+
"api-version": "2023-05-01",
4+
"billingAccountId": "123456",
5+
"billingPeriodName": "201702"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1",
11+
"name": "balanceId1",
12+
"type": "Microsoft.Consumption/balances",
13+
"properties": {
14+
"currency": "USD ",
15+
"beginningBalance": 3396469.19,
16+
"endingBalance": 2922371.02,
17+
"newPurchases": 0,
18+
"adjustments": 0,
19+
"utilized": 474098.17,
20+
"serviceOverage": 0,
21+
"chargesBilledSeparately": 0,
22+
"totalOverage": 0,
23+
"totalUsage": 474098.17,
24+
"azureMarketplaceServiceCharges": 609.82,
25+
"billingFrequency": "Month",
26+
"priceHidden": false,
27+
"overageRefund": 2012.61,
28+
"newPurchasesDetails": [
29+
{
30+
"name": "Promo Purchase",
31+
"value": 1
32+
}
33+
],
34+
"adjustmentDetails": [
35+
{
36+
"name": "Promo Credit",
37+
"value": 1.1
38+
},
39+
{
40+
"name": "SIE Credit",
41+
"value": 1.0
42+
}
43+
]
44+
}
45+
}
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)