Skip to main content

detailed_cost_reports

Creates, updates, deletes, gets or lists a detailed_cost_reports resource.

Overview

Namedetailed_cost_reports
TypeResource
Idazure.cost_management.detailed_cost_reports

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_operationinsertscopeGenerates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
scopestringThe ARM Resource ID for subscription, billing account, or other billing scopes.Currently Resource Group and Management Group are not supported. For details, see https://aka.ms/costmgmt/scopes.

INSERT examples

Generates the detailed cost report for provided date range, billing period(only enterprise customers) or Invoice ID asynchronously at a certain scope. Call returns a 202 with header Azure-Consumption-AsyncOperation providing a link to the operation created. A call on the operation will provide the status and if the operation is completed the blob file where generated detailed cost report is being stored.

INSERT INTO azure.cost_management.detailed_cost_reports (
data__metric,
data__timePeriod,
data__billingPeriod,
data__invoiceId,
data__customerId,
scope
)
SELECT
'{{ metric }}',
'{{ timePeriod }}',
'{{ billingPeriod }}',
'{{ invoiceId }}',
'{{ customerId }}',
'{{ scope }}'
RETURNING
id,
name,
properties,
type
;