QueryDefinition Class

The definition of a query.

All required parameters must be populated in order to send to Azure.

Inheritance
QueryDefinition

Constructor

QueryDefinition(*, type: Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.ExportType], timeframe: Union[str, azure.mgmt.costmanagement.models._cost_management_client_enums.TimeframeType], dataset: azure.mgmt.costmanagement.models._models_py3.QueryDataset, time_period: Optional[azure.mgmt.costmanagement.models._models_py3.QueryTimePeriod] = None, **kwargs)

Parameters

type
str or ExportType
Required

Required. The type of the query. Possible values include: "Usage", "ActualCost", "AmortizedCost".

timeframe
str or TimeframeType
Required

Required. The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: "MonthToDate", "BillingMonthToDate", "TheLastMonth", "TheLastBillingMonth", "WeekToDate", "Custom".

time_period
QueryTimePeriod
Required

Has time period for pulling data for the query.

dataset
QueryDataset
Required

Required. Has definition for data in this query.