Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,383 @@
{
"swagger": "2.0",
"info": {
"version": "2022-06-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": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default": {
"get": {
"tags": [
"PriceSheet"
],
"operationId": "PriceSheet_Get",
"description": "List the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-examples": {
"PriceSheet": {
"$ref": "./examples/PriceSheet.json"
}
},
"parameters": [
{
"name": "$expand",
"description": "May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "$skiptoken",
"description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "$top",
"description": "May be used to limit the number of results to the top N results.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"minimum": 1,
"maximum": 1000
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/PriceSheetResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default": {
"get": {
"tags": [
"PriceSheet"
],
"operationId": "PriceSheet_GetByBillingPeriod",
"description": "Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-examples": {
"PriceSheetForBillingPeriod": {
"$ref": "./examples/PriceSheetForBillingPeriod.json"
},
"PriceSheetExpand": {
"$ref": "./examples/PriceSheetExpand.json"
}
},
"parameters": [
{
"name": "$expand",
"description": "May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "$skiptoken",
"description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "$top",
"description": "May be used to limit the number of results to the top N results.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"minimum": 1,
"maximum": 1000
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/billingPeriodNameParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/PriceSheetResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.Consumption/operations": {
"get": {
"tags": [
"Operations"
],
"operationId": "Operations_List",
"description": "Lists all of the available consumption REST API operations.",
"x-ms-examples": {
"OperationList": {
"$ref": "./examples/OperationList.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"PriceSheetResult": {
"description": "An pricesheet resource.",
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/Resource"
}
],
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PriceSheetModel",
"title": "Price sheet properties"
}
}
},
"PriceSheetModel": {
"type": "object",
"description": "price sheet result. It contains the pricesheet associated with billing period",
"properties": {
"pricesheets": {
"description": "Price sheet",
"type": "array",
"readOnly": true,
"items": {
"$ref": "#/definitions/PriceSheetProperties"
},
"x-ms-identifiers": [
"meterId"
]
},
"nextLink": {
"description": "The link (url) to the next page of results.",
"type": "string",
"readOnly": true
},
"download": {
"description": "Pricesheet download details.",
"$ref": "#/definitions/MeterDetails",
"readOnly": true
}
}
},
"DownloadProperties": {
"type": "object",
"description": "The properties of the price sheet download.",
"properties": {
"downloadUrl": {
"description": "The link (url) to download the pricesheet.",
"type": "string",
"format": "uri",
"readOnly": true,
"x-ms-secret": true
},
"validTill": {
"description": "Download link validity.",
"type": "string",
"readOnly": true
}
}
},
"PriceSheetProperties": {
"type": "object",
"description": "The properties of the price sheet.",
"properties": {
"billingPeriodId": {
"description": "The id of the billing period resource that the usage belongs to.",
"type": "string",
"readOnly": true
},
"meterId": {
"description": "The meter id (GUID)",
"type": "string",
"format": "uuid",
"readOnly": true
},
"meterDetails": {
"description": "The details about the meter. By default this is not populated, unless it's specified in $expand.",
"$ref": "#/definitions/MeterDetails",
"readOnly": true
},
"unitOfMeasure": {
"description": "Unit of measure",
"type": "string",
"readOnly": true
},
"includedQuantity": {
"description": "Included quality for an offer",
"type": "number",
"readOnly": true
},
"partNumber": {
"description": "Part Number",
"type": "string",
"readOnly": true
},
"unitPrice": {
"description": "Unit Price",
"type": "number",
"readOnly": true
},
"currencyCode": {
"description": "Currency Code",
"type": "string",
"readOnly": true
},
"offerId": {
"description": "Offer Id",
"type": "string",
"readOnly": true
}
}
},
"MeterDetails": {
"type": "object",
"description": "The properties of the meter detail.",
"properties": {
"meterName": {
"description": "The name of the meter, within the given meter category",
"type": "string",
"readOnly": true
},
"meterCategory": {
"description": "The category of the meter, for example, 'Cloud services', 'Networking', etc..",
"type": "string",
"readOnly": true
},
"meterSubCategory": {
"description": "The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..",
"type": "string",
"readOnly": true
},
"unit": {
"description": "The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.",
"type": "string",
"readOnly": true
},
"meterLocation": {
"description": "The location in which the Azure service is available.",
"type": "string",
"readOnly": true
},
"totalIncludedQuantity": {
"description": "The total included quantity associated with the offer.",
"type": "number",
"readOnly": true
},
"pretaxStandardRate": {
"description": "The pretax listing price.",
"type": "number",
"readOnly": true
},
"serviceName": {
"description": "The name of the service.",
"type": "string",
"readOnly": true
},
"serviceTier": {
"description": "The service tier.",
"type": "string",
"readOnly": true
}
}
}
},
"parameters": {
"billingPeriodNameParameter": {
"pattern": "[0-9]+",
"name": "billingPeriodName",
"in": "path",
"description": "Billing Period Name.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
}
}
Loading