Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The exports resource type can be deployed with operations that target:
- Tenant - See tenant deployment commands* Management groups - See management group deployment commands* Subscription - See subscription deployment commands* Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.CostManagement/exports resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.CostManagement/exports@2025-03-01' = {
scope: resourceSymbolicName or scope
eTag: 'string'
identity: {
type: 'string'
}
location: 'string'
name: 'string'
properties: {
compressionMode: 'string'
dataOverwriteBehavior: 'string'
definition: {
dataSet: {
configuration: {
columns: [
'string'
]
dataVersion: 'string'
filters: [
{
name: 'string'
value: 'string'
}
]
}
granularity: 'string'
}
timeframe: 'string'
timePeriod: {
from: 'string'
to: 'string'
}
type: 'string'
}
deliveryInfo: {
destination: {
container: 'string'
resourceId: 'string'
rootFolderPath: 'string'
sasToken: 'string'
storageAccount: 'string'
type: 'string'
}
}
exportDescription: 'string'
format: 'string'
partitionData: bool
runHistory: {}
schedule: {
recurrence: 'string'
recurrencePeriod: {
from: 'string'
to: 'string'
}
status: 'string'
}
}
}
Property Values
Microsoft.CostManagement/exports
| Name | Description | Value |
|---|---|---|
| eTag | 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. | string |
| identity | The managed identity associated with Export | SystemAssignedServiceIdentity |
| location | The location of the Export's managed identity. Only required when utilizing managed identity. | string |
| name | The resource name | string (required) |
| properties | The properties of the export. | ExportProperties |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
ExportDataset
| Name | Description | Value |
|---|---|---|
| configuration | The export dataset configuration. | ExportDatasetConfiguration |
| granularity | The granularity of rows in the export. Currently 'Daily' is supported for most cases. | 'Daily' 'Monthly' |
ExportDatasetConfiguration
| Name | Description | Value |
|---|---|---|
| columns | Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples). | string[] |
| dataVersion | The data version for the selected for the export. If not provided then the export will default to latest data version. | string |
| filters | Filters associated with the data sets. | FilterItems[] |
ExportDefinition
| Name | Description | Value |
|---|---|---|
| dataSet | The definition for data in the export. | ExportDataset |
| timeframe | The time frame for pulling data for the export. If custom, then a specific time period must be provided. | 'BillingMonthToDate' 'Custom' 'MonthToDate' 'TheCurrentMonth' 'TheLastBillingMonth' 'TheLastMonth' 'WeekToDate' (required) |
| timePeriod | Has time period for pulling data for the export. | ExportTimePeriod |
| type | The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. | 'ActualCost' 'AmortizedCost' 'FocusCost' 'PriceSheet' 'ReservationDetails' 'ReservationRecommendations' 'ReservationTransactions' 'Usage' (required) |
ExportDeliveryDestination
| Name | Description | Value |
|---|---|---|
| container | The name of the container where exports will be uploaded. If the container does not exist it will be created. | string (required) |
| resourceId | The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified. | string |
| rootFolderPath | The name of the directory where exports will be uploaded. | string |
| sasToken | A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified. | string Constraints: Sensitive value. Pass in as a secure parameter. |
| storageAccount | The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId. | string |
| type | The export delivery destination type. Currently only 'AzureBlob' is supported. | 'AzureBlob' |
ExportDeliveryInfo
| Name | Description | Value |
|---|---|---|
| destination | Has destination for the export being delivered. | ExportDeliveryDestination (required) |
ExportExecutionListResult
| Name | Description | Value |
|---|
ExportProperties
| Name | Description | Value |
|---|---|---|
| compressionMode | Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet. | 'gzip' 'none' 'snappy' |
| dataOverwriteBehavior | Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport. | 'CreateNewReport' 'OverwritePreviousReport' |
| definition | Has the definition for the export. | ExportDefinition (required) |
| deliveryInfo | Has delivery information for the export. | ExportDeliveryInfo (required) |
| exportDescription | The export description set by customer at time of export creation/update. | string |
| format | The format of the export being delivered. | 'Csv' 'Parquet' |
| partitionData | If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. | bool |
| runHistory | If requested, has the most recent run history for the export. | ExportExecutionListResult |
| schedule | Has schedule information for the export. | ExportSchedule |
ExportRecurrencePeriod
| Name | Description | Value |
|---|---|---|
| from | The start date of recurrence. | string (required) |
| to | The end date of recurrence. | string |
ExportSchedule
| Name | Description | Value |
|---|---|---|
| recurrence | The schedule recurrence. | 'Annually' 'Daily' 'Monthly' 'Weekly' |
| recurrencePeriod | Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. | ExportRecurrencePeriod |
| status | The status of the export's schedule. If 'Inactive', the export's schedule is paused. To enable export set the status to be Active and then make a PUT request. | 'Active' 'Inactive' |
ExportTimePeriod
| Name | Description | Value |
|---|---|---|
| from | The start date for export data. | string (required) |
| to | The end date for export data. | string (required) |
FilterItems
| Name | Description | Value |
|---|---|---|
| name | The name of the filter. This is currently only supported for Export Definition type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', 'ResourceType'] | 'LookBackPeriod' 'ReservationScope' 'ResourceType' |
| value | Value to filter by. Currently values supported per name are, for 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. | string |
SystemAssignedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (either system assigned, or none). | 'None' 'SystemAssigned' (required) |
ARM template resource definition
The exports resource type can be deployed with operations that target:
- Tenant - See tenant deployment commands* Management groups - See management group deployment commands* Subscription - See subscription deployment commands* Resource groups - See resource group deployment commands For a list of changed properties in each API version, see change log.
Usage Examples
Resource format
To create a Microsoft.CostManagement/exports resource, add the following JSON to your template.
{
"type": "Microsoft.CostManagement/exports",
"apiVersion": "2025-03-01",
"name": "string",
"eTag": "string",
"identity": {
"type": "string"
},
"location": "string",
"properties": {
"compressionMode": "string",
"dataOverwriteBehavior": "string",
"definition": {
"dataSet": {
"configuration": {
"columns": [ "string" ],
"dataVersion": "string",
"filters": [
{
"name": "string",
"value": "string"
}
]
},
"granularity": "string"
},
"timeframe": "string",
"timePeriod": {
"from": "string",
"to": "string"
},
"type": "string"
},
"deliveryInfo": {
"destination": {
"container": "string",
"resourceId": "string",
"rootFolderPath": "string",
"sasToken": "string",
"storageAccount": "string",
"type": "string"
}
},
"exportDescription": "string",
"format": "string",
"partitionData": "bool",
"runHistory": {
},
"schedule": {
"recurrence": "string",
"recurrencePeriod": {
"from": "string",
"to": "string"
},
"status": "string"
}
}
}
Property Values
Microsoft.CostManagement/exports
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-03-01' |
| eTag | 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. | string |
| identity | The managed identity associated with Export | SystemAssignedServiceIdentity |
| location | The location of the Export's managed identity. Only required when utilizing managed identity. | string |
| name | The resource name | string (required) |
| properties | The properties of the export. | ExportProperties |
| type | The resource type | 'Microsoft.CostManagement/exports' |
ExportDataset
| Name | Description | Value |
|---|---|---|
| configuration | The export dataset configuration. | ExportDatasetConfiguration |
| granularity | The granularity of rows in the export. Currently 'Daily' is supported for most cases. | 'Daily' 'Monthly' |
ExportDatasetConfiguration
| Name | Description | Value |
|---|---|---|
| columns | Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples). | string[] |
| dataVersion | The data version for the selected for the export. If not provided then the export will default to latest data version. | string |
| filters | Filters associated with the data sets. | FilterItems[] |
ExportDefinition
| Name | Description | Value |
|---|---|---|
| dataSet | The definition for data in the export. | ExportDataset |
| timeframe | The time frame for pulling data for the export. If custom, then a specific time period must be provided. | 'BillingMonthToDate' 'Custom' 'MonthToDate' 'TheCurrentMonth' 'TheLastBillingMonth' 'TheLastMonth' 'WeekToDate' (required) |
| timePeriod | Has time period for pulling data for the export. | ExportTimePeriod |
| type | The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. | 'ActualCost' 'AmortizedCost' 'FocusCost' 'PriceSheet' 'ReservationDetails' 'ReservationRecommendations' 'ReservationTransactions' 'Usage' (required) |
ExportDeliveryDestination
| Name | Description | Value |
|---|---|---|
| container | The name of the container where exports will be uploaded. If the container does not exist it will be created. | string (required) |
| resourceId | The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified. | string |
| rootFolderPath | The name of the directory where exports will be uploaded. | string |
| sasToken | A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified. | string Constraints: Sensitive value. Pass in as a secure parameter. |
| storageAccount | The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId. | string |
| type | The export delivery destination type. Currently only 'AzureBlob' is supported. | 'AzureBlob' |
ExportDeliveryInfo
| Name | Description | Value |
|---|---|---|
| destination | Has destination for the export being delivered. | ExportDeliveryDestination (required) |
ExportExecutionListResult
| Name | Description | Value |
|---|
ExportProperties
| Name | Description | Value |
|---|---|---|
| compressionMode | Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet. | 'gzip' 'none' 'snappy' |
| dataOverwriteBehavior | Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport. | 'CreateNewReport' 'OverwritePreviousReport' |
| definition | Has the definition for the export. | ExportDefinition (required) |
| deliveryInfo | Has delivery information for the export. | ExportDeliveryInfo (required) |
| exportDescription | The export description set by customer at time of export creation/update. | string |
| format | The format of the export being delivered. | 'Csv' 'Parquet' |
| partitionData | If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. | bool |
| runHistory | If requested, has the most recent run history for the export. | ExportExecutionListResult |
| schedule | Has schedule information for the export. | ExportSchedule |
ExportRecurrencePeriod
| Name | Description | Value |
|---|---|---|
| from | The start date of recurrence. | string (required) |
| to | The end date of recurrence. | string |
ExportSchedule
| Name | Description | Value |
|---|---|---|
| recurrence | The schedule recurrence. | 'Annually' 'Daily' 'Monthly' 'Weekly' |
| recurrencePeriod | Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. | ExportRecurrencePeriod |
| status | The status of the export's schedule. If 'Inactive', the export's schedule is paused. To enable export set the status to be Active and then make a PUT request. | 'Active' 'Inactive' |
ExportTimePeriod
| Name | Description | Value |
|---|---|---|
| from | The start date for export data. | string (required) |
| to | The end date for export data. | string (required) |
FilterItems
| Name | Description | Value |
|---|---|---|
| name | The name of the filter. This is currently only supported for Export Definition type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', 'ResourceType'] | 'LookBackPeriod' 'ReservationScope' 'ResourceType' |
| value | Value to filter by. Currently values supported per name are, for 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. | string |
SystemAssignedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (either system assigned, or none). | 'None' 'SystemAssigned' (required) |
Terraform (AzAPI provider) resource definition
The exports resource type can be deployed with operations that target:
- Tenant* Management groups* Subscription* Resource groups For a list of changed properties in each API version, see change log.
Usage Examples
Terraform Samples
A basic example of deploying Azure Cost Management Export.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westus"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "storageAccount" {
type = "Microsoft.Storage/storageAccounts@2023-05-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
kind = "StorageV2"
properties = {
accessTier = "Hot"
allowBlobPublicAccess = false
allowCrossTenantReplication = false
allowSharedKeyAccess = true
defaultToOAuthAuthentication = false
dnsEndpointType = "Standard"
encryption = {
keySource = "Microsoft.Storage"
services = {
blob = {
enabled = true
keyType = "Account"
}
file = {
enabled = true
keyType = "Account"
}
}
}
isHnsEnabled = false
isLocalUserEnabled = true
isNfsV3Enabled = false
isSftpEnabled = false
minimumTlsVersion = "TLS1_2"
networkAcls = {
bypass = "AzureServices"
defaultAction = "Allow"
ipRules = []
resourceAccessRules = []
virtualNetworkRules = []
}
publicNetworkAccess = "Enabled"
supportsHttpsTrafficOnly = true
}
sku = {
name = "Standard_LRS"
}
}
}
resource "azapi_resource" "export" {
type = "Microsoft.CostManagement/exports@2023-08-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
body = {
properties = {
definition = {
timeframe = "TheLastMonth"
type = "Usage"
dataSet = {
granularity = "Daily"
}
}
deliveryInfo = {
destination = {
container = "exports"
resourceId = azapi_resource.storageAccount.id
rootFolderPath = "ad-hoc"
}
}
format = "Csv"
schedule = {
recurrence = "Monthly"
recurrencePeriod = {
from = timeadd(timestamp(), "24h")
to = timeadd(timestamp(), "744h")
}
status = "Active"
}
}
}
}
Resource format
To create a Microsoft.CostManagement/exports resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.CostManagement/exports@2025-03-01"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
body = {
eTag = "string"
properties = {
compressionMode = "string"
dataOverwriteBehavior = "string"
definition = {
dataSet = {
configuration = {
columns = [
"string"
]
dataVersion = "string"
filters = [
{
name = "string"
value = "string"
}
]
}
granularity = "string"
}
timeframe = "string"
timePeriod = {
from = "string"
to = "string"
}
type = "string"
}
deliveryInfo = {
destination = {
container = "string"
resourceId = "string"
rootFolderPath = "string"
sasToken = "string"
storageAccount = "string"
type = "string"
}
}
exportDescription = "string"
format = "string"
partitionData = bool
runHistory = {
}
schedule = {
recurrence = "string"
recurrencePeriod = {
from = "string"
to = "string"
}
status = "string"
}
}
}
}
Property Values
Microsoft.CostManagement/exports
| Name | Description | Value |
|---|---|---|
| eTag | 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. | string |
| identity | The managed identity associated with Export | SystemAssignedServiceIdentity |
| location | The location of the Export's managed identity. Only required when utilizing managed identity. | string |
| name | The resource name | string (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | The properties of the export. | ExportProperties |
| type | The resource type | "Microsoft.CostManagement/exports@2025-03-01" |
ExportDataset
| Name | Description | Value |
|---|---|---|
| configuration | The export dataset configuration. | ExportDatasetConfiguration |
| granularity | The granularity of rows in the export. Currently 'Daily' is supported for most cases. | 'Daily' 'Monthly' |
ExportDatasetConfiguration
| Name | Description | Value |
|---|---|---|
| columns | Array of column names to be included in the export. If not provided then the export will include all available columns. The available columns can vary by customer channel (see examples). | string[] |
| dataVersion | The data version for the selected for the export. If not provided then the export will default to latest data version. | string |
| filters | Filters associated with the data sets. | FilterItems[] |
ExportDefinition
| Name | Description | Value |
|---|---|---|
| dataSet | The definition for data in the export. | ExportDataset |
| timeframe | The time frame for pulling data for the export. If custom, then a specific time period must be provided. | 'BillingMonthToDate' 'Custom' 'MonthToDate' 'TheCurrentMonth' 'TheLastBillingMonth' 'TheLastMonth' 'WeekToDate' (required) |
| timePeriod | Has time period for pulling data for the export. | ExportTimePeriod |
| type | The type of the export. Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. | 'ActualCost' 'AmortizedCost' 'FocusCost' 'PriceSheet' 'ReservationDetails' 'ReservationRecommendations' 'ReservationTransactions' 'Usage' (required) |
ExportDeliveryDestination
| Name | Description | Value |
|---|---|---|
| container | The name of the container where exports will be uploaded. If the container does not exist it will be created. | string (required) |
| resourceId | The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified. | string |
| rootFolderPath | The name of the directory where exports will be uploaded. | string |
| sasToken | A SAS token for the storage account. For a restricted set of Azure customers this together with storageAccount can be specified instead of resourceId. Note: the value returned by the API for this property will always be obfuscated. Returning this same obfuscated value will not result in the SAS token being updated. To update this value a new SAS token must be specified. | string Constraints: Sensitive value. Pass in as a secure parameter. |
| storageAccount | The storage account where exports will be uploaded. For a restricted set of Azure customers this together with sasToken can be specified instead of resourceId. | string |
| type | The export delivery destination type. Currently only 'AzureBlob' is supported. | 'AzureBlob' |
ExportDeliveryInfo
| Name | Description | Value |
|---|---|---|
| destination | Has destination for the export being delivered. | ExportDeliveryDestination (required) |
ExportExecutionListResult
| Name | Description | Value |
|---|
ExportProperties
| Name | Description | Value |
|---|---|---|
| compressionMode | Allow customers to select compress data for exports. This setting will enable destination file compression scheme at runtime. By default set to None. Gzip is for csv and snappy for parquet. | 'gzip' 'none' 'snappy' |
| dataOverwriteBehavior | Allow customers to select overwrite data(OverwritePreviousReport) for exports. This setting will enable overwrite data for the same month in customer storage account. By default set to CreateNewReport. | 'CreateNewReport' 'OverwritePreviousReport' |
| definition | Has the definition for the export. | ExportDefinition (required) |
| deliveryInfo | Has delivery information for the export. | ExportDeliveryInfo (required) |
| exportDescription | The export description set by customer at time of export creation/update. | string |
| format | The format of the export being delivered. | 'Csv' 'Parquet' |
| partitionData | If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. | bool |
| runHistory | If requested, has the most recent run history for the export. | ExportExecutionListResult |
| schedule | Has schedule information for the export. | ExportSchedule |
ExportRecurrencePeriod
| Name | Description | Value |
|---|---|---|
| from | The start date of recurrence. | string (required) |
| to | The end date of recurrence. | string |
ExportSchedule
| Name | Description | Value |
|---|---|---|
| recurrence | The schedule recurrence. | 'Annually' 'Daily' 'Monthly' 'Weekly' |
| recurrencePeriod | Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date. | ExportRecurrencePeriod |
| status | The status of the export's schedule. If 'Inactive', the export's schedule is paused. To enable export set the status to be Active and then make a PUT request. | 'Active' 'Inactive' |
ExportTimePeriod
| Name | Description | Value |
|---|---|---|
| from | The start date for export data. | string (required) |
| to | The end date for export data. | string (required) |
FilterItems
| Name | Description | Value |
|---|---|---|
| name | The name of the filter. This is currently only supported for Export Definition type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', 'ResourceType'] | 'LookBackPeriod' 'ReservationScope' 'ResourceType' |
| value | Value to filter by. Currently values supported per name are, for 'ReservationScope' supported values are ['Single', 'Shared'], for 'LookBackPeriod' supported values are ['Last7Days', 'Last30Days', 'Last60Days'] and for 'ResourceType' supported values are ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple']. | string |
SystemAssignedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (either system assigned, or none). | 'None' 'SystemAssigned' (required) |