detailed_cost_reports
Creates, updates, deletes, gets or lists a detailed_cost_reports
resource.
Overview
Name | detailed_cost_reports |
Type | Resource |
Id | azure.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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
create_operation | insert | scope | 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. |
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.
Name | Datatype | Description |
---|---|---|
scope | string | The 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
- create_operation
- Manifest
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
;
# Description fields are for documentation purposes
- name: detailed_cost_reports
props:
- name: scope
value: string
description: Required parameter for the detailed_cost_reports resource.
- name: metric
value: string
description: |
The type of the detailed report. By default ActualCost is provided
valid_values: ['ActualCost', 'AmortizedCost']
- name: timePeriod
value: object
description: |
Has time period for pulling data for the cost detailed report. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.
- name: billingPeriod
value: string
description: |
Billing period in YearMonth(e.g. 202008) format. Only for legacy enterprise customers can use this. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.
- name: invoiceId
value: string
description: |
Invoice ID for Pay-as-you-go and Microsoft Customer Agreement scopes. Can only have one of either timePeriod or invoiceId or billingPeriod parameters. If none provided current month cost is provided.
- name: customerId
value: string
description: |
Customer ID for Microsoft Customer Agreement scopes (Invoice Id is also required for this).