Skip to content

Commit

Permalink
Jatehr/cost management pricesheets (#20958)
Browse files Browse the repository at this point in the history
* Create costmanagement.pricesheets.json

* Create PricesheetDownload.json

* Create PricesheetDownloadByBillingProfile.json

* Create OperationList.json

* Update readme.md

* Update readme.md

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update PricesheetDownload.json

* Update PricesheetDownloadByBillingProfile.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Delete OperationList.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update PricesheetDownload.json

* Update PricesheetDownloadByBillingProfile.json

* Update PricesheetDownload.json

* Update PricesheetDownloadByBillingProfile.json

* Update PricesheetDownloadByBillingProfile.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* resolve Go SDK stuttering issue

* Update costmanagement.pricesheets.json

* Update readme.md

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update PricesheetDownload.json

* Update PricesheetDownloadByBillingProfile.json

* Delete BenefitRecommendationsByRecommendationId.json

* Update costmanagement.benefits.json

* Update costmanagement.pricesheets.json

* Update costmanagement.pricesheets.json

* Update common-types.json

* Update costmanagement.pricesheets.json

* Update costmanagement.generatedetailedcostreport.json

* Update common-types.json

* Update common-types.json

* Update common-types.json

* Update common-types.json

* Update common-types.json

* resolve Go SDK naming collision

Co-authored-by: Chenjie Shi <tadelesh.shi@live.cn>
  • Loading branch information
jayati-tehri and tadelesh authored Nov 1, 2022
1 parent ddafcff commit f4a8283
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,27 @@
}
},
"x-ms-azure-resource": true
},
"DownloadURL": {
"description": "The URL to download the generated report.",
"type": "object",
"properties": {
"expiryTime": {
"description": "The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.",
"type": "string",
"format": "date-time",
"readOnly": true
},
"validTill": {
"description": "The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.",
"type": "string",
"format": "date-time"
},
"downloadUrl": {
"description": "The URL to download the generated report.",
"type": "string"
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,54 +99,6 @@
}
}
},
"/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations/{recommendationId}": {
"get": {
"tags": [
"BenefitRecommendations"
],
"description": "Details of a benefit plan recommendation for what-if analysis.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/CostManagement/"
},
"x-ms-examples": {
"BenefitRecommendationById": {
"$ref": "./examples/BenefitRecommendationsByRecommendationId.json"
}
},
"operationId": "BenefitRecommendation_Get",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/billingScopeBenefitRecommendationParameter"
},
{
"name": "recommendationId",
"in": "path",
"description": "The ID of the recommendation.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-skip-url-encoding": true
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/benefitRecommendationModel"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/benefitUtilizationSummaries": {
"get": {
"tags": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
"properties": {
"x-ms-client-flatten": true,
"description": "The properties of the usage file generated.",
"$ref": "#/definitions/DownloadURL"
"$ref": "common-types.json#/definitions/DownloadURL"
}
}
},
Expand All @@ -319,21 +319,7 @@
"properties": {
"x-ms-client-flatten": true,
"description": "The properties of the resource generated.",
"$ref": "#/definitions/DownloadURL"
}
}
},
"DownloadURL": {
"description": "The URL to download the generated report.",
"properties": {
"downloadUrl": {
"description": "The URL to download the generated report.",
"type": "string"
},
"validTill": {
"description": "The time at which report URL becomes invalid/expires in UTC e.g. 2020-12-08T05:55:59.4394737Z.",
"type": "string",
"format": "date-time"
"$ref": "common-types.json#/definitions/DownloadURL"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"swagger": "2.0",
"info": {
"version": "2022-10-01",
"title": "CostManagementClient"
},
"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/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/providers/Microsoft.CostManagement/pricesheets/default/download": {
"post": {
"tags": [
"PriceSheets"
],
"x-ms-examples": {
"PricesheetDownload": {
"$ref": "./examples/PricesheetDownload.json"
}
},
"operationId": "PriceSheet_Download",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"description": "Gets a URL to download the pricesheet for an invoice. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/billingProfileNameParameter"
},
{
"$ref": "#/parameters/invoiceNameParameter"
}
],
"responses": {
"202": {
"description": "Accepted.",
"headers": {
"Location": {
"description": "GET this URL to retrieve the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "string"
},
"OData-EntityId": {
"description": "The operation entity Id GUID.",
"type": "string"
}
}
},
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "common-types.json#/definitions/DownloadURL"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.CostManagement/pricesheets/default/download": {
"post": {
"tags": [
"PriceSheets"
],
"x-ms-examples": {
"PricesheetDownloadByBillingProfile": {
"$ref": "./examples/PricesheetDownloadByBillingProfile.json"
}
},
"operationId": "PriceSheet_DownloadByBillingProfile",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"description": "Gets a URL to download the current month's pricesheet for a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv file to a Zip file containing multiple csv files, each with max 200k records.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/billingAccountNameParameter"
},
{
"$ref": "#/parameters/billingProfileNameParameter"
}
],
"responses": {
"202": {
"description": "Accepted.",
"headers": {
"Location": {
"description": "GET this URL to retrieve the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "string"
},
"OData-EntityId": {
"description": "The operation entity Id GUID.",
"type": "string"
}
}
},
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "common-types.json#/definitions/DownloadURL"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "common-types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"parameters": {
"billingAccountNameParameter": {
"name": "billingAccountName",
"in": "path",
"description": "The ID that uniquely identifies a billing account.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"pattern": "([A-Za-z0-9]+(-[A-Za-z0-9]+)+):([A-Za-z0-9]+(-[A-Za-z0-9]+)+)_[0-9]{4}-[0-9]{2}-[0-9]{2}"
},
"billingProfileNameParameter": {
"name": "billingProfileName",
"in": "path",
"description": "The ID that uniquely identifies a billing profile.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"pattern": "([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"
},
"invoiceNameParameter": {
"name": "invoiceName",
"in": "path",
"description": "The ID that uniquely identifies an invoice.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"pattern": "[A-Za-z0-9]+"
}
}
}

This file was deleted.

Loading

0 comments on commit f4a8283

Please sign in to comment.