swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
  title: ConsumptionManagementClient
  version: 2019-06-01
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/consumption/resource-manager/Microsoft.Consumption/stable/2019-06-01/consumption.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: consumption
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  apiVersionParameter:
    description: Version of the API to be used with the client request. The current version is 2019-06-01.
    in: query
    name: api-version
    required: true
    type: string
  billingAccountIdParameter:
    description: BillingAccount ID
    in: path
    name: billingAccountId
    required: true
    type: string
    x-ms-parameter-location: method
  billingPeriodNameParameter:
    description: Billing Period Name.
    in: path
    name: billingPeriodName
    required: true
    type: string
    x-ms-parameter-location: method
  billingProfileIdParameter:
    description: Azure Billing Profile ID.
    in: path
    name: billingProfileId
    required: true
    type: string
    x-ms-parameter-location: method
  budgetNameParameter:
    description: Budget Name.
    in: path
    name: budgetName
    required: true
    type: string
    x-ms-parameter-location: method
  departmentIdParameter:
    description: Department ID
    in: path
    name: departmentId
    required: true
    type: string
    x-ms-parameter-location: method
  enrollmentAccountIdParameter:
    description: EnrollmentAccount ID
    in: path
    name: enrollmentAccountId
    required: true
    type: string
    x-ms-parameter-location: method
  grainParameter:
    description: Can be daily or monthly
    enum:
      - daily
      - monthly
    in: query
    name: grain
    required: true
    type: string
    x-ms-enum:
      modelAsString: true
      name: datagrain
      values:
        - description: Daily grain of data
          name: DailyGrain
          value: daily
        - description: Monthly grain of data
          name: MonthlyGrain
          value: monthly
    x-ms-parameter-location: method
  invoiceSectionIdParameter:
    description: Azure Invoice Section ID.
    in: path
    name: invoiceSectionId
    required: true
    type: string
    x-ms-parameter-location: method
  managementGroupIdParameter:
    description: Azure Management Group ID.
    in: path
    name: managementGroupId
    required: true
    type: string
    x-ms-parameter-location: method
  metricParameter:
    description: Allows to select different type of cost/usage records.
    enum:
      - actualcost
      - amortizedcost
      - usage
    in: query
    name: metric
    required: false
    type: string
    x-ms-enum:
      modelAsString: true
      name: metrictype
      values:
        - description: Actual cost data.
          name: ActualCostMetricType
          value: actualcost
        - description: Amortized cost data.
          name: AmortizedCostMetricType
          value: amortizedcost
        - description: Usage data.
          name: UsageMetricType
          value: usage
    x-ms-parameter-location: method
  reservationIdParameter:
    description: Id of the reservation
    in: path
    name: reservationId
    required: true
    type: string
    x-ms-parameter-location: method
  reservationOrderIdParameter:
    description: Order Id of the reservation
    in: path
    name: reservationOrderId
    required: true
    type: string
    x-ms-parameter-location: method
  resourceGroupNameParameter:
    description: Azure Resource Group Name.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  scopeBudgetParameter:
    description: The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
    in: path
    name: scope
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  scopeChargesParameter:
    description: The scope associated with usage details operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
    in: path
    name: scope
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  scopeMarketplaceParameter:
    description: The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
    in: path
    name: scope
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  scopeTagsParameter:
    description: The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope..
    in: path
    name: scope
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  scopeUsageDetailsParameter:
    description: The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
    in: path
    name: scope
    required: true
    type: string
    x-ms-parameter-location: method
    x-ms-skip-url-encoding: true
  subscriptionIdParameter:
    description: Azure Subscription ID.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances":
    get:
      description: Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Balances_GetForBillingPeriodByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountIdParameter"
        - $ref: "#/parameters/billingPeriodNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Balance"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Balances
      x-ms-examples:
        Balances:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "123456"
            billingPeriodName: "201702"
          responses:
            "200":
              body:
                id: providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1
                name: balanceId1
                properties:
                  adjustmentDetails:
                    - name: Promo Credit
                      value: 1.1
                    - name: SIE Credit
                      value: 1
                  adjustments: 0
                  azureMarketplaceServiceCharges: 609.82
                  beginningBalance: 3396469.19
                  billingFrequency: Month
                  chargesBilledSeparately: 0
                  currency: "USD  "
                  endingBalance: 2922371.02
                  newPurchases: 0
                  newPurchasesDetails:
                    - name: Promo Purchase
                      value: 1
                  priceHidden: false
                  serviceOverage: 0
                  totalOverage: 0
                  totalUsage: 474098.17
                  utilized: 474098.17
                type: Microsoft.Consumption/balances
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances":
    get:
      description: Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Balances_GetByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountIdParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Balance"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Balances
      x-ms-examples:
        Balances:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "123456"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1
                name: balanceId1
                properties:
                  adjustmentDetails:
                    - name: Promo Credit
                      value: 1.1
                    - name: SIE Credit
                      value: 1
                  adjustments: 0
                  azureMarketplaceServiceCharges: 609.82
                  beginningBalance: 3396469.19
                  billingFrequency: Month
                  chargesBilledSeparately: 0
                  currency: "USD  "
                  endingBalance: 2922371.02
                  newPurchases: 0
                  newPurchasesDetails:
                    - name: Promo Purchase
                      value: 1
                  priceHidden: false
                  serviceOverage: 0
                  totalOverage: 0
                  totalUsage: 474098.17
                  utilized: 474098.17
                type: Microsoft.Consumption/balances
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationDetails":
    get:
      description: Lists the reservations details for provided date range.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationsDetails_ListByBillingAccountId
      parameters:
        - $ref: "#/parameters/billingAccountIdParameter"
        - description: "Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge' "
          in: query
          name: $filter
          required: true
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationDetailsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationDetails:
          parameters:
            $filter: properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-12-05'
            api-version: 2019-06-01
            billingAccountId: "12345"
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationDetails/20171130
                    name: 00000000-0000-0000-0000-000000000000
                    properties:
                      instanceFlexibilityGroup: DSv3 Series
                      instanceFlexibilityRatio: "1"
                      instanceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sqlh1/providers/microsoft.compute/virtualmachines/sqlh1
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 48
                      skuName: Standard_D2s_v3
                      totalReservedQuantity: 0
                      usageDate: 2017-11-30T00:00:00-08:00
                      usedHours: 0.6
                    tags: null
                    type: Microsoft.Consumption/reservationDetails
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationSummaries":
    get:
      description: Lists the reservations summaries for daily or monthly grain.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationsSummaries_ListByBillingAccountId
      parameters:
        - $ref: "#/parameters/billingAccountIdParameter"
        - $ref: "#/parameters/grainParameter"
        - description: Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationSummariesListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationSummariesDailyWithReservationId:
          parameters:
            $filter: properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-11-20'
            api-version: 2019-06-01
            billingAccountId: "12345"
            grain: daily
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20180901
                    name: 00000000-0000-0000-0000-000000000000_20180901
                    properties:
                      avgUtilizationPercentage: 0
                      maxUtilizationPercentage: 0
                      minUtilizationPercentage: 0
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 720
                      skuName: Standard_B1s
                      usageDate: 2018-09-01T00:00:00-07:00
                      usedHours: 0
                    tags: null
                    type: Microsoft.Consumption/reservationSummaries
        ReservationSummariesMonthlyWithReservationId:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "12345"
            grain: monthly
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20180901
                    name: 00000000-0000-0000-0000-000000000000_20180901
                    properties:
                      avgUtilizationPercentage: 0
                      maxUtilizationPercentage: 0
                      minUtilizationPercentage: 0
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 720
                      skuName: Standard_B1s
                      usageDate: 2018-09-01T00:00:00-07:00
                      usedHours: 0
                    tags: null
                    type: Microsoft.Consumption/reservationSummaries
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions":
    get:
      description: List of transactions for reserved instances on billing account scope
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationTransactions_ListByBillingAccountId
      parameters:
        - description: "Filter reservation transactions by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge' "
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountIdParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationTransactionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationTransaction:
          parameters:
            $filter: properties/usageDate ge '2019-09-09' AND properties/usageDate le '2019-09-10'
            api-version: 2019-06-01
            billingAccountId: "123456"
          responses:
            "200":
              body:
                value:
                  - id: /billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919
                    name: "201909091919"
                    properties:
                      accountName: Microsoft Infrastructure
                      accountOwnerEmail: admin@microsoft.com
                      amount: -21
                      armSkuName: Standard_DS1_v2
                      costCenter: ""
                      currency: USD
                      currentEnrollment: "123456"
                      departmentName: Unassigned
                      description: Standard_DS1_v2 westus 1 Year
                      eventDate: 2019-09-09T19:19:04Z
                      eventType: Cancel
                      purchasingEnrollment: "123456"
                      purchasingSubscriptionGuid: 11111111-1111-1111-1111-11111111111
                      purchasingSubscriptionName: Infrastructure Subscription
                      quantity: 1
                      region: westus
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservationOrderName: Transaction-DS1_v2
                      term: P1Y
                    tags: {}
                    type: Microsoft.Consumption/reservationTransactions
                  - id: /billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919
                    name: "201909091919"
                    properties:
                      accountName: Microsoft Infrastructure
                      accountOwnerEmail: admin@microsoft.com
                      amount: 21
                      armSkuName: Standard_DS1_v2
                      costCenter: ""
                      currency: USD
                      currentEnrollment: "123456"
                      departmentName: Unassigned
                      description: Standard_DS1_v2 westus 1 Year
                      eventDate: 2019-09-09T19:19:04Z
                      eventType: Purchase
                      purchasingEnrollment: "123456"
                      purchasingSubscriptionGuid: 11111111-1111-1111-1111-11111111111
                      purchasingSubscriptionName: Infrastructure Subscription
                      quantity: 1
                      region: westus
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservationOrderName: Transaction-DS1_v2
                      term: P1Y
                    tags: {}
                    type: Microsoft.Consumption/reservationTransactions
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/microsoft.consumption/ReservationRecommendations":
    get:
      description: List of recommendations for purchasing reserved instances on billing account scope
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationRecommendations_ListByBillingAccountId
      parameters:
        - description: May be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod.
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountIdParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationRecommendationsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservationRecommendations
      x-ms-examples:
        ReservationRecommendations:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "123456"
          responses:
            "200":
              body:
                nextLink: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2018-03-31&$skiptoken=AQAAAA%3D%3D&
                value:
                  - id: billingAccount/123456/providers/Microsoft.Consumption/reservationRecommendations/00000000-0000-0000-0000-000000000000
                    location: westus
                    name: 00000000-0000-0000-0000-000000000000
                    properties:
                      costWithNoReservedInstances: 12.0785105
                      firstUsageDate: 2019-07-07T00:00:00-07:00
                      instanceFlexibilityGroup: DSv2 Series
                      instanceFlexibilityRatio: 1
                      lookBackPeriod: Last7Days
                      meterId: 00000000-0000-0000-0000-000000000000
                      netSavings: 0.588546019225182
                      normalizedSize: Standard_DS1_v2
                      recommendedQuantity: 1
                      recommendedQuantityNormalized: 1
                      scope: Shared
                      skuProperties:
                        - name: Cores
                          value: "1"
                        - name: Ram
                          value: "1"
                      term: P1Y
                      totalCostWithReservedInstances: 11.4899644807748
                    sku: Standard_DS1_v2
                    type: Microsoft.Consumption/reservationRecommendations
                  - id: billingAccount/123456/providers/Microsoft.Consumption/reservationRecommendations/00000000-0000-0000-0000-000000000000
                    location: westus
                    name: 00000000-0000-0000-0000-000000000000
                    properties:
                      costWithNoReservedInstances: 10.0785105
                      firstUsageDate: 2019-07-07T00:00:00-07:00
                      instanceFlexibilityGroup: DSv2 Series
                      instanceFlexibilityRatio: 1
                      lookBackPeriod: Last7Days
                      meterId: 00000000-0000-0000-0000-000000000000
                      netSavings: 0.68
                      normalizedSize: Standard_DS1
                      recommendedQuantity: 1
                      recommendedQuantityNormalized: 1.2
                      scope: Shared
                      skuProperties:
                        - name: SkuDisplayName
                          value: B
                        - name: CPU
                          value: "1"
                      term: P1Y
                      totalCostWithReservedInstances: 13.48
                    sku: Standard_DS1_v2
                    type: Microsoft.Consumption/reservationRecommendations
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails":
    get:
      description: Lists the reservations details for provided date range.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationsDetails_ListByReservationOrder
      parameters:
        - $ref: "#/parameters/reservationOrderIdParameter"
        - description: "Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge' "
          in: query
          name: $filter
          required: true
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationDetailsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationDetails:
          parameters:
            $filter: properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-12-05'
            api-version: 2019-06-01
            reservationOrderId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationDetails/20171129
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171129
                    properties:
                      instanceFlexibilityGroup: DSv2 Series
                      instanceFlexibilityRatio: "0.25"
                      instanceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/wvn-sql/providers/microsoft.compute/virtualmachines/abc-sql2014sp33
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 24
                      skuName: Standard_D2_v2
                      totalReservedQuantity: 1
                      usageDate: 2017-11-29T00:00:00Z
                      usedHours: 24
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/reservationDetails
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries":
    get:
      description: Lists the reservations summaries for daily or monthly grain.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationsSummaries_ListByReservationOrder
      parameters:
        - $ref: "#/parameters/reservationOrderIdParameter"
        - $ref: "#/parameters/grainParameter"
        - description: Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationSummariesListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationSummariesDaily:
          parameters:
            $filter: properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-11-20'
            api-version: 2019-06-01
            grain: daily
            reservationOrderId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20171001
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171001
                    properties:
                      avgUtilizationPercentage: 0
                      kind: Reservation
                      maxUtilizationPercentage: 0
                      minUtilizationPercentage: 0
                      purchasedQuantity: 0
                      remainingQuantity: 0
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 0
                      skuName: Standard_D8s_v3
                      totalReservedQuantity: 155
                      usageDate: 2017-10-01T00:00:00Z
                      usedHours: 0
                      usedQuantity: 0
                      utilizedPercentage: 0
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/reservationSummaries
        ReservationSummariesMonthly:
          parameters:
            api-version: 2019-06-01
            grain: monthly
            reservationOrderId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20171001
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171001
                    properties:
                      avgUtilizationPercentage: 0
                      kind: Reservation
                      maxUtilizationPercentage: 0
                      minUtilizationPercentage: 0
                      purchasedQuantity: 0
                      remainingQuantity: 0
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 0
                      skuName: Standard_D8s_v3
                      totalReservedQuantity: 155
                      usageDate: 2017-10-01T00:00:00Z
                      usedHours: 0
                      usedQuantity: 0
                      utilizedPercentage: 0
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/reservationSummaries
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails":
    get:
      description: Lists the reservations details for provided date range.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationsDetails_ListByReservationOrderAndReservation
      parameters:
        - $ref: "#/parameters/reservationOrderIdParameter"
        - $ref: "#/parameters/reservationIdParameter"
        - description: "Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge' "
          in: query
          name: $filter
          required: true
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationDetailsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationDetailsWithReservationId:
          parameters:
            $filter: properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-12-05'
            api-version: 2019-06-01
            reservationId: 00000000-0000-0000-0000-000000000000
            reservationOrderId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationDetails/20171129
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171129
                    properties:
                      instanceFlexibilityGroup: D2v2 Series
                      instanceFlexibilityRatio: "1"
                      instanceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/wvn-sql/providers/microsoft.compute/virtualmachines/wvn-sql2014sp33
                      kind: Reservation
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 24
                      skuName: Standard_D2_v2
                      totalReservedQuantity: 1
                      usageDate: 2017-11-29T00:00:00Z
                      usedHours: 24
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/reservationDetails
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries":
    get:
      description: Lists the reservations summaries for daily or monthly grain.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationsSummaries_ListByReservationOrderAndReservation
      parameters:
        - $ref: "#/parameters/reservationOrderIdParameter"
        - $ref: "#/parameters/reservationIdParameter"
        - $ref: "#/parameters/grainParameter"
        - description: Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationSummariesListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservedInstances
      x-ms-examples:
        ReservationSummariesDailyWithReservationId:
          parameters:
            $filter: properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-11-20'
            api-version: 2019-06-01
            grain: daily
            reservationId: 00000000-0000-0000-0000-000000000000
            reservationOrderId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20171001
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171001
                    properties:
                      avgUtilizationPercentage: 0
                      kind: Reservation
                      maxUtilizationPercentage: 0
                      minUtilizationPercentage: 0
                      purchasedQuantity: 0
                      remainingQuantity: 0
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 0
                      skuName: Standard_D8s_v3
                      totalReservedQuantity: 155
                      usageDate: 2017-10-01T00:00:00Z
                      usedHours: 0
                      usedQuantity: 0
                      utilizedPercentage: 0
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/reservationSummaries
        ReservationSummariesMonthlyWithReservationId:
          parameters:
            api-version: 2019-06-01
            grain: monthly
            reservationId: 00000000-0000-0000-0000-000000000000
            reservationOrderId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20171001
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171001
                    properties:
                      avgUtilizationPercentage: 0
                      kind: Reservation
                      maxUtilizationPercentage: 0
                      minUtilizationPercentage: 0
                      purchasedQuantity: 0
                      remainingQuantity: 0
                      reservationId: 00000000-0000-0000-0000-000000000000
                      reservationOrderId: 00000000-0000-0000-0000-000000000000
                      reservedHours: 0
                      skuName: Standard_D8s_v3
                      totalReservedQuantity: 155
                      usageDate: 2017-10-01T00:00:00Z
                      usedHours: 0
                      usedQuantity: 0
                      utilizedPercentage: 0
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/reservationSummaries
      x-ms-pageable:
        nextLinkName: nextLink
  /providers/Microsoft.Consumption/operations:
    get:
      description: Lists all of the available consumption REST API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Operations
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost":
    get:
      description: Provides the aggregate cost of a management group and all child management groups by specified billing period
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: AggregatedCost_GetForBillingPeriodByManagementGroup
      parameters:
        - $ref: "#/parameters/managementGroupIdParameter"
        - $ref: "#/parameters/billingPeriodNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ManagementGroupAggregatedCostResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - AggregatedCost
      x-ms-examples:
        AggregatedCostListForBillingPeriodByManagementGroup:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201807"
            managementGroupId: managementGroupForTest
          responses:
            "200":
              body:
                id: /providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Consumption/aggregatedcostId1
                name: aggregatedcostId1
                properties:
                  azureCharges: 250.9876
                  chargesBilledSeparately: 120.345
                  children:
                    - id: /providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Consumption/aggregatedcostId2
                      name: aggregatedcostId2
                      properties:
                        azureCharges: 150
                        chargesBilledSeparately: 30.345
                        children: []
                        currency: USD
                        marketplaceCharges: 50.786
                        usageEnd: 2018-07-31T00:00:00.0000000Z
                        usageStart: 2018-07-01T00:00:00.0000000Z
                      type: Microsoft.Consumption/aggregatedcost
                  currency: USD
                  marketplaceCharges: 150.786
                  usageEnd: 2018-07-31T00:00:00.0000000Z
                  usageStart: 2018-07-01T00:00:00.0000000Z
                type: Microsoft.Consumption/aggregatedcost
  "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost":
    get:
      description: Provides the aggregate cost of a management group and all child management groups by current billing period.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: AggregatedCost_GetByManagementGroup
      parameters:
        - $ref: "#/parameters/managementGroupIdParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ManagementGroupAggregatedCostResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - AggregatedCost
      x-ms-examples:
        AggregatedCostByManagementGroup:
          parameters:
            api-version: 2019-06-01
            managementGroupId: managementGroupForTest
          responses:
            "200":
              body:
                id: /providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Consumption/aggregatedcostId1
                name: aggregatedcostId1
                properties:
                  azureCharges: 250.9876
                  chargesBilledSeparately: 120.345
                  children:
                    - id: /providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Consumption/aggregatedcostId2
                      name: aggregatedcostId2
                      properties:
                        azureCharges: 150
                        chargesBilledSeparately: 30.345
                        children: []
                        currency: USD
                        excludedSubscriptions: []
                        includedSubscriptions:
                          - c349567d-c83a-48c9-ab0e-578c69dc97a4
                        marketplaceCharges: 50.786
                        usageEnd: 2018-10-31T00:00:00.0000000Z
                        usageStart: 2019-06-01T00:00:00.0000000Z
                      type: Microsoft.Consumption/aggregatedcost
                  currency: USD
                  excludedSubscriptions: []
                  includedSubscriptions:
                    - 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
                  marketplaceCharges: 150.786
                  usageEnd: 2018-10-31T00:00:00.0000000Z
                  usageStart: 2019-06-01T00:00:00.0000000Z
                type: Microsoft.Consumption/aggregatedcost
        AggregatedCostByManagementGroupFilterByDate:
          parameters:
            $filter: usageStart ge '2018-08-15' and properties/usageStart le '2018-08-31'
            api-version: 2019-06-01
            managementGroupId: managementGroupForTest
          responses:
            "200":
              body:
                id: /providers/Microsoft.Management/managementGroups/managementGroupForTest/providers/Microsoft.Consumption/aggregatedcostId1
                name: aggregatedcostId1
                properties:
                  azureCharges: 150.9876
                  chargesBilledSeparately: 90.345
                  children:
                    - id: /providers/Microsoft.Management/managementGroups/managementGroupChildForTest/providers/Microsoft.Consumption/aggregatedcostId2
                      name: aggregatedcostId2
                      properties:
                        azureCharges: 50
                        chargesBilledSeparately: 30.345
                        children: []
                        currency: USD
                        excludedSubscriptions: []
                        includedSubscriptions:
                          - c349567d-c83a-48c9-ab0e-578c69dc97a4
                        marketplaceCharges: 10.786
                        usageEnd: 2018-08-31T00:00:00.0000000Z
                        usageStart: 2018-08-15T00:00:00.0000000Z
                      type: Microsoft.Consumption/aggregatedcost
                  currency: USD
                  excludedSubscriptions: []
                  includedSubscriptions:
                    - 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
                  marketplaceCharges: 80.786
                  usageEnd: 2018-08-31T00:00:00.0000000Z
                  usageStart: 2018-08-15T00:00:00.0000000Z
                type: Microsoft.Consumption/aggregatedcost
  "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default":
    get:
      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/
      operationId: PriceSheet_GetByBillingPeriod
      parameters:
        - 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
          name: $expand
          required: false
          type: string
        - 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
          name: $skiptoken
          required: false
          type: string
        - description: May be used to limit the number of results to the top N results.
          in: query
          maximum: 1000
          minimum: 1
          name: $top
          required: false
          type: integer
        - $ref: "#/parameters/subscriptionIdParameter"
        - $ref: "#/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: "#/definitions/ErrorResponse"
      tags:
        - PriceSheet
      x-ms-examples:
        PriceSheetExpand:
          parameters:
            $expand: meterDetails
            api-version: 2019-06-01
            billingPeriodName: "201801"
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default
                name: default
                properties:
                  nextLink: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D&$expand=properties/pricesheets/meterDetails
                  pricesheets:
                    - billingPeriodId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702
                      currencyCode: EUR
                      includedQuantity: 100
                      meterDetails:
                        meterCategory: Networking
                        meterLocation: Zone 2
                        meterName: Data Transfer Out (GB)
                        pretaxStandardRate: 0.138
                        totalIncludedQuantity: 0
                        unit: GB
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: OfferId 1
                      partNumber: XX-11110
                      unitOfMeasure: 100 Hours
                      unitPrice: 0.00328
                type: Microsoft.Consumption/pricesheets
        PriceSheetForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201801"
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default
                name: default
                properties:
                  nextLink: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31
                  pricesheets:
                    - billingPeriodId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702
                      currencyCode: EUR
                      includedQuantity: 100
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: OfferId 1
                      partNumber: XX-11110
                      unitOfMeasure: 100 Hours
                      unitPrice: 0.00328
                type: Microsoft.Consumption/pricesheets
  "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts":
    get:
      description: Lists the forecast charges by subscriptionId.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Forecasts_List
      parameters:
        - description: May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ForecastsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Forecasts
      x-ms-examples:
        ForecastsList:
          parameters:
            api-version: 2019-06-01
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/providers/Microsoft.Consumption/forecasts/forecastId1
                    name: forecastId1
                    properties:
                      charge: 752
                      chargeType: Actual
                      confidenceLevels: null
                      currency: USD
                      grain: Daily
                      usageDate: 2018-04-01
                    type: Microsoft.Consumption/forecasts
                  - id: /subscriptions/subid/providers/Microsoft.Consumption/forecasts/forecastId2
                    name: forecastId2
                    properties:
                      charge: 753.809074
                      chargeType: Forecast
                      confidenceLevels:
                        - bound: Upper
                          percentage: 95
                          value: 1165.951737
                        - bound: Lower
                          percentage: 95
                          value: 340.753404
                      currency: USD
                      grain: Daily
                      usageDate: 2018-04-02
                    type: Microsoft.Consumption/forecasts
        ForecastsListFilterByDates:
          parameters:
            $filter: usagedate ge '2018-04-01' AND usagedate le '2018-04-02'
            api-version: 2019-06-01
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/providers/Microsoft.Consumption/forecasts/forecastId1
                    name: forecastId1
                    properties:
                      charge: 752
                      chargeType: Actual
                      confidenceLevels: null
                      currency: USD
                      grain: Daily
                      usageDate: 2018-04-01
                    type: Microsoft.Consumption/forecasts
                  - id: /subscriptions/subid/providers/Microsoft.Consumption/forecasts/forecastId2
                    name: forecastId2
                    properties:
                      charge: 753.809074
                      chargeType: Forecast
                      confidenceLevels:
                        - bound: Upper
                          percentage: 95
                          value: 1165.951737
                        - bound: Lower
                          percentage: 95
                          value: 340.753404
                      currency: USD
                      grain: Daily
                      usageDate: 2018-04-02
                    type: Microsoft.Consumption/forecasts
        ForecastsListFilterByGrain:
          parameters:
            $filter: Grain eq 'Monthly'
            api-version: 2019-06-01
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/providers/Microsoft.Consumption/forecasts/forecastId1
                    name: forecastId1
                    properties:
                      charge: 752
                      chargeType: Actual
                      confidenceLevels: null
                      currency: USD
                      grain: Monthly
                      usageDate: 2018-04-01
                    type: Microsoft.Consumption/forecasts
                  - id: /subscriptions/subid/providers/Microsoft.Consumption/forecasts/forecastId2
                    name: forecastId2
                    properties:
                      charge: 753.809074
                      chargeType: Forecast
                      confidenceLevels:
                        - bound: Upper
                          percentage: 95
                          value: 1165.951737
                        - bound: Lower
                          percentage: 95
                          value: 340.753404
                      currency: USD
                      grain: Monthly
                      usageDate: 2018-05-01
                    type: Microsoft.Consumption/forecasts
      x-ms-odata: "#/definitions/Forecast"
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default":
    get:
      description: Gets the price sheet for a scope by subscriptionId. 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/
      operationId: PriceSheet_Get
      parameters:
        - 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
          name: $expand
          required: false
          type: string
        - 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
          name: $skiptoken
          required: false
          type: string
        - description: May be used to limit the number of results to the top N results.
          in: query
          maximum: 1000
          minimum: 1
          name: $top
          required: false
          type: integer
        - $ref: "#/parameters/subscriptionIdParameter"
        - $ref: "#/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: "#/definitions/ErrorResponse"
      tags:
        - PriceSheet
      x-ms-examples:
        PriceSheet:
          parameters:
            api-version: 2019-06-01
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default
                name: default
                properties:
                  nextLink: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D
                  pricesheets:
                    - billingPeriodId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702
                      currencyCode: EUR
                      includedQuantity: 100
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: OfferId 1
                      partNumber: XX-11110
                      unitOfMeasure: 100 Hours
                      unitPrice: 0.00328
                type: Microsoft.Consumption/pricesheets
  "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations":
    get:
      description: List of recommendations for purchasing reserved instances.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: ReservationRecommendations_List
      parameters:
        - description: May be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod.
          in: query
          name: $filter
          required: false
          type: string
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ReservationRecommendationsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - ReservationRecommendations
      x-ms-examples:
        ReservationRecommendations:
          parameters:
            api-version: 2019-06-01
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                nextLink: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2018-03-31&$skiptoken=AQAAAA%3D%3D&
                value:
                  - id: subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations1
                    location: northeurope
                    name: reservationRecommendations1
                    properties:
                      costWithNoReservedInstances: 0
                      firstUsageDate: 2018-03-06T00:00:00Z
                      lookBackPeriod: Last7Days
                      meterId: 00000000-0000-0000-0000-000000000000
                      netSavings: 4.634521202630137
                      recommendedQuantity: 1
                      scope: Single
                      term: P1Y
                      totalCostWithReservedInstances: 0
                    sku: Standard_DS1_v2
                    type: Microsoft.Consumption/reservationRecommendations
                  - id: subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations2
                    location: northeurope
                    name: reservationRecommendations2
                    properties:
                      costWithNoReservedInstances: 0
                      firstUsageDate: 2018-03-06T00:00:00Z
                      lookBackPeriod: Last7Days
                      meterId: 00000000-0000-0000-0000-000000000000
                      netSavings: 7.289315723178081
                      recommendedQuantity: 1
                      scope: Single
                      term: P3Y
                      totalCostWithReservedInstances: 0
                    sku: Standard_DS1_v2
                    type: Microsoft.Consumption/reservationRecommendations
        ReservationRecommendationsFilterByScopeLookBackPeriod:
          parameters:
            $filter: properties/scope eq 'Single' AND properties/lookBackPeriod eq 'Last7Days'
            api-version: 2019-06-01
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                nextLink: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2018-03-31&$filter=properties/scope+eq+'Single'+AND+properties/lookBackPeriod+eq+'Last7Days'&$skiptoken=AQAAAA%3D%3D&
                value:
                  - id: subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations1
                    location: northeurope
                    name: reservationRecommendations1
                    properties:
                      costWithNoReservedInstances: 0
                      firstUsageDate: 2018-03-06T00:00:00Z
                      lookBackPeriod: Last7Days
                      meterId: 00000000-0000-0000-0000-000000000000
                      netSavings: 4.634521202630137
                      recommendedQuantity: 1
                      scope: Single
                      skuProperties:
                        - name: Cores
                          value: "1"
                        - name: Ram
                          value: "1"
                      term: P1Y
                      totalCostWithReservedInstances: 0
                    sku: Standard_DS1_v2
                    type: Microsoft.Consumption/reservationRecommendations
                  - id: subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations/reservationRecommendations2
                    location: northeurope
                    name: reservationRecommendations2
                    properties:
                      costWithNoReservedInstances: 0
                      firstUsageDate: 2018-03-06T00:00:00Z
                      lookBackPeriod: Last7Days
                      meterId: 00000000-0000-0000-0000-000000000000
                      netSavings: 7.289315723178081
                      recommendedQuantity: 1
                      scope: Single
                      skuProperties:
                        - name: SkuDisplayName
                          value: B
                        - name: CPU
                          value: "1"
                      term: P3Y
                      totalCostWithReservedInstances: 0
                    sku: Standard_DS1_v2
                    type: Microsoft.Consumption/reservationRecommendations
      x-ms-pageable:
        nextLinkName: nextLink
  "/{scope}/providers/Microsoft.Consumption/budgets":
    get:
      description: Lists all budgets for the defined scope.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Budgets_List
      parameters:
        - $ref: "#/parameters/scopeBudgetParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BudgetsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Budgets
      x-ms-examples:
        BudgetsList:
          parameters:
            api-version: 2019-06-01
            resourceGroupName: MYDEVTESTRG
            scope: subscriptions/00000000-0000-0000-0000-000000000000
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - eTag: '"1d34d012214157f"'
                    id: subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget
                    name: TestBudget
                    properties:
                      amount: 100.65
                      category: Cost
                      currentSpend:
                        amount: 80.89
                        unit: USD
                      filters:
                        meters:
                          - 00000000-0000-0000-0000-000000000000
                        resourceGroups:
                          - MYDEVTESTRG
                        resources:
                          - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2
                          - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
                        tags:
                          category:
                            - Dev
                            - Prod
                          department:
                            - engineering
                            - sales
                      notifications:
                        Actual_GreaterThanOrEqualTo_90_Percent:
                          contactEmails:
                            - johndoe@contoso.com
                            - janesmith@contoso.com
                          contactGroups:
                            - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
                          contactRoles:
                            - Contributor
                            - Reader
                          enabled: true
                          operator: GreaterThanOrEqualTo
                          threshold: 90
                        Actual_GreaterThan_80_Percent:
                          contactEmails:
                            - johndoe@contoso.com
                            - janesmith@contoso.com
                          contactRoles:
                            - Contributor
                            - Reader
                          enabled: true
                          operator: GreaterThan
                          threshold: 80
                      timeGrain: Monthly
                      timePeriod:
                        endDate: 2018-10-31T00:00:00Z
                        startDate: 2017-10-01T00:00:00Z
                    type: Microsoft.Consumption/budgets
                  - eTag: '"1d34d012214157f"'
                    id: subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget
                    name: TestBudget
                    properties:
                      amount: 600.65
                      category: Cost
                      currentSpend:
                        amount: 120.89
                        unit: USD
                      filters:
                        meters:
                          - 00000000-0000-0000-0000-000000000000
                        resourceGroups:
                          - MYDEVTESTRG
                        resources:
                          - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2
                          - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
                        tags:
                          category:
                            - Dev
                            - Prod
                          department:
                            - engineering
                            - sales
                      notifications:
                        Actual_GreaterThanOrEqualTo_60_Percent:
                          contactEmails:
                            - johndoe@contoso.com
                            - janesmith@contoso.com
                          contactGroups:
                            - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
                          contactRoles:
                            - Contributor
                            - Reader
                          enabled: true
                          operator: GreaterThanOrEqualTo
                          threshold: 60
                        Actual_GreaterThan_40_Percent:
                          contactEmails:
                            - johndoe@contoso.com
                            - janesmith@contoso.com
                          contactRoles:
                            - Contributor
                            - Reader
                          enabled: true
                          operator: GreaterThan
                          threshold: 40
                      timeGrain: Monthly
                      timePeriod:
                        endDate: 2018-10-31T00:00:00Z
                        startDate: 2017-10-01T00:00:00Z
                    type: Microsoft.Consumption/budgets
      x-ms-pageable:
        nextLinkName: nextLink
  "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}":
    delete:
      description: The operation to delete a budget.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Budgets_Delete
      parameters:
        - $ref: "#/parameters/scopeBudgetParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/budgetNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Budgets
      x-ms-examples:
        DeleteBudget:
          parameters:
            api-version: 2019-06-01
            budgetName: TestBudget
            resourceGroupName: MYDEVTESTRG
            scope: subscriptions/00000000-0000-0000-0000-000000000000
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200": {}
    get:
      description: Gets the budget for the scope by budget name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Budgets_Get
      parameters:
        - $ref: "#/parameters/scopeBudgetParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/budgetNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Budget"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Budgets
      x-ms-examples:
        Budget:
          parameters:
            api-version: 2019-06-01
            budgetName: TestBudget
            resourceGroupName: MYDEVTESTRG
            scope: subscriptions/00000000-0000-0000-0000-000000000000
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                eTag: '"1d34d012214157f"'
                id: subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget
                name: TestBudget
                properties:
                  amount: 100.65
                  category: Cost
                  currentSpend:
                    amount: 80.89
                    unit: USD
                  filters:
                    meters:
                      - 00000000-0000-0000-0000-000000000000
                    resourceGroups:
                      - MPDEVTESTRG
                    resources:
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
                    tags:
                      category:
                        - Dev
                        - Prod
                      department:
                        - engineering
                        - sales
                  notifications:
                    Actual_GreaterThan_80_Percent:
                      contactEmails:
                        - johndoe@contoso.com
                        - janesmith@contoso.com
                      contactGroups:
                        - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
                      contactRoles:
                        - Contributor
                        - Reader
                      enabled: true
                      operator: GreaterThan
                      threshold: 80
                  timeGrain: Monthly
                  timePeriod:
                    endDate: 2018-10-31T00:00:00Z
                    startDate: 2017-10-01T00:00:00Z
                type: Microsoft.Consumption/budgets
    put:
      description: The operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Budgets_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/scopeBudgetParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/budgetNameParameter"
        - description: Parameters supplied to the Create Budget operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Budget"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Budget"
        "201":
          description: Created.
          schema:
            $ref: "#/definitions/Budget"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Budgets
      x-ms-examples:
        CreateOrUpdateBudget:
          parameters:
            api-version: 2019-06-01
            budgetName: TestBudget
            parameters:
              eTag: '"1d34d016a593709"'
              properties:
                amount: 100.65
                category: Cost
                filters:
                  meters:
                    - 00000000-0000-0000-0000-000000000000
                  resourceGroups:
                    - MYDEVTESTRG
                  resources:
                    - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2
                    - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
                  tags:
                    category:
                      - Dev
                      - Prod
                    department:
                      - engineering
                      - sales
                notifications:
                  Actual_GreaterThan_80_Percent:
                    contactEmails:
                      - johndoe@contoso.com
                      - janesmith@contoso.com
                    contactGroups:
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
                    contactRoles:
                      - Contributor
                      - Reader
                    enabled: true
                    operator: GreaterThan
                    threshold: 80
                timeGrain: Monthly
                timePeriod:
                  endDate: 2018-10-31T00:00:00Z
                  startDate: 2017-10-01T00:00:00Z
            resourceGroupName: MYDEVTESTRG
            scope: subscriptions/00000000-0000-0000-0000-000000000000
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                eTag: '"1d34d012214157f"'
                id: subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget
                name: TestBudget
                properties:
                  amount: 100.65
                  category: Cost
                  currentSpend:
                    amount: 80.89
                    unit: USD
                  filters:
                    meters:
                      - 00000000-0000-0000-0000-000000000000
                    resourceGroups:
                      - MPDEVTESTRG
                    resources:
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
                    tags:
                      category:
                        - Dev
                        - Prod
                      department:
                        - engineering
                        - sales
                  notifications:
                    Actual_GreaterThan_80_Percent:
                      contactEmails:
                        - johndoe@contoso.com
                        - janesmith@contoso.com
                      contactGroups:
                        - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
                      contactRoles:
                        - Contributor
                        - Reader
                      enabled: true
                      operator: GreaterThan
                      threshold: 80
                  timeGrain: Monthly
                  timePeriod:
                    endDate: 2018-10-31T00:00:00Z
                    startDate: 2017-10-01T00:00:00Z
                type: Microsoft.Consumption/budgets
            "201":
              body:
                eTag: '"1d34d012214157f"'
                id: subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget
                name: TestBudget
                properties:
                  amount: 100.65
                  category: Cost
                  currentSpend:
                    amount: 80.89
                    unit: USD
                  filters:
                    meters:
                      - 00000000-0000-0000-0000-000000000000
                    resourceGroups:
                      - MPDEVTESTRG
                    resources:
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MYVM2
                      - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
                    tags:
                      category:
                        - Dev
                        - Prod
                      department:
                        - engineering
                        - sales
                  notifications:
                    Actual_GreaterThan_80_Percent:
                      contactEmails:
                        - johndoe@contoso.com
                        - janesmith@contoso.com
                      contactGroups:
                        - /subscriptions/{subscription-id}/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
                      contactRoles:
                        - Contributor
                        - Reader
                      enabled: true
                      operator: GreaterThan
                      threshold: 80
                  timeGrain: Monthly
                  timePeriod:
                    endDate: 2018-10-31T00:00:00Z
                    startDate: 2017-10-01T00:00:00Z
                type: Microsoft.Consumption/budgets
  "/{scope}/providers/Microsoft.Consumption/charges":
    get:
      description: Lists the charges based for the defined scope.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Charges_ListByScope
      parameters:
        - $ref: "#/parameters/scopeChargesParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ChargeSummary"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Charges
      x-ms-examples:
        ChangesForBillingPeriodByDepartment:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "1234"
            billingPeriodName: "201804"
            departmentId: "42425"
            scope: providers/Microsoft.Billing/BillingAccounts/1234
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/1234/departments/42425/providers/Microsoft.Consumption/charges/chargeSummaryId1
                name: chargeSummaryId1
                properties:
                  azureCharges: 5000
                  billingPeriodId: /providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201804
                  chargesBilledSeparately: 60.9
                  currency: USD
                  marketplaceCharges: 100
                  usageEnd: 2018-04-30
                  usageStart: 2018-04-01
                type: Microsoft.Consumption/charges
        ChangesForBillingPeriodByEnrollmentAccount:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "1234"
            billingPeriodName: "201804"
            enrollmentAccountId: "42425"
            scope: providers/Microsoft.Billing/BillingAccounts/1234
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/1234/enrollmentAccounts/42425/providers/Microsoft.Consumption/charges/chargeSummaryId1
                name: chargeSummaryId1
                properties:
                  azureCharges: 5000
                  billingPeriodId: /providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201804
                  chargesBilledSeparately: 60.9
                  currency: USD
                  marketplaceCharges: 100
                  usageEnd: 2018-04-30
                  usageStart: 2018-04-01
                type: Microsoft.Consumption/charges
        ChargesListByDepartment:
          parameters:
            $filter: usageStart eq '2018-04-01' AND usageEnd eq '2018-05-30'
            api-version: 2019-06-01
            billingAccountId: "1234"
            departmentId: "42425"
            scope: providers/Microsoft.Billing/BillingAccounts/1234
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/1234/departments/42425/providers/Microsoft.Consumption/charges/chargeSummaryId1
                name: chargeSummaryId1
                properties:
                  azureCharges: 5000
                  billingPeriodId: /providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201804
                  chargesBilledSeparately: 60.9
                  currency: USD
                  marketplaceCharges: 100
                  usageEnd: 2018-04-30
                  usageStart: 2018-04-01
                type: Microsoft.Consumption/charges
        ChargesListForEnrollmentAccount:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "1234"
            enrollmentAccountId: "42425"
            scope: providers/Microsoft.Billing/BillingAccounts/1234
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/1234/enrollmentAccounts/42425/providers/Microsoft.Consumption/charges/chargeSummaryId1
                name: chargeSummaryId1
                properties:
                  azureCharges: 5000
                  billingPeriodId: /providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201804
                  chargesBilledSeparately: 60.9
                  currency: USD
                  marketplaceCharges: 100
                  usageEnd: 2018-04-30
                  usageStart: 2018-04-01
                type: Microsoft.Consumption/charges
  "/{scope}/providers/Microsoft.Consumption/marketplaces":
    get:
      description: Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Marketplaces_List
      parameters:
        - description: May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
          in: query
          name: $filter
          required: false
          type: string
        - description: May be used to limit the number of results to the most recent N marketplaces.
          in: query
          maximum: 1000
          minimum: 1
          name: $top
          required: false
          type: integer
        - 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
          name: $skiptoken
          required: false
          type: string
        - $ref: "#/parameters/scopeMarketplaceParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/MarketplacesListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Marketplaces
      x-ms-examples:
        BillingAccountMarketplacesList:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "123456"
            scope: providers/Microsoft.Billing/billingAccounts/123456
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplaceId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan1
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        BillingAccountMarketplacesListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "123456"
            billingPeriodName: "201702"
            scope: providers/Microsoft.Billing/billingAccounts/123456
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        DepartmentMarketplacesList:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201702"
            departmentId: "123456"
            scope: providers/Microsoft.Billing/departments/123456
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        DepartmentMarketplacesListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201702"
            departmentId: "123456"
            scope: providers/Microsoft.Billing/departments/123456
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        EnrollmentAccountMarketplacesList:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201702"
            enrollmentAccountId: "123456"
            scope: providers/Microsoft.Billing/enrollmentAccounts/123456
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        EnrollmentAccountMarketplacesListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201702"
            enrollmentAccountId: "123456"
            scope: providers/Microsoft.Billing/enrollmentAccounts/123456
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        ManagementGroupMarketplacesList:
          parameters:
            api-version: 2019-06-01
            managementGroupId: managementGroupForTest
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201810/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201810
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2018-10-13T23:59:59Z
                      usageStart: 2018-10-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
                  - id: /subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/201810/providers/Microsoft.Consumption/marketplaces/marketplaceId2
                    name: marketplacesId2
                    properties:
                      accountName: Account2
                      additionalProperties: additionalProperties
                      billingPeriodId: /subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/201810
                      consumedQuantity: 0.00328
                      costCenter: Center2
                      currency: USD
                      departmentName: Department2
                      instanceId: /subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared2
                      instanceName: shared2
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 11111111-1111-1111-1111-111111111111
                      offerName: offer1
                      orderNumber: 11111111-1111-1111-1111-111111111111
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 11111111-1111-1111-1111-111111111111
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2018-10-13T23:59:59Z
                      usageStart: 2018-10-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        ManagementGroupMarketplacesListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201808"
            managementGroupId: managementGroupForTest
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201808/providers/Microsoft.Consumption/marketplaces/marketplaceId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201808
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2018-08-13T23:59:59Z
                      usageStart: 2018-08-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
                  - id: /subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/201808/providers/Microsoft.Consumption/marketplaces/marketplaceId2
                    name: marketplacesId2
                    properties:
                      accountName: Account2
                      additionalProperties: additionalProperties
                      billingPeriodId: /subscriptions/11111111-1111-1111-1111-111111111111/providers/Microsoft.Billing/billingPeriods/201810
                      consumedQuantity: 0.00328
                      costCenter: Center2
                      currency: USD
                      departmentName: Department2
                      instanceId: /subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared2
                      instanceName: shared2
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 11111111-1111-1111-1111-111111111111
                      offerName: offer1
                      orderNumber: 11111111-1111-1111-1111-111111111111
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 11111111-1111-1111-1111-111111111111
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2018-08-13T23:59:59Z
                      usageStart: 2018-08-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        SubscriptionMarketplacesList:
          parameters:
            api-version: 2019-06-01
            scope: subscriptions/00000000-0000-0000-0000-000000000000
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketPlaces/marketplaceId1
                    name: marketplaceId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan1
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
        SubscriptionMarketplacesListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201801"
            scope: subscriptions/00000000-0000-0000-0000-000000000000
            subscriptionId: 00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketPlaces/marketplacesId1
                    name: marketplacesId1
                    properties:
                      accountName: Account1
                      additionalProperties: additionalProperties
                      billingPeriodId: /subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702
                      consumedQuantity: 0.00328
                      costCenter: Center1
                      currency: USD
                      departmentName: Department1
                      instanceId: /subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1
                      instanceName: shared1
                      isEstimated: false
                      isRecurringCharge: false
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerName: offer1
                      orderNumber: 00000000-0000-0000-0000-000000000000
                      planName: plan2
                      pretaxCost: 0.67
                      publisherName: xyz
                      resourceGroup: TEST
                      resourceRate: 0.24
                      subscriptionGuid: 00000000-0000-0000-0000-000000000000
                      subscriptionName: azure subscription
                      unitOfMeasure: 10 Hours
                      usageEnd: 2017-02-13T23:59:59Z
                      usageStart: 2017-02-13T00:00:00Z
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/marketPlaces
      x-ms-odata: "#/definitions/Marketplace"
      x-ms-pageable:
        nextLinkName: nextLink
  "/{scope}/providers/Microsoft.Consumption/tags":
    get:
      description: Get all available tag keys for the defined scope
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Tags_Get
      parameters:
        - $ref: "#/parameters/scopeTagsParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/TagsResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Tags
      x-ms-examples:
        Tags_Get:
          parameters:
            api-version: 2019-06-01
            billingAccountId: "12345"
            scope: providers/Microsoft.CostManagement/billingAccounts/1234
          responses:
            "200":
              body:
                eTag: '"1d34d012214157f"'
                id: providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1
                name: tags1
                properties:
                  tags:
                    - key: Department
                    - key: CostCenter
                    - key: Portal
                    - key: OrgName
                    - key: Namespace
                    - key: resourceType
                    - key: Subsystem
                    - key: Environment
                    - key: clusterName
                type: Microsoft.Consumption/tags
  "/{scope}/providers/Microsoft.Consumption/usageDetails":
    get:
      description: Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: UsageDetails_List
      parameters:
        - $ref: "#/parameters/scopeUsageDetailsParameter"
        - description: May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.
          in: query
          name: $expand
          required: false
          type: string
        - description: May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type
          in: query
          name: $filter
          required: false
          type: string
        - 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
          name: $skiptoken
          required: false
          type: string
        - description: May be used to limit the number of results to the most recent N usageDetails.
          in: query
          maximum: 1000
          minimum: 1
          name: $top
          required: false
          type: integer
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/metricParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/UsageDetailsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - UsageDetails
      x-ms-examples:
        BillingAccountUsageDetailsList:
          parameters:
            api-version: 2019-06-01-preview
            billingPeriodName: "201903"
            scope: providers/Microsoft.Billing/BillingAccounts/1234
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000295194820065
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.000402776395232
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.7329
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 4.38
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        BillingAccountUsageDetailsListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: providers/Microsoft.Billing/BillingAccounts/1234
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        DepartmentUsageDetailsList:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: providers/Microsoft.Billing/Departments/1234
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000295194820065
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.000402776395232
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.7329
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 4.38
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        DepartmentUsageDetailsListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: providers/Microsoft.Billing/Departments/1234
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        EnrollmentAccountUsageDetailsList:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: providers/Microsoft.Billing/EnrollmentAccounts/1234
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000295194820065
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.000402776395232
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.7329
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 4.38
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        EnrollmentAccountUsageDetailsListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: providers/Microsoft.Billing/EnrollmentAccounts/1234
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        ManagementGroupUsageDetailsList:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            managementGroupId: managementGroupForTest
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
                  - id: /scope/providers/Microsoft.Billing/billingPeriods/20180801/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2
                    name: usageDetails_Id2
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 2
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 2
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000295194820065
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.000402776395232
                      invoiceSection: Invoice Section 2
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 11111111-1111-1111-1111-111111111111
                      offerId: Offer Id 2
                      partNumber: Part Number 2
                      product: Product Name 2
                      quantity: 0.7329
                      resourceGroup: Resource Group 2
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2
                      resourceLocation: USEast
                      resourceName: Resource Name 2
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 4.38
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        ManagementGroupUsageDetailsListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            managementGroupId: managementGroupForTest
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
                  - id: /scope/providers/Microsoft.Billing/billingPeriods/billingPeriodName/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2
                    name: usageDetails_Id2
                    properties:
                      accountName: Account Name 2
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 2
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 2
                      chargeType: UnusedReservation
                      consumedService: Microsoft.Storage
                      cost: 0.000821821271948
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.073488920944598
                      invoiceSection: Invoice Section 2
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 11111111-1111-1111-1111-111111111111
                      offerId: Offer Id 2
                      partNumber: Part Number 2
                      product: Product Name 2
                      quantity: 0.4759
                      resourceGroup: Resource Group 2
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2
                      resourceLocation: USEast
                      resourceName: Resource Name 2
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 2
                      unitPrice: 5.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsExpand:
          parameters:
            $expand: meterDetails,additionalInfo
            $filter: tags eq 'dev:tools'
            $top: 1
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      additionalInfo: '{"MyType":"","ServiceType":"","VMName":"","UsageType":"MyUsage"}'
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010464556322455
                      frequency: UsageBased
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails:
                        meterCategory: Networking
                        meterName: Data Transfer Out (GB)
                        meterSubCategory: ExpressRoute
                        serviceFamily: Compute
                        unitOfMeasure: GB
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.54
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsList:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: AccountName
                      billingAccountId: xxxxxxxx
                      billingAccountName: Customer Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-04-30T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-04-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Customer Name 1
                      chargeType: Usage
                      consumedService: Microsoft.ClassicStorage
                      cost: 0.000001980949998
                      costCenter: BAS
                      date: 2019-04-09T00:00:00.0000000Z
                      effectivePrice: 0.054693034210767
                      frequency: UsageBased
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product1
                      quantity: 0.000036
                      resourceGroup: Resource-Group-westus
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1
                      resourceLocation: uswest
                      resourceName: ResourceName1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: SubscriptionName 1
                      unitPrice: 5.47
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsListByMetricActualCost:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            metric: actualcost
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: AccountName
                      billingAccountId: xxxxxxxx
                      billingAccountName: Customer Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-04-30T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-04-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Customer Name 1
                      chargeType: Usage
                      consumedService: Microsoft.ClassicStorage
                      cost: 0.000001968949998
                      costCenter: BAS
                      date: 2019-04-09T00:00:00.0000000Z
                      effectivePrice: 0.054693055510767
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product1
                      quantity: 0.000036
                      resourceGroup: Resource-Group-westus
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1
                      resourceLocation: uswest
                      resourceName: ResourceName1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: SubscriptionName 1
                      unitPrice: 5.47
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsListByMetricAmortizedCost:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            metric: amortizedcost
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: AccountName
                      billingAccountId: xxxxxxxx
                      billingAccountName: Customer Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-04-30T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-04-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Customer Name 1
                      chargeType: Usage
                      consumedService: Microsoft.ClassicStorage
                      cost: 0.000001968949998
                      costCenter: BAS
                      date: 2019-04-09T00:00:00.0000000Z
                      effectivePrice: 0.054693055510767
                      frequency: UsageBased
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product1
                      quantity: 0.000036
                      resourceGroup: Resource-Group-westus
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1
                      resourceLocation: uswest
                      resourceName: ResourceName1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: SubscriptionName 1
                      unitPrice: 5.47
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsListByMetricUsage:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            metric: usage
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: AccountName
                      billingAccountId: xxxxxxxx
                      billingAccountName: Customer Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-04-30T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-04-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Customer Name 1
                      chargeType: Usage
                      consumedService: Microsoft.ClassicStorage
                      cost: 0.000001968949998
                      costCenter: BAS
                      date: 2019-04-09T00:00:00.0000000Z
                      effectivePrice: 0.054693055510767
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product1
                      quantity: 0.000036
                      resourceGroup: Resource-Group-westus
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1
                      resourceLocation: uswest
                      resourceName: ResourceName1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: SubscriptionName 1
                      unitPrice: 5.47
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsListFilterByTag:
          parameters:
            $filter: tags eq 'dev:tools'
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                    type: Microsoft.Consumption/usageDetails
        UsageDetailsListForBillingPeriod:
          parameters:
            api-version: 2019-06-01
            billingPeriodName: "201903"
            scope: subscriptions/00000000-0000-0000-0000-000000000000
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1
                    name: usageDetails_Id1
                    properties:
                      accountName: Account Name 1
                      billingAccountId: xxxxxxxx
                      billingAccountName: Account Name 1
                      billingCurrency: CAD
                      billingPeriodEndDate: 2019-03-31T00:00:00.0000000Z
                      billingPeriodStartDate: 2019-03-01T00:00:00.0000000Z
                      billingProfileId: xxxxxxxx
                      billingProfileName: Account Name 1
                      chargeType: Usage
                      consumedService: Microsoft.Storage
                      cost: 0.000342194841184
                      costCenter: DEV
                      date: 2019-03-30T00:00:00.0000000Z
                      effectivePrice: 0.010534556373432
                      invoiceSection: Invoice Section 1
                      isAzureCreditEligible: false
                      meterDetails: null
                      meterId: 00000000-0000-0000-0000-000000000000
                      offerId: Offer Id 1
                      partNumber: Part Number 1
                      product: Product Name 1
                      quantity: 0.8234
                      resourceGroup: Resource Group 1
                      resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1
                      resourceLocation: USEast
                      resourceName: Resource Name 1
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Subscription Name 1
                      unitPrice: 3.74
                    tags:
                      dev: tools
                      env: newcrp
                    type: Microsoft.Consumption/usageDetails
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  Balance:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A balance resource.
    properties:
      properties:
        $ref: "#/definitions/BalanceProperties"
        title: Balance properties
        x-ms-client-flatten: true
    type: object
  BalanceProperties:
    description: The properties of the balance.
    properties:
      adjustmentDetails:
        description: List of Adjustments (Promo credit, SIE credit etc.).
        items:
          properties:
            name:
              description: the name of new adjustment.
              readOnly: true
              type: string
            value:
              description: the value of new adjustment.
              format: decimal
              readOnly: true
              type: number
          type: object
        readOnly: true
        type: array
      adjustments:
        description: Total adjustment amount.
        format: decimal
        readOnly: true
        type: number
      azureMarketplaceServiceCharges:
        description: Total charges for Azure Marketplace.
        format: decimal
        readOnly: true
        type: number
      beginningBalance:
        description: The beginning balance for the billing period.
        format: decimal
        readOnly: true
        type: number
      billingFrequency:
        description: The billing frequency.
        enum:
          - Month
          - Quarter
          - Year
        type: string
        x-ms-enum:
          modelAsString: true
          name: BillingFrequency
      chargesBilledSeparately:
        description: Charges Billed separately.
        format: decimal
        readOnly: true
        type: number
      currency:
        description: The ISO currency in which the meter is charged, for example, USD.
        readOnly: true
        type: string
      endingBalance:
        description: The ending balance for the billing period (for open periods this will be updated daily).
        format: decimal
        readOnly: true
        type: number
      newPurchases:
        description: Total new purchase amount.
        format: decimal
        readOnly: true
        type: number
      newPurchasesDetails:
        description: List of new purchases.
        items:
          properties:
            name:
              description: the name of new purchase.
              readOnly: true
              type: string
            value:
              description: the value of new purchase.
              format: decimal
              readOnly: true
              type: number
          type: object
        readOnly: true
        type: array
      priceHidden:
        description: Price is hidden or not.
        readOnly: true
        type: boolean
      serviceOverage:
        description: Overage for Azure services.
        format: decimal
        readOnly: true
        type: number
      totalOverage:
        description: serviceOverage + chargesBilledSeparately.
        format: decimal
        readOnly: true
        type: number
      totalUsage:
        description: Azure service commitment + total Overage.
        format: decimal
        readOnly: true
        type: number
      utilized:
        description: Total Commitment usage.
        format: decimal
        readOnly: true
        type: number
    type: object
  Budget:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: A budget resource.
    properties:
      properties:
        $ref: "#/definitions/BudgetProperties"
        title: Budget properties
        x-ms-client-flatten: true
    type: object
  BudgetProperties:
    description: The properties of the budget.
    properties:
      amount:
        description: The total amount of cost to track with the budget
        format: decimal
        type: number
      category:
        description: The category of the budget, whether the budget tracks cost or usage.
        enum:
          - Cost
          - Usage
        type: string
        x-ms-enum:
          modelAsString: true
          name: CategoryType
      currentSpend:
        $ref: "#/definitions/CurrentSpend"
        description: The current amount of cost which is being tracked for a budget.
        readOnly: true
      filters:
        $ref: "#/definitions/Filters"
        description: May be used to filter budgets by resource group, resource, or meter.
        type: object
      notifications:
        additionalProperties:
          $ref: "#/definitions/Notification"
          type: object
        description: Dictionary of notifications associated with the budget. Budget can have up to five notifications.
        maxItems: 5
        type: object
      timeGrain:
        description: The time covered by a budget. Tracking of the amount will be reset based on the time grain.
        enum:
          - Monthly
          - Quarterly
          - Annually
          - BillingMonth
          - BillingQuarter
          - BillingAnnual
        type: string
        x-ms-enum:
          modelAsString: true
          name: TimeGrainType
      timePeriod:
        $ref: "#/definitions/BudgetTimePeriod"
        description: Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than three months. Past start date should  be selected within the timegrain period. There are no restrictions on the end date.
    required:
      - category
      - amount
      - timeGrain
      - timePeriod
  BudgetTimePeriod:
    description: The start and end date for a budget.
    properties:
      endDate:
        description: The end date for the budget. If not provided, we default this to 10 years from the start date.
        format: date-time
        type: string
      startDate:
        description: The start date for the budget.
        format: date-time
        type: string
    required:
      - startDate
  BudgetsListResult:
    description: Result of listing budgets. It contains a list of available budgets in the scope provided.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of budgets.
        items:
          $ref: "#/definitions/Budget"
        readOnly: true
        type: array
  ChargeSummary:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A charge summary resource.
    properties:
      properties:
        $ref: "#/definitions/ChargeSummaryProperties"
        title: Charge summary properties
        x-ms-client-flatten: true
    type: object
  ChargeSummaryProperties:
    description: The properties of the charge summary.
    properties:
      azureCharges:
        description: Azure Charges.
        format: decimal
        readOnly: true
        type: number
      billingPeriodId:
        description: The id of the billing period resource that the charge belongs to.
        readOnly: true
        type: string
      chargesBilledSeparately:
        description: Charges Billed separately.
        format: decimal
        readOnly: true
        type: number
      currency:
        description: Currency Code
        readOnly: true
        type: string
      marketplaceCharges:
        description: Marketplace Charges.
        format: decimal
        readOnly: true
        type: number
      usageEnd:
        description: " Usage end date."
        readOnly: true
        type: string
      usageStart:
        description: Usage start date.
        readOnly: true
        type: string
    type: object
  ChargesListResult:
    description: Result of listing charge summary.
    properties:
      value:
        description: The list of charge summary
        items:
          $ref: "#/definitions/ChargeSummary"
        readOnly: true
        type: array
  CurrentSpend:
    description: The current amount of cost which is being tracked for a budget.
    properties:
      amount:
        description: The total amount of cost which is being tracked by the budget.
        format: decimal
        readOnly: true
        type: number
      unit:
        description: The unit of measure for the budget amount.
        readOnly: true
        type: string
  ErrorDetails:
    description: The details of the error.
    properties:
      code:
        description: Error code.
        readOnly: true
        type: string
      message:
        description: Error message indicating why the operation failed.
        readOnly: true
        type: string
  ErrorResponse:
    description: Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
    properties:
      error:
        $ref: "#/definitions/ErrorDetails"
        description: The details of the error.
    type: object
  Filters:
    description: May be used to filter budgets by resource group, resource, or meter.
    properties:
      meters:
        description: "The list of filters on meters (GUID), mandatory for budgets of usage category. "
        items:
          format: uuid
          type: string
        maxItems: 10
        minItems: 0
        type: array
      resourceGroups:
        description: The list of filters on resource groups, allowed at subscription level only.
        items:
          type: string
        maxItems: 10
        minItems: 0
        type: array
      resources:
        description: The list of filters on resources.
        items:
          type: string
        maxItems: 10
        minItems: 0
        type: array
      tags:
        additionalProperties:
          items:
            type: string
          type: array
        description: The dictionary of filters on tags.
        maxItems: 10
        minItems: 0
        type: object
  Forecast:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A forecast resource.
    properties:
      properties:
        $ref: "#/definitions/ForecastProperties"
        title: Forecast properties
        x-ms-client-flatten: true
    type: object
  ForecastProperties:
    description: The properties of the forecast charge.
    properties:
      charge:
        description: The amount of charge
        format: decimal
        readOnly: true
        type: number
      chargeType:
        description: The type of the charge. Could be actual or forecast
        enum:
          - Actual
          - Forecast
        type: string
        x-ms-enum:
          modelAsString: true
          name: ChargeType
      confidenceLevels:
        description: The details about the forecast confidence levels. This is populated only when chargeType is Forecast.
        items:
          properties:
            bound:
              description: The boundary of the percentage, values could be 'Upper' or 'Lower'
              enum:
                - Upper
                - Lower
              type: string
              x-ms-enum:
                modelAsString: true
                name: Bound
            percentage:
              description: The percentage level of the confidence
              format: decimal
              readOnly: true
              type: number
            value:
              description: The amount of forecast within the percentage level
              format: decimal
              readOnly: true
              type: number
          type: object
        readOnly: true
        type: array
      currency:
        description: The ISO currency in which the meter is charged, for example, USD.
        readOnly: true
        type: string
      grain:
        description: The granularity of forecast.
        enum:
          - Daily
          - Monthly
          - Yearly
        type: string
        x-ms-enum:
          modelAsString: true
          name: Grain
      usageDate:
        description: The usage date of the forecast.
        readOnly: true
        type: string
    type: object
  ForecastsListResult:
    description: Result of listing forecasts. It contains a list of available forecasts.
    properties:
      value:
        description: The list of forecasts.
        items:
          $ref: "#/definitions/Forecast"
        readOnly: true
        type: array
    type: object
  ManagementGroupAggregatedCostProperties:
    description: The properties of the Management Group Aggregated Cost.
    properties:
      azureCharges:
        description: Azure Charges.
        format: decimal
        readOnly: true
        type: number
      billingPeriodId:
        description: The id of the billing period resource that the aggregated cost belongs to.
        readOnly: true
        type: string
      chargesBilledSeparately:
        description: Charges Billed Separately.
        format: decimal
        readOnly: true
        type: number
      children:
        description: Children of a management group
        items:
          $ref: "#/definitions/ManagementGroupAggregatedCostResult"
        type: array
      currency:
        description: The ISO currency in which the meter is charged, for example, USD.
        readOnly: true
        type: string
      excludedSubscriptions:
        description: List of subscription Guids excluded from the calculation of aggregated cost
        items:
          type: string
        type: array
      includedSubscriptions:
        description: List of subscription Guids included in the calculation of aggregated cost
        items:
          type: string
        type: array
      marketplaceCharges:
        description: Marketplace Charges.
        format: decimal
        readOnly: true
        type: number
      usageEnd:
        description: The end of the date time range covered by the aggregated cost.
        format: date-time
        readOnly: true
        type: string
      usageStart:
        description: The start of the date time range covered by aggregated cost.
        format: date-time
        readOnly: true
        type: string
    type: object
  ManagementGroupAggregatedCostResult:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A management group aggregated cost resource.
    properties:
      properties:
        $ref: "#/definitions/ManagementGroupAggregatedCostProperties"
        title: Management Group Aggregated Cost properties
        x-ms-client-flatten: true
    type: object
  Marketplace:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An marketplace resource.
    properties:
      properties:
        $ref: "#/definitions/MarketplaceProperties"
        title: Marketplace properties
        x-ms-client-flatten: true
    type: object
  MarketplaceProperties:
    description: The properties of the marketplace usage detail.
    properties:
      accountName:
        description: Account name.
        readOnly: true
        type: string
      additionalProperties:
        description: Additional details of this usage item. By default this is not populated, unless it's specified in $expand.
        readOnly: true
        type: string
      billingPeriodId:
        description: The id of the billing period resource that the usage belongs to.
        readOnly: true
        type: string
      consumedQuantity:
        description: The quantity of usage.
        format: decimal
        readOnly: true
        type: number
      consumedService:
        description: Consumed service name.
        readOnly: true
        type: string
      costCenter:
        description: The cost center of this department if it is a department and a costcenter exists
        readOnly: true
        type: string
      currency:
        description: The ISO currency in which the meter is charged, for example, USD.
        readOnly: true
        type: string
      departmentName:
        description: Department name.
        readOnly: true
        type: string
      instanceId:
        description: The uri of the resource instance that the usage is about.
        readOnly: true
        type: string
      instanceName:
        description: The name of the resource instance that the usage is about.
        readOnly: true
        type: string
      isEstimated:
        description: The estimated usage is subject to change.
        readOnly: true
        type: boolean
      isRecurringCharge:
        description: Flag indicating whether this is a recurring charge or not.
        readOnly: true
        type: boolean
      meterId:
        description: The meter id (GUID).
        format: uuid
        readOnly: true
        type: string
      offerName:
        description: The type of offer.
        readOnly: true
        type: string
      orderNumber:
        description: The order number.
        readOnly: true
        type: string
      planName:
        description: The name of plan.
        readOnly: true
        type: string
      pretaxCost:
        description: The amount of cost before tax.
        format: decimal
        readOnly: true
        type: number
      publisherName:
        description: The name of publisher.
        readOnly: true
        type: string
      resourceGroup:
        description: The name of resource group.
        readOnly: true
        type: string
      resourceRate:
        description: The marketplace resource rate.
        format: decimal
        readOnly: true
        type: number
      subscriptionGuid:
        description: Subscription guid.
        format: uuid
        readOnly: true
        type: string
      subscriptionName:
        description: Subscription name.
        readOnly: true
        type: string
      unitOfMeasure:
        description: The unit of measure.
        readOnly: true
        type: string
      usageEnd:
        description: The end of the date time range covered by the usage detail.
        format: date-time
        readOnly: true
        type: string
      usageStart:
        description: The start of the date time range covered by the usage detail.
        format: date-time
        readOnly: true
        type: string
    type: object
  MarketplacesListResult:
    description: Result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of marketplaces.
        items:
          $ref: "#/definitions/Marketplace"
        readOnly: true
        type: array
    type: object
  MeterDetails:
    description: The properties of the meter detail.
    properties:
      meterCategory:
        description: The category of the meter, for example, 'Cloud services', 'Networking', etc..
        readOnly: true
        type: string
      meterLocation:
        description: The location in which the Azure service is available.
        readOnly: true
        type: string
      meterName:
        description: The name of the meter, within the given meter category
        readOnly: true
        type: string
      meterSubCategory:
        description: The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..
        readOnly: true
        type: string
      pretaxStandardRate:
        description: The pretax listing price.
        format: decimal
        readOnly: true
        type: number
      serviceName:
        description: The name of the service.
        readOnly: true
        type: string
      serviceTier:
        description: The service tier.
        readOnly: true
        type: string
      totalIncludedQuantity:
        description: The total included quantity associated with the offer.
        format: decimal
        readOnly: true
        type: number
      unit:
        description: The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.
        readOnly: true
        type: string
  MeterDetailsResponse:
    description: The properties of the meter detail.
    properties:
      meterCategory:
        description: The category of the meter, for example, 'Cloud services', 'Networking', etc..
        readOnly: true
        type: string
      meterName:
        description: The name of the meter, within the given meter category
        readOnly: true
        type: string
      meterSubCategory:
        description: The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..
        readOnly: true
        type: string
      serviceFamily:
        description: The service family.
        readOnly: true
        type: string
      unitOfMeasure:
        description: The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.
        readOnly: true
        type: string
  Notification:
    description: The notification associated with a budget.
    properties:
      contactEmails:
        description: Email addresses to send the budget notification to when the threshold is exceeded.
        items:
          type: string
        maxItems: 50
        minItems: 1
        type: array
      contactGroups:
        description: Action groups to send the budget notification to when the threshold is exceeded.
        items:
          type: string
        maxItems: 50
        minItems: 0
        type: array
      contactRoles:
        description: Contact roles to send the budget notification to when the threshold is exceeded.
        items:
          type: string
        type: array
      enabled:
        description: The notification is enabled or not.
        type: boolean
      operator:
        description: The comparison operator.
        enum:
          - EqualTo
          - GreaterThan
          - GreaterThanOrEqualTo
        type: string
        x-ms-enum:
          modelAsString: true
          name: OperatorType
      threshold:
        description: Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
        format: decimal
        type: number
    required:
      - enabled
      - operator
      - threshold
      - contactEmails
  Operation:
    description: A Consumption REST API operation.
    properties:
      display:
        description: The object that represents the operation.
        properties:
          operation:
            description: "Operation type: Read, write, delete, etc."
            readOnly: true
            type: string
          provider:
            description: "Service provider: Microsoft.Consumption."
            readOnly: true
            type: string
          resource:
            description: "Resource on which the operation is performed: UsageDetail, etc."
            readOnly: true
            type: string
      name:
        description: "Operation name: {provider}/{resource}/{operation}."
        readOnly: true
        type: string
    type: object
  OperationListResult:
    description: Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.
    properties:
      nextLink:
        description: URL to get the next set of operation list results if there are any.
        readOnly: true
        type: string
      value:
        description: List of consumption operations supported by the Microsoft.Consumption resource provider.
        items:
          $ref: "#/definitions/Operation"
        readOnly: true
        type: array
  PriceSheetModel:
    description: price sheet result. It contains the pricesheet associated with billing period
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      pricesheets:
        description: Price sheet
        items:
          $ref: "#/definitions/PriceSheetProperties"
        readOnly: true
        type: array
  PriceSheetProperties:
    description: The properties of the price sheet.
    properties:
      billingPeriodId:
        description: The id of the billing period resource that the usage belongs to.
        readOnly: true
        type: string
      currencyCode:
        description: Currency Code
        readOnly: true
        type: string
      includedQuantity:
        description: Included quality for an offer
        format: decimal
        readOnly: true
        type: number
      meterDetails:
        $ref: "#/definitions/MeterDetails"
        description: The details about the meter. By default this is not populated, unless it's specified in $expand.
        readOnly: true
      meterId:
        description: The meter id (GUID)
        format: uuid
        readOnly: true
        type: string
      offerId:
        description: Offer Id
        readOnly: true
        type: string
      partNumber:
        description: Part Number
        readOnly: true
        type: string
      unitOfMeasure:
        description: Unit of measure
        readOnly: true
        type: string
      unitPrice:
        description: Unit Price
        format: decimal
        readOnly: true
        type: number
  PriceSheetResult:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An pricesheet resource.
    properties:
      properties:
        $ref: "#/definitions/PriceSheetModel"
        title: Price sheet properties
        x-ms-client-flatten: true
    type: object
  ProxyResource:
    description: The Resource model definition.
    properties:
      eTag:
        description: eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
        type: string
      id:
        description: Resource Id.
        readOnly: true
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      type:
        description: Resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  ReservationDetail:
    allOf:
      - $ref: "#/definitions/Resource"
    description: reservation detail resource.
    properties:
      properties:
        $ref: "#/definitions/ReservationDetailProperties"
        title: Reservation Detail properties
        x-ms-client-flatten: true
    type: object
  ReservationDetailProperties:
    description: The properties of the reservation detail.
    properties:
      instanceFlexibilityGroup:
        description: The instance Flexibility Group.
        readOnly: true
        type: string
      instanceFlexibilityRatio:
        description: The instance Flexibility Ratio.
        readOnly: true
        type: string
      instanceId:
        description: This identifier is the name of the resource or the fully qualified Resource ID.
        readOnly: true
        type: string
      kind:
        description: The reservation kind.
        readOnly: true
        type: string
      reservationId:
        description: The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.
        readOnly: true
        type: string
      reservationOrderId:
        description: The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
        readOnly: true
        type: string
      reservedHours:
        description: This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days.
        format: decimal
        readOnly: true
        type: number
      skuName:
        description: This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
        readOnly: true
        type: string
      totalReservedQuantity:
        description: This is the total count of instances that are reserved for the reservationId.
        format: decimal
        readOnly: true
        type: number
      usageDate:
        description: The date on which consumption occurred.
        format: date-time
        readOnly: true
        type: string
      usedHours:
        description: This is the total hours used by the instance.
        format: decimal
        readOnly: true
        type: number
  ReservationDetailsListResult:
    description: Result of listing reservation details.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of reservation details.
        items:
          $ref: "#/definitions/ReservationDetail"
        readOnly: true
        type: array
  ReservationRecommendation:
    allOf:
      - $ref: "#/definitions/Resource"
      - $ref: "#/definitions/ResourceAttributes"
    description: Reservation recommendation resource.
    properties:
      properties:
        $ref: "#/definitions/ReservationRecommendationProperties"
        title: Reservation Recommendation properties
        x-ms-client-flatten: true
    type: object
  ReservationRecommendationProperties:
    description: The properties of the reservation recommendation.
    properties:
      costWithNoReservedInstances:
        description: The total amount of cost without reserved instances.
        format: decimal
        readOnly: true
        type: number
      firstUsageDate:
        description: The usage date for looking back.
        format: date-time
        readOnly: true
        type: string
      instanceFlexibilityGroup:
        description: The instance Flexibility Group.
        readOnly: true
        type: string
      instanceFlexibilityRatio:
        description: The instance Flexibility Ratio.
        readOnly: true
        type: integer
      lookBackPeriod:
        description: The number of days of usage to look back for recommendation.
        readOnly: true
        type: string
      meterId:
        description: The meter id (GUID)
        format: uuid
        readOnly: true
        type: string
      netSavings:
        description: Total estimated savings with reserved instances.
        format: decimal
        readOnly: true
        type: number
      normalizedSize:
        description: The normalized Size.
        readOnly: true
        type: string
      recommendedQuantity:
        description: Recommended quality for reserved instances.
        format: decimal
        readOnly: true
        type: number
      recommendedQuantityNormalized:
        description: The recommended Quantity Normalized.
        readOnly: true
        type: number
      scope:
        description: Shared or single recommendation.
        readOnly: true
        type: string
      skuProperties:
        description: List of sku properties
        items:
          $ref: "#/definitions/SkuProperty"
        readOnly: true
        type: array
      term:
        description: RI recommendations in one or three year terms.
        readOnly: true
        type: string
      totalCostWithReservedInstances:
        description: The total amount of cost with reserved instances.
        format: decimal
        readOnly: true
        type: number
  ReservationRecommendationsListResult:
    description: Result of listing reservation recommendations.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of reservation recommendations.
        items:
          $ref: "#/definitions/ReservationRecommendation"
        readOnly: true
        type: array
  ReservationSummariesListResult:
    description: Result of listing reservation summaries.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of reservation summaries.
        items:
          $ref: "#/definitions/ReservationSummary"
        readOnly: true
        type: array
  ReservationSummary:
    allOf:
      - $ref: "#/definitions/Resource"
    description: reservation summary resource.
    properties:
      properties:
        $ref: "#/definitions/ReservationSummaryProperties"
        title: Reservation Summary properties
        x-ms-client-flatten: true
    type: object
  ReservationSummaryProperties:
    description: The properties of the reservation summary.
    properties:
      avgUtilizationPercentage:
        description: This is average utilization for the entire time range. (day or month depending on the grain)
        format: decimal
        readOnly: true
        type: number
      kind:
        description: The reservation kind.
        readOnly: true
        type: string
      maxUtilizationPercentage:
        description: This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.
        format: decimal
        readOnly: true
        type: number
      minUtilizationPercentage:
        description: This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day
        format: decimal
        readOnly: true
        type: number
      purchasedQuantity:
        description: This is the purchased quantity for the reservationId.
        format: decimal
        readOnly: true
        type: number
      remainingQuantity:
        description: This is the remaining quantity for the reservationId.
        format: decimal
        readOnly: true
        type: number
      reservationId:
        description: The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.
        readOnly: true
        type: string
      reservationOrderId:
        description: The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
        readOnly: true
        type: string
      reservedHours:
        description: This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days
        format: decimal
        readOnly: true
        type: number
      skuName:
        description: This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
        readOnly: true
        type: string
      totalReservedQuantity:
        description: This is the total count of instances that are reserved for the reservationId.
        format: decimal
        readOnly: true
        type: number
      usageDate:
        description: Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.
        format: date-time
        readOnly: true
        type: string
      usedHours:
        description: Total used hours by the reservation
        format: decimal
        readOnly: true
        type: number
      usedQuantity:
        description: This is the used quantity for the reservationId.
        format: decimal
        readOnly: true
        type: number
      utilizedPercentage:
        description: This is the utilized percentage for the reservation Id.
        format: decimal
        readOnly: true
        type: number
  ReservationTransaction:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Reservation transaction resource.
    properties:
      properties:
        $ref: "#/definitions/ReservationTransactionProperties"
        title: Reservation Transaction properties
        x-ms-client-flatten: true
    type: object
  ReservationTransactionProperties:
    default: The properties of the reservation transaction.
    properties:
      accountName:
        description: The name of the account that makes the transaction.
        readOnly: true
        type: string
      accountOwnerEmail:
        description: The email of the account owner that makes the transaction.
        readOnly: true
        type: string
      amount:
        description: The charge of the transaction.
        format: decimal
        readOnly: true
        type: number
      armSkuName:
        description: This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
        readOnly: true
        type: string
      costCenter:
        description: The cost center of this department if it is a department and a cost center is provided.
        readOnly: true
        type: string
      currency:
        description: The ISO currency in which the transaction is charged, for example, USD.
        readOnly: true
        type: string
      currentEnrollment:
        description: The current enrollment.
        readOnly: true
        type: string
      departmentName:
        description: The department name.
        readOnly: true
        type: string
      description:
        description: The description of the transaction.
        readOnly: true
        type: string
      eventDate:
        description: The date of the transaction
        format: date-time
        readOnly: true
        type: string
      eventType:
        description: The type of the transaction (Purchase, Cancel, etc.)
        readOnly: true
        type: string
      purchasingEnrollment:
        description: The purchasing enrollment.
        readOnly: true
        type: string
      purchasingSubscriptionGuid:
        description: The subscription guid that makes the transaction.
        format: uuid
        readOnly: true
        type: string
      purchasingSubscriptionName:
        description: The subscription name that makes the transaction.
        readOnly: true
        type: string
      quantity:
        description: The quantity of the transaction.
        format: decimal
        readOnly: true
        type: number
      region:
        description: The region of the transaction.
        readOnly: true
        type: string
      reservationOrderId:
        description: The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
        readOnly: true
        type: string
      reservationOrderName:
        description: The name of the reservation order.
        readOnly: true
        type: string
      term:
        description: This is the term of the transaction.
        readOnly: true
        type: string
  ReservationTransactionsListResult:
    description: Result of listing reservation transactions
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of reservation transactions.
        items:
          $ref: "#/definitions/ReservationTransaction"
        readOnly: true
        type: array
  Resource:
    description: The Resource model definition.
    properties:
      id:
        description: Resource Id.
        readOnly: true
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      tags:
        additionalProperties:
          type: string
        description: Resource tags.
        readOnly: true
        type: object
      type:
        description: Resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  ResourceAttributes:
    description: The Resource model definition.
    properties:
      location:
        description: Resource location
        readOnly: true
        type: string
      sku:
        description: Resource sku
        readOnly: true
        type: string
  SkuProperty:
    description: The Sku property
    properties:
      name:
        description: The name of sku property.
        readOnly: true
        type: string
      value:
        description: The value of sku property.
        readOnly: true
        type: string
  Tag:
    description: The tag resource.
    properties:
      key:
        description: Tag key.
        type: string
  TagProperties:
    description: The properties of the tag.
    properties:
      tags:
        description: A list of Tag.
        items:
          $ref: "#/definitions/Tag"
        type: array
  TagsResult:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: A resource listing all tags.
    properties:
      properties:
        $ref: "#/definitions/TagProperties"
        title: Tag properties
        x-ms-client-flatten: true
    type: object
  UsageDetail:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An usage detail resource.
    properties:
      properties:
        $ref: "#/definitions/UsageDetailProperties"
        title: Usage detail properties
        x-ms-client-flatten: true
    type: object
  UsageDetailProperties:
    description: The properties of the usage detail.
    properties:
      accountName:
        description: Account Name.
        readOnly: true
        type: string
      accountOwnerId:
        description: Account Owner Id.
        readOnly: true
        type: string
      additionalInfo:
        description: Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied.
        readOnly: true
        type: string
      billingAccountId:
        description: Billing Account identifier.
        readOnly: true
        type: string
      billingAccountName:
        description: Billing Account Name.
        readOnly: true
        type: string
      billingCurrency:
        description: Billing Currency.
        readOnly: true
        type: string
      billingPeriodEndDate:
        description: The billing period end date.
        format: date-time
        readOnly: true
        type: string
      billingPeriodStartDate:
        description: The billing period start date.
        format: date-time
        readOnly: true
        type: string
      billingProfileId:
        description: Billing Profile identifier.
        readOnly: true
        type: string
      billingProfileName:
        description: Billing Profile Name.
        readOnly: true
        type: string
      chargeType:
        description: Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
        readOnly: true
        type: string
      consumedService:
        description: Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage.
        readOnly: true
        type: string
      cost:
        description: The amount of cost before tax.
        format: decimal
        readOnly: true
        type: number
      costCenter:
        description: The cost center of this department if it is a department and a cost center is provided.
        readOnly: true
        type: string
      date:
        description: Date for the usage record.
        format: date-time
        readOnly: true
        type: string
      effectivePrice:
        description: Effective Price that's charged for the usage.
        format: decimal
        readOnly: true
        type: number
      frequency:
        description: Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used.
        readOnly: true
        type: string
      invoiceSection:
        description: Invoice Section Name.
        readOnly: true
        type: string
      isAzureCreditEligible:
        description: Is Azure Credit Eligible.
        readOnly: true
        type: boolean
      meterDetails:
        $ref: "#/definitions/MeterDetailsResponse"
        description: The details about the meter. By default this is not populated, unless it's specified in $expand.
        readOnly: true
      meterId:
        description: The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName.
        format: uuid
        readOnly: true
        type: string
      offerId:
        description: "Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P."
        readOnly: true
        type: string
      partNumber:
        description: Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace.
        readOnly: true
        type: string
      planName:
        description: Plan Name.
        readOnly: true
        type: string
      product:
        description: Product name for the consumed service or purchase. Not available for Marketplace.
        readOnly: true
        type: string
      productOrderId:
        description: Product Order Id. For reservations this is the Reservation Order ID.
        readOnly: true
        type: string
      productOrderName:
        description: Product Order Name. For reservations this is the SKU that was purchased.
        readOnly: true
        type: string
      publisherName:
        description: Publisher Name.
        readOnly: true
        type: string
      publisherType:
        description: Publisher Type.
        readOnly: true
        type: string
      quantity:
        description: The usage quantity.
        format: decimal
        readOnly: true
        type: number
      reservationId:
        description: ARM resource id of the reservation. Only applies to records relevant to reservations.
        readOnly: true
        type: string
      reservationName:
        description: User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations.
        readOnly: true
        type: string
      resourceGroup:
        description: Resource Group Name.
        readOnly: true
        type: string
      resourceId:
        description: Azure resource manager resource identifier.
        readOnly: true
        type: string
      resourceLocation:
        description: Resource Location.
        readOnly: true
        type: string
      resourceName:
        description: Resource Name.
        readOnly: true
        type: string
      serviceInfo1:
        description: Service Info 1.
        readOnly: true
        type: string
      serviceInfo2:
        description: Service Info 2.
        readOnly: true
        type: string
      subscriptionId:
        description: Subscription guid.
        readOnly: true
        type: string
      subscriptionName:
        description: Subscription name.
        readOnly: true
        type: string
      term:
        description: Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. 36 months for a 3 year reservation.
        readOnly: true
        type: string
      unitPrice:
        description: Unit Price is the price applicable to you. (your EA or other contract price).
        format: decimal
        readOnly: true
        type: number
  UsageDetailsListResult:
    description: Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of usage details.
        items:
          $ref: "#/definitions/UsageDetail"
        readOnly: true
        type: array
