{ "swagger": "2.0", "info": { "version": "2024-08-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_DownloadByInvoice", "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.\n \n You can use the new 2023-09-01 API version for billing periods January 2023 onwards. Azure Reserved Instance (RI) pricing is only available through the new version of the API. \n \n Due to Azure product growth, the Azure price sheet download experience in this preview version will be updated from a single csv/json file to a Zip file containing multiple csv/json files, each with max size of 75MB.", "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": "#/definitions/PricesheetDownloadProperties" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "common-types.json#/definitions/ErrorResponse" } } } } }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download": { "post": { "tags": [ "PriceSheets" ], "x-ms-examples": { "EAPriceSheetForBillingPeriod": { "$ref": "./examples/EAPriceSheetForBillingPeriod.json" } }, "operationId": "PriceSheet_DownloadByBillingAccount", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "description": "Generates the pricesheet for the provided billing period asynchronously based on the Enrollment ID. This is for Enterprise Agreement customers.\n \n **Migrate to version 2024-08-01** \n\n You can use the 2024-08-01 API version with the new URI: \n\n '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.CostManagement/pricesheets/default/download' \n\n With a new schema detailed below, the new version of the price sheet provides additional information and includes prices for Azure Reserved Instances (RI) for the current billing period. We recommend downloading an Azure Price Sheet for when entering a new billing period if you would maintain an ongoing record of past Azure Reserved Instance (RI) pricing.\n\n The EA Azure price sheet is available for billing periods in the past 13 months. To request a price sheet for a billing period older than 13 months, please contact support.\n\n The Azure price sheet download experience has been updated from a single .csv file to a zip file containing multiple .csv files, each with max size of 75MB. The 2023-11-01 version has been upgraded to use http POST method; details can be found below.\n\n All versions of the Microsoft.Consumption Azure Price Sheet - Download by Billing Account (including 2022-06-01, 2021-10-01, 2020-01-01-preview, 2019-10-01, 2019-05-01) are scheduled to be retired on 01 June 2026 and will no longer be supported after this date.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/billingAccountIdParameter" }, { "$ref": "#/parameters/billingPeriodNameParameter" } ], "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" } } }, "200": { "description": "OK. The request has succeeded.", "schema": { "$ref": "#/definitions/OperationStatus" } }, "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/EAPricesheetDownloadProperties" } } }, "EAPricesheetDownloadProperties": { "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 }, "downloadFileProperties": { "description": "The properties in downloaded file", "type": "object", "$ref": "#/definitions/EAPriceSheetProperties" } } }, "PricesheetDownloadProperties": { "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 }, "downloadUrl": { "description": "The URL to download the generated report.", "type": "string" }, "downloadFileProperties": { "description": "The properties in downloaded file", "type": "object", "$ref": "#/definitions/MCAPriceSheetProperties" } } }, "MCAPriceSheetProperties": { "description": "The properties of the price sheet.", "type": "object", "properties": { "billingAccountID": { "description": "Unique identifier for the billing account.", "type": "string", "readOnly": true }, "billingAccountName": { "description": "Name of the billing profile that is set up to receive invoices. The prices in the price sheet are associated with this billing profile.", "type": "string", "readOnly": true }, "billingProfileId": { "description": "Unique identifier for the billing profile.", "type": "string", "readOnly": true }, "billingProfileName": { "description": "Name of the billing profile that is set up to receive invoices. The prices in the price sheet are associated with this billing profile.", "type": "string", "readOnly": true }, "productOrderName": { "description": "Name of the purchased product plan. Indicates if this pricing is standard Azure Plan pricing, Dev/Test pricing etc. \n\n Currently unavailable for Azure 3rd party and ReservedInstance meters.", "type": "string", "readOnly": true }, "serviceFamily": { "description": "Type of Azure service. For example, Compute, Analytics, and Security.", "type": "number", "readOnly": true }, "product": { "description": "Name of the product accruing the charges.", "type": "string", "readOnly": true }, "productId": { "description": "Unique identifier for the product whose meter is consumed.", "type": "string", "readOnly": true }, "skuId": { "description": "Unique identifier of the SKU", "type": "string", "readOnly": true }, "unitOfMeasure": { "description": "How usage is measured for the service", "type": "string", "readOnly": true }, "meterId": { "description": "Unique identifier of the meter ", "type": "string", "readOnly": true }, "meterName": { "description": "Name of the meter. The meter represents the deployable resource of an Azure service.", "type": "string", "readOnly": true }, "meterType": { "description": "Name of the meter type", "type": "string", "readOnly": true }, "meterCategory": { "description": "Name of the classification category for the meter. For example, Cloud services, Networking, etc. ", "type": "string", "readOnly": true }, "meterSubCategory": { "description": "Name of the meter subclassification category.", "type": "string", "readOnly": true }, "meterRegion": { "description": "Name of the Azure region where the meter for the service is available.", "type": "string", "readOnly": true }, "tierMinimumUnits": { "description": "Defines the lower bound of the tier range for which prices are defined. For example, if the range is 0 to 100, tierMinimumUnits would be 0.", "type": "string", "readOnly": true }, "effectiveStartDate": { "description": "Effective start date of the Price Sheet billing period", "type": "string", "format": "date-time", "readOnly": true }, "effectiveEndDate": { "description": "Effective end date of the Price Sheet billing period", "type": "string", "format": "date-time", "readOnly": true }, "unitPrice": { "description": "The per-unit price at the time of billing for a given product or service, inclusive of any negotiated discounts on top of the market price.\n\n For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year commitment including discounts.\n\n Note: The unit price isn't the same as the effective price in usage details downloads when services have differential prices across tiers.\n\n If services have multi-tiered pricing, the effective price is a blended rate across the tiers and doesn't show a tier-specific unit price. The blended price or effective price is the net price for the consumed quantity spanning across the multiple tiers (where each tier has a specific unit price).", "type": "string", "readOnly": true }, "basePrice": { "description": "The unit price at the time the customer signs on or the unit price at the time of service meter GA launch if it is after sign-on.\n\n This is applicable for Enterprise Agreement users", "type": "string", "readOnly": true }, "marketPrice": { "description": "The current list price for a given product or service. This price is without any negotiations and is based on your Microsoft Agreement type.\n\n For PriceType Consumption, market price is reflected as the pay-as-you-go price.\n\n For PriceType Savings Plan, market price reflects the Savings plan benefit on top of pay-as-you-go price for the corresponding commitment term.\n\n For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year commitment.", "type": "string", "readOnly": true }, "currency": { "description": "Currency in which all the prices are reflected.", "type": "string", "readOnly": true }, "billingCurrency": { "description": "Currency in which charges are posted.", "type": "string", "readOnly": true }, "term": { "description": "Term length for Azure Savings Plan or Reservation term – one year or three years (P1Y or P3Y)", "type": "string", "readOnly": true }, "priceType": { "description": "Price type for a product. For example, an Azure resource with a pay-as-you-go rate with priceType as Consumption. Other price types include ReservedInstance and Savings Plan.", "type": "string", "readOnly": true } } }, "EAPriceSheetProperties": { "description": "The properties of the EA price sheet. Properties supported with version 2024-08-01 are as below", "type": "object", "properties": { "enrollmentNumber": { "description": "Unique identifier for the EA billing account.", "type": "string", "readOnly": true }, "serviceFamily": { "description": "Type of Azure service. For example, Compute, Analytics, and Security.", "type": "number", "readOnly": true }, "product": { "description": "Name of the product accruing the charges.", "type": "string", "readOnly": true }, "productId": { "description": "Unique identifier for the product whose meter is consumed.", "type": "string", "readOnly": true }, "skuId": { "description": "Unique identifier of the SKU", "type": "string", "readOnly": true }, "unitOfMeasure": { "description": "How usage is measured for the service. Note: The field “Unit” has been removed with version 2023-11-01 as a duplicate of “UnitofMeasure”, please use the field “UnitOfMeasure”. ", "type": "string", "readOnly": true }, "meterId": { "description": "Unique identifier of the meter ", "type": "string", "readOnly": true }, "meterName": { "description": "Name of the meter. The meter represents the deployable resource of an Azure service.", "type": "string", "readOnly": true }, "meterType": { "description": "Name of the meter type", "type": "string", "readOnly": true }, "offerId": { "description": "Determines the Azure offer associated with this meter. [Learn more about Azure offers] (https://azure.microsoft.com/en-us/support/legal/offer-details/)", "type": "string", "readOnly": true }, "meterCategory": { "description": "Name of the classification category for the meter. For example, Cloud services, Networking, etc. ", "type": "string", "readOnly": true }, "meterSubCategory": { "description": "Name of the meter subclassification category.", "type": "string", "readOnly": true }, "meterRegion": { "description": "Name of the Azure region where the meter for the service is available.", "type": "string", "readOnly": true }, "effectiveStartDate": { "description": "Effective start date of the Price Sheet billing period", "type": "string", "format": "date-time", "readOnly": true }, "effectiveEndDate": { "description": "Effective end date of the Price Sheet billing period", "type": "string", "format": "date-time", "readOnly": true }, "unitPrice": { "description": "The per-unit price at the time of billing for a given product or service, inclusive of any negotiated discounts on top of the market price.\n\n For PriceType ReservedInstance, unit price reflects the total cost of the 1 or 3-year commitment including discounts.\n\n Note: The unit price isn't the same as the effective price in usage details downloads when services have differential prices across tiers.\n\n If services have multi-tiered pricing, the effective price is a blended rate across the tiers and doesn't show a tier-specific unit price. The blended price or effective price is the net price for the consumed quantity spanning across the multiple tiers (where each tier has a specific unit price).", "type": "string", "readOnly": true }, "basePrice": { "description": "The unit price at the time the customer signs on or the unit price at the time of service meter GA launch if it is after sign-on.\n\n This is applicable for Enterprise Agreement users", "type": "string", "readOnly": true }, "marketPrice": { "description": "The current list price for a given product or service. This price is without any negotiations and is based on your Microsoft Agreement type.\n\n For PriceType Consumption, market price is reflected as the pay-as-you-go price.\n\n For PriceType Savings Plan, market price reflects the Savings plan benefit on top of pay-as-you-go price for the corresponding commitment term.\n\n For PriceType ReservedInstance, market price reflects the total price of the 1 or 3-year commitment.\n\n Note: For EA customers with no negotiations, market price may appear rounded to a different decimal precision than unit price.", "type": "string", "readOnly": true }, "includedQuantity": { "description": "Quantities of a specific service to which an EA customer is entitled to consume without incremental charges.", "type": "string", "readOnly": true }, "currencyCode": { "description": "Currency in which the Enterprise Agreement was signed", "type": "string", "readOnly": true }, "term": { "description": "Term length for Azure Savings Plan or Reservation term – one year or three years (P1Y or P3Y)", "type": "string", "readOnly": true }, "priceType": { "description": "Price type for a product. For example, an Azure resource with a pay-as-you-go rate with priceType as Consumption. Other price types include ReservedInstance and Savings Plan.", "type": "string", "readOnly": true }, "partNumber": { "description": "Part number associated with the meter", "type": "string", "readOnly": true } } } }, "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]+" }, "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" } } }