Skip to content

Commit e833a47

Browse files
saipv32newFredericHeem
authored andcommitted
[Hub Generated] Review request for Microsoft.CostManagement to add version stable/2021-10-01 (Azure#17560)
* Adding RI Async API swagger from 2019-11-01 version * add example files * add definitions * fix lint errors * add missing definition * add missing type * resolve error * removing uber definition * prettier fix * rename operation status type to avoid conflict with RI Async API operation status
1 parent 9627c8e commit e833a47

File tree

4 files changed

+253
-1
lines changed

4 files changed

+253
-1
lines changed

specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.generatedetailedcostreport.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
"TimedOut"
381381
],
382382
"x-ms-enum": {
383-
"name": "OperationStatusType",
383+
"name": "ReportOperationStatusType",
384384
"modelAsString": true
385385
}
386386
}

specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.json

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,135 @@
11091109
}
11101110
}
11111111
},
1112+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport": {
1113+
"post": {
1114+
"tags": [
1115+
"ReservedInstances"
1116+
],
1117+
"operationId": "GenerateReservationDetailsReport_ByBillingAccountId",
1118+
"description": "Generates the reservations details report for provided date range asynchronously based on enrollment id.",
1119+
"externalDocs": {
1120+
"url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/"
1121+
},
1122+
"x-ms-examples": {
1123+
"ReservationDetails": {
1124+
"$ref": "./examples/GenerateReservationDetailsReportByBillingAccount.json"
1125+
}
1126+
},
1127+
"x-ms-long-running-operation": true,
1128+
"x-ms-long-running-operation-options": {
1129+
"final-state-via": "location"
1130+
},
1131+
"parameters": [
1132+
{
1133+
"$ref": "#/parameters/enrollmentIdParameter"
1134+
},
1135+
{
1136+
"$ref": "#/parameters/startDateParameter"
1137+
},
1138+
{
1139+
"$ref": "#/parameters/endDateParameter"
1140+
},
1141+
{
1142+
"$ref": "#/parameters/apiVersionParameter"
1143+
}
1144+
],
1145+
"responses": {
1146+
"200": {
1147+
"description": "Request processing completed.",
1148+
"schema": {
1149+
"$ref": "#/definitions/OperationStatus"
1150+
}
1151+
},
1152+
"202": {
1153+
"description": "Accepted. Request will be processed. Use the location header to check the status.",
1154+
"headers": {
1155+
"Location": {
1156+
"description": "The URL to check the status of the asynchronous operation.",
1157+
"type": "string"
1158+
},
1159+
"Retry-After": {
1160+
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
1161+
"format": "int32",
1162+
"type": "integer"
1163+
}
1164+
}
1165+
},
1166+
"default": {
1167+
"description": "Error response describing why the operation failed.",
1168+
"schema": {
1169+
"$ref": "#/definitions/ErrorResponse"
1170+
}
1171+
}
1172+
}
1173+
}
1174+
},
1175+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport": {
1176+
"post": {
1177+
"tags": [
1178+
"ReservedInstances"
1179+
],
1180+
"operationId": "GenerateReservationDetailsReport_ByBillingProfileId",
1181+
"description": "Generates the reservations details report for provided date range asynchronously by billing profile.",
1182+
"externalDocs": {
1183+
"url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/"
1184+
},
1185+
"x-ms-examples": {
1186+
"ReservationDetails": {
1187+
"$ref": "./examples/GenerateReservationDetailsReportByBillingProfile.json"
1188+
}
1189+
},
1190+
"x-ms-long-running-operation": true,
1191+
"x-ms-long-running-operation-options": {
1192+
"final-state-via": "location"
1193+
},
1194+
"parameters": [
1195+
{
1196+
"$ref": "#/parameters/billingAccountIdParameter"
1197+
},
1198+
{
1199+
"$ref": "#/parameters/billingProfileIdParameter"
1200+
},
1201+
{
1202+
"$ref": "#/parameters/startDateParameter"
1203+
},
1204+
{
1205+
"$ref": "#/parameters/endDateParameter"
1206+
},
1207+
{
1208+
"$ref": "#/parameters/apiVersionParameter"
1209+
}
1210+
],
1211+
"responses": {
1212+
"200": {
1213+
"description": "Request processing completed.",
1214+
"schema": {
1215+
"$ref": "#/definitions/OperationStatus"
1216+
}
1217+
},
1218+
"202": {
1219+
"description": "Accepted. Request will be processed. Use the Location header to check the status.",
1220+
"headers": {
1221+
"Location": {
1222+
"description": "The URL to check the status of the asynchronous operation.",
1223+
"type": "string"
1224+
},
1225+
"Retry-After": {
1226+
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
1227+
"format": "int32",
1228+
"type": "integer"
1229+
}
1230+
}
1231+
},
1232+
"default": {
1233+
"description": "Error response describing why the operation failed.",
1234+
"schema": {
1235+
"$ref": "#/definitions/ErrorResponse"
1236+
}
1237+
}
1238+
}
1239+
}
1240+
},
11121241
"/providers/Microsoft.CostManagement/operations": {
11131242
"get": {
11141243
"tags": [
@@ -2400,6 +2529,46 @@
24002529
}
24012530
}
24022531
},
2532+
"OperationStatus": {
2533+
"description": "The status of the long running operation.",
2534+
"type": "object",
2535+
"properties": {
2536+
"status": {
2537+
"description": "The status of the long running operation.",
2538+
"type": "string",
2539+
"enum": [
2540+
"Running",
2541+
"Completed",
2542+
"Failed"
2543+
],
2544+
"x-ms-enum": {
2545+
"name": "OperationStatusType",
2546+
"modelAsString": true
2547+
}
2548+
},
2549+
"properties": {
2550+
"x-ms-client-flatten": true,
2551+
"type": "object",
2552+
"description": "The properties of the resource generated.",
2553+
"$ref": "#/definitions/ReportURL"
2554+
}
2555+
}
2556+
},
2557+
"ReportURL": {
2558+
"description": "The URL to download the generated report.",
2559+
"type": "object",
2560+
"properties": {
2561+
"reportUrl": {
2562+
"description": "The URL to download the generated report.",
2563+
"type": "string"
2564+
},
2565+
"validUntil": {
2566+
"description": "The time at which report URL becomes invalid.",
2567+
"type": "string",
2568+
"format": "date-time"
2569+
}
2570+
}
2571+
},
24032572
"QueryDatasetConfiguration": {
24042573
"description": "The configuration of dataset in the query.",
24052574
"type": "object",
@@ -2608,6 +2777,30 @@
26082777
"type": "string",
26092778
"x-ms-parameter-location": "method"
26102779
},
2780+
"startDateParameter": {
2781+
"name": "startDate",
2782+
"in": "query",
2783+
"description": "Start Date",
2784+
"required": true,
2785+
"type": "string",
2786+
"x-ms-parameter-location": "method"
2787+
},
2788+
"endDateParameter": {
2789+
"name": "endDate",
2790+
"in": "query",
2791+
"description": "End Date",
2792+
"required": true,
2793+
"type": "string",
2794+
"x-ms-parameter-location": "method"
2795+
},
2796+
"enrollmentIdParameter": {
2797+
"name": "billingAccountId",
2798+
"in": "path",
2799+
"description": "Enrollment ID (Legacy BillingAccount ID)",
2800+
"required": true,
2801+
"type": "string",
2802+
"x-ms-parameter-location": "method"
2803+
},
26112804
"billingAccountIdParameter": {
26122805
"name": "billingAccountId",
26132806
"in": "path",
@@ -2616,6 +2809,14 @@
26162809
"type": "string",
26172810
"x-ms-parameter-location": "method"
26182811
},
2812+
"billingProfileIdParameter": {
2813+
"name": "billingProfileId",
2814+
"in": "path",
2815+
"description": "BillingProfile ID",
2816+
"required": true,
2817+
"type": "string",
2818+
"x-ms-parameter-location": "method"
2819+
},
26192820
"managementGroupIdParameter": {
26202821
"name": "managementGroupId",
26212822
"in": "path",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"billingAccountId": "9845612",
4+
"startDate": "2020-01-01",
5+
"endDate": "2020-01-30",
6+
"api-version": "2019-11-01"
7+
},
8+
"responses": {
9+
"202": {
10+
"headers": {
11+
"Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/9845612/providers/Microsoft.CostManagement/reservationDetailsOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2019-11-01",
12+
"Retry-After": "60"
13+
}
14+
},
15+
"200": {
16+
"body": {
17+
"status": "Completed",
18+
"properties": {
19+
"reportUrl": "https://storage.blob.core.windows.net/details/20200911/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ",
20+
"validUntil": "2020-09-12T02:56:55.5021869Z"
21+
}
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"billingAccountId": "00000000-0000-0000-0000-000000000000",
4+
"billingProfileId": "CZSFR-SDFXC-DSDF",
5+
"startDate": "2020-01-01",
6+
"endDate": "2020-01-30",
7+
"api-version": "2019-11-01"
8+
},
9+
"responses": {
10+
"202": {
11+
"headers": {
12+
"Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/CZSFR-SDFXC-DSDF/providers/Microsoft.CostManagement/reservationDetailsOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2019-11-01",
13+
"Retry-After": "60"
14+
}
15+
},
16+
"200": {
17+
"body": {
18+
"status": "Completed",
19+
"properties": {
20+
"reportUrl": "https://storage.blob.core.windows.net/details/20200911/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ",
21+
"validUntil": "2020-09-12T02:56:55.5021869Z"
22+
}
23+
}
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)