forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hub Generated] Review request for Microsoft.Consumption to add versi…
…on stable/2023-03-01 (Azure#23914) * EA Pricesheet download documentation. * Model validation error fix * readme edit to add consumption_pricesheet.json * corrections * Proper braces * corrections * corrections * edits * corrections * edit * Removed unwanted path and example file * Added error response back * Call method correction * validating Linter error - testing * Removed errorResponse to common file * errorResponse * Adding common-types json to readme * ErrorDetail addition * Removed common-types. Edits to correct Linter issues. * removed the reference to old file * CI issues fixed * Corrections based on PR comment * rename * SDK error fix * Delete consumption.json * Revert "SDK error fix" This reverts commit e0d3154. * Suppression for Linter error * supression * supression * supression error * resolve go duplicate schema issue * Changes per - https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fazure-sdk%2Finternal%2F_wiki%2Fwikis%2Finternal.wiki%2F828%2FHow-to-suppress-validation-rules%3Fanchor%3Dnew-guidance-as-of-5%2F15%2F2023&data=05%7C01%7Cpthippeswamy%40microsoft.com%7C1975ac464e674af18df308db672967e8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638217199804383965%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=L6ZelM9GpeDUHthYwX%2Fgb0BCM6aBTNKxMOT548n2rNc%3D&reserved=0 * correction * correcting suppression format * revert suppression --------- Co-authored-by: Chenjie Shi <tadelesh.shi@live.cn>
- Loading branch information
1 parent
9928ed1
commit 740b641
Showing
4 changed files
with
189 additions
and
1 deletion.
There are no files selected for viewing
158 changes: 158 additions & 0 deletions
158
...tion/resource-manager/Microsoft.Consumption/stable/2023-03-01/consumption_pricesheet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2023-03-01", | ||
"title": "ConsumptionManagementClient", | ||
"description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions." | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow.", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/download": { | ||
"post": { | ||
"tags": [ | ||
"PriceSheet" | ||
], | ||
"operationId": "PriceSheet_DownloadByBillingAccountPeriod", | ||
"description": "Generates the pricesheet for the provided billing period asynchronously based on the enrollment id", | ||
"externalDocs": { | ||
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/" | ||
}, | ||
"x-ms-long-running-operation": true, | ||
"x-ms-long-running-operation-options": { | ||
"final-state-via": "location" | ||
}, | ||
"x-ms-examples": { | ||
"EAPriceSheetForBillingPeriod": { | ||
"$ref": "./examples/EAPriceSheetForBillingPeriod.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/billingAccountIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/billingPeriodNameParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Request processing completed.", | ||
"schema": { | ||
"$ref": "#/definitions/OperationStatus" | ||
} | ||
}, | ||
"202": { | ||
"description": "Accepted", | ||
"headers": { | ||
"Location": { | ||
"type": "string" | ||
}, | ||
"Retry-After": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"OperationStatus": { | ||
"description": "The status of the long running operation.", | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"description": "The status of the long running operation.", | ||
"type": "string", | ||
"enum": [ | ||
"Running", | ||
"Completed", | ||
"Failed" | ||
], | ||
"x-ms-enum": { | ||
"name": "OperationStatusType", | ||
"modelAsString": true | ||
} | ||
}, | ||
"properties": { | ||
"x-ms-client-flatten": true, | ||
"description": "The properties of the resource generated.", | ||
"$ref": "#/definitions/PricesheetDownloadProperties" | ||
} | ||
} | ||
}, | ||
"PricesheetDownloadProperties": { | ||
"description": "The properties of the price sheet download.", | ||
"type": "object", | ||
"properties": { | ||
"downloadUrl": { | ||
"description": "The link (url) to download the pricesheet.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"validTill": { | ||
"description": "Download link validity.", | ||
"type": "string", | ||
"format": "date-time", | ||
"readOnly": true | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"billingAccountIdParameter": { | ||
"name": "billingAccountId", | ||
"in": "path", | ||
"description": "BillingAccount ID", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"billingPeriodNameParameter": { | ||
"name": "billingPeriodName", | ||
"in": "path", | ||
"description": "Billing Period Name.", | ||
"required": true, | ||
"type": "string", | ||
"pattern": "^[0-9]*$", | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...anager/Microsoft.Consumption/stable/2023-03-01/examples/EAPriceSheetForBillingPeriod.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-03-01", | ||
"billingAccountId": "0000000", | ||
"billingPeriodName": "202305" | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/0000000/providers/Microsoft.Consumption/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01", | ||
"Retry-After": 10 | ||
} | ||
}, | ||
"200": { | ||
"body": { | ||
"status": "Completed", | ||
"properties": { | ||
"downloadUrl": "https://xxxxxx.blob.core.windows.net/armpricesheetreportdownloadcontainer/20230510/00000000-0000-0000-0000-000000000000", | ||
"validTill": "2023-05-11T05:12:50.4266333Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters