@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api ConsumptionManagementClient
@base https://management.azure.com
@version 2019-06-01
@auth OAuth2
@common_fields {api-version: any # Version of the API to be used with the client request. The current version is 2019-06-01.}
@endpoints 25
@hint download_for_search
@toc {scope}(8), providers(13), subscriptions(4)

@group {scope}
@endpoint GET /{scope}/providers/Microsoft.Consumption/usageDetails
@desc Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.
@required {scope: any # 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}'}
@optional {$expand: any # 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., $filter: any # May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/instanceId, 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, $skiptoken: any # 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., $top: any # May be used to limit the number of results to the most recent N usageDetails., metric: any # Allows to select different type of cost/usage records.}
@returns(200) OK. The request has succeeded.

@endpoint GET /{scope}/providers/Microsoft.Consumption/marketplaces
@desc Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
@required {scope: any # 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}'}
@optional {$filter: any # 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'., $top: any # May be used to limit the number of results to the most recent N marketplaces., $skiptoken: any # 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.}
@returns(200) OK. The request has succeeded.

@endpoint GET /{scope}/providers/Microsoft.Consumption/budgets
@desc Lists all budgets for the defined scope.
@required {scope: any # 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.}
@returns(200) OK. The request has succeeded.

@endpoint GET /{scope}/providers/Microsoft.Consumption/budgets/{budgetName}
@desc Gets the budget for the scope by budget name.
@required {scope: any # 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., budgetName: any # Budget Name.}
@returns(200) OK. The request has succeeded.

@endpoint PUT /{scope}/providers/Microsoft.Consumption/budgets/{budgetName}
@desc 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.
@required {scope: any # 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., budgetName: any # Budget Name., parameters: map # Parameters supplied to the Create Budget operation.}
@returns(200) OK. The request has succeeded.
@returns(201) Created.

@endpoint DELETE /{scope}/providers/Microsoft.Consumption/budgets/{budgetName}
@desc The operation to delete a budget.
@required {scope: any # 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., budgetName: any # Budget Name.}
@returns(200) OK. The request has succeeded.

@endpoint GET /{scope}/providers/Microsoft.Consumption/tags
@desc Get all available tag keys for the defined scope
@required {scope: any # 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..}
@returns(200) OK. The request has succeeded.

@endpoint GET /{scope}/providers/Microsoft.Consumption/charges
@desc Lists the charges based for the defined scope.
@required {scope: any # 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}'}
@optional {$filter: any # 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 (:).}
@returns(200) OK. The request has succeeded.

@endgroup

@group providers
@endpoint GET /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances
@desc Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.
@required {billingAccountId: any # BillingAccount ID}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances
@desc Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later.
@required {billingAccountId: any # BillingAccount ID, billingPeriodName: any # Billing Period Name.}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries
@desc Lists the reservations summaries for daily or monthly grain.
@required {reservationOrderId: any # Order Id of the reservation, grain: any # Can be daily or monthly}
@optional {$filter: any # Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries
@desc Lists the reservations summaries for daily or monthly grain.
@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the reservation, grain: any # Can be daily or monthly}
@optional {$filter: any # Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationSummaries
@desc Lists the reservations summaries for daily or monthly grain.
@required {billingAccountId: any # BillingAccount ID, grain: any # Can be daily or monthly}
@optional {$filter: any # Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails
@desc Lists the reservations details for provided date range.
@required {reservationOrderId: any # Order Id of the reservation, $filter: any # Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails
@desc Lists the reservations details for provided date range.
@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the reservation, $filter: any # Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationDetails
@desc Lists the reservations details for provided date range.
@required {billingAccountId: any # BillingAccount ID, $filter: any # Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations
@desc List of recommendations for purchasing reserved instances.
@required {subscriptionId: any # Azure Subscription ID.}
@optional {$filter: any # May be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod.}
@returns(200) OK. The request has succeeded.

@endgroup

@group providers
@endpoint GET /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/microsoft.consumption/ReservationRecommendations
@desc List of recommendations for purchasing reserved instances on billing account scope
@required {billingAccountId: any # BillingAccount ID}
@optional {$filter: any # May be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod.}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions
@desc List of transactions for reserved instances on billing account scope
@required {billingAccountId: any # BillingAccount ID}
@optional {$filter: any # Filter reservation transactions by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and  'ge'}
@returns(200) OK. The request has succeeded.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default
@desc Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later.
@required {subscriptionId: any # Azure Subscription ID.}
@optional {$expand: any # May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet., $skiptoken: any # 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., $top: any # May be used to limit the number of results to the top N results.}
@returns(200) OK. The request has succeeded.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default
@desc 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.
@required {subscriptionId: any # Azure Subscription ID., billingPeriodName: any # Billing Period Name.}
@optional {$expand: any # May be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet., $skiptoken: any # 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., $top: any # May be used to limit the number of results to the top N results.}
@returns(200) OK. The request has succeeded.

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts
@desc Lists the forecast charges by subscriptionId.
@required {subscriptionId: any # Azure Subscription ID.}
@optional {$filter: any # 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'.}
@returns(200) OK. The request has succeeded.

@endgroup

@group providers
@endpoint GET /providers/Microsoft.Consumption/operations
@desc Lists all of the available consumption REST API operations.
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost
@desc Provides the aggregate cost of a management group and all child management groups by current billing period.
@required {managementGroupId: any # Azure Management Group ID.}
@optional {$filter: any # 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 (:).}
@returns(200) OK. The request has succeeded.

@endpoint GET /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost
@desc Provides the aggregate cost of a management group and all child management groups by specified billing period
@required {managementGroupId: any # Azure Management Group ID., billingPeriodName: any # Billing Period Name.}
@returns(200) OK. The request has succeeded.

@endgroup

@end
