Share via


Exports - Create Or Update

The operation to create or update a export. Update operation requires latest eTag to be set in the request. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.

PUT https://management.azure.com/{scope}/providers/Microsoft.CostManagement/exports/{exportName}?api-version=2025-03-01

URI Parameters

Name In Required Type Description
exportName
path True

string

Export Name.

scope
path True

string

The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/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}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
properties.definition True

ExportDefinition

Has the definition for the export.

properties.deliveryInfo True

ExportDeliveryInfo

Has delivery information for the export.

eTag

string

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.

identity

SystemAssignedServiceIdentity

The managed identity associated with Export

location

string

The location of the Export's managed identity. Only required when utilizing managed identity.

properties.compressionMode

CompressionModeType

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.

properties.dataOverwriteBehavior

DataOverwriteBehaviorType

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.

properties.exportDescription

string

The export description set by customer at time of export creation/update.

properties.format

FormatType

The format of the export being delivered.

properties.partitionData

boolean

If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.

properties.runHistory

ExportExecutionListResult

If requested, has the most recent run history for the export.

properties.schedule

ExportSchedule

Has schedule information for the export.

Responses

Name Type Description
200 OK

Export

OK. The request has succeeded.

201 Created

Export

Created.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ExportCreateOrUpdateByBillingAccount
ExportCreateOrUpdateByBillingAccountCustom
ExportCreateOrUpdateByBillingAccountMonthly
ExportCreateOrUpdateByBillingAccountPricesheet
ExportCreateOrUpdateByBillingAccountReservationDetails
ExportCreateOrUpdateByBillingAccountReservationRecommendation
ExportCreateOrUpdateByDepartment
ExportCreateOrUpdateByEnrollmentAccount
ExportCreateOrUpdateByManagementGroup
ExportCreateOrUpdateByResourceGroup
ExportCreateOrUpdateBySubscription
ExportCreateOrUpdateExportCreateOrUpdateByBillingAccountReservationTransactionsByBillingAccount

ExportCreateOrUpdateByBillingAccount

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByBillingAccountCustom

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Inactive"
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "Custom",
      "timePeriod": {
        "from": "2025-04-03T00:00:00.000Z",
        "to": "2025-04-03T00:00:00.000Z"
      },
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Inactive",
      "recurrence": "None"
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "Custom",
      "timePeriod": {
        "from": "2025-04-03T00:00:00Z",
        "to": "2025-04-03T00:00:00Z"
      },
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Inactive",
      "recurrence": "None"
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "Custom",
      "timePeriod": {
        "from": "2025-04-03T00:00:00Z",
        "to": "2025-04-03T00:00:00Z"
      },
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByBillingAccountMonthly

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Monthly",
      "recurrencePeriod": {
        "from": "2020-06-05T00:00:00Z",
        "to": "2030-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "TheLastMonth",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Monthly",
      "recurrencePeriod": {
        "from": "2020-06-05T00:00:00Z",
        "to": "2030-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-05T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "TheLastMonth",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Monthly",
      "recurrencePeriod": {
        "from": "2020-06-05T00:00:00Z",
        "to": "2030-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-05T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "TheLastMonth",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByBillingAccountPricesheet

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "PriceSheet",
      "timeframe": "TheCurrentMonth",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "PriceSheet",
      "timeframe": "TheCurrentMonth",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "PriceSheet",
      "timeframe": "TheCurrentMonth",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByBillingAccountReservationDetails

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "dataSet": {
        "configuration": {
          "dataVersion": "2023-03-01"
        },
        "granularity": "Daily"
      },
      "timeframe": "MonthToDate",
      "type": "ReservationDetails"
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ReservationDetails",
      "timeframe": "MonthToDate",
      "dataSet": {
        "configuration": {
          "columns": [],
          "dataVersion": "2023-03-01",
          "filters": []
        },
        "granularity": "Daily"
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ReservationDetails",
      "timeframe": "MonthToDate",
      "dataSet": {
        "configuration": {
          "columns": [],
          "dataVersion": "2023-03-01",
          "filters": []
        },
        "granularity": "Daily"
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByBillingAccountReservationRecommendation

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "dataSet": {
        "configuration": {
          "dataVersion": "2023-05-01",
          "filters": [
            {
              "name": "ReservationScope",
              "value": "Single"
            },
            {
              "name": "ResourceType",
              "value": "VirtualMachines"
            },
            {
              "name": "LookBackPeriod",
              "value": "Last7Days"
            }
          ]
        }
      },
      "timeframe": "MonthToDate",
      "type": "ReservationRecommendations"
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ReservationRecommendations",
      "timeframe": "MonthToDate",
      "dataSet": {
        "configuration": {
          "columns": [],
          "dataVersion": "2023-05-01",
          "filters": [
            {
              "name": "ReservationScope",
              "value": "Single"
            },
            {
              "name": "ResourceType",
              "value": "VirtualMachines"
            },
            {
              "name": "LookBackPeriod",
              "value": "Last7Days"
            }
          ]
        },
        "granularity": null
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ReservationRecommendations",
      "timeframe": "MonthToDate",
      "dataSet": {
        "configuration": {
          "columns": [],
          "dataVersion": "2023-05-01",
          "filters": [
            {
              "name": "ReservationScope",
              "value": "Single"
            },
            {
              "name": "ResourceType",
              "value": "VirtualMachines"
            },
            {
              "name": "LookBackPeriod",
              "value": "Last7Days"
            }
          ]
        },
        "granularity": null
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByDepartment

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "format": "Parquet",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "snappy",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Parquet",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "snappy",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Parquet",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "snappy",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByEnrollmentAccount

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByManagementGroup

Sample request

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateByResourceGroup

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateBySubscription

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2020-06-01T00:00:00Z",
        "to": "2020-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2020-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ActualCost",
      "timeframe": "MonthToDate",
      "dataSet": {
        "granularity": "Daily",
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

ExportCreateOrUpdateExportCreateOrUpdateByBillingAccountReservationTransactionsByBillingAccount

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport?api-version=2025-03-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "type": "AzureBlob",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "dataSet": {
        "configuration": {
          "dataVersion": "2023-05-01"
        }
      },
      "timeframe": "MonthToDate",
      "type": "ReservationTransactions"
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Sample response

{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ReservationTransactions",
      "timeframe": "MonthToDate",
      "dataSet": {
        "configuration": {
          "columns": [],
          "dataVersion": "2023-05-01",
          "filters": []
        },
        "granularity": null
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}
{
  "id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport",
  "name": "TestExport",
  "type": "Microsoft.CostManagement/exports",
  "eTag": "\"00000000-0000-0000-0000-000000000000\"",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "centralus",
  "properties": {
    "schedule": {
      "status": "Active",
      "recurrence": "Daily",
      "recurrencePeriod": {
        "from": "2023-06-01T00:00:00Z",
        "to": "2023-06-30T00:00:00Z"
      }
    },
    "nextRunTimeEstimate": "2023-06-01T23:00:00Z",
    "format": "Csv",
    "deliveryInfo": {
      "destination": {
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
        "container": "exports",
        "rootFolderPath": "ad-hoc"
      }
    },
    "definition": {
      "type": "ReservationTransactions",
      "timeframe": "MonthToDate",
      "dataSet": {
        "configuration": {
          "columns": [],
          "dataVersion": "2023-05-01",
          "filters": []
        },
        "granularity": null
      }
    },
    "partitionData": true,
    "dataOverwriteBehavior": "OverwritePreviousReport",
    "compressionMode": "gzip",
    "exportDescription": "This is a test export."
  }
}

Definitions

Name Description
CommonExportProperties

The common properties of the export.

CompressionModeType

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.

DataOverwriteBehaviorType

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.

DestinationType

The export delivery destination type. Currently only 'AzureBlob' is supported.

ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

ExecutionStatus

The last known status of the export run.

ExecutionType

The type of the export run.

Export

An export resource.

ExportDataset

The definition for data in the export.

ExportDatasetConfiguration

This is on path to deprecation and will not be supported going forward.

ExportDefinition

The definition of an export.

ExportDeliveryDestination

This represents the blob storage account location where exports of costs will be delivered. There are two ways to configure the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

ExportDeliveryInfo

The delivery information associated with a export.

ExportExecutionListResult

Result of listing the run history of an export.

ExportRecurrencePeriod

The start and end date for recurrence schedule.

ExportRun

An export run.

ExportSchedule

The schedule associated with the export.

ExportSuspensionContext

The properties of the export run. This is not populated currently.

ExportTimePeriod

The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 1 calendar month.

ExportType

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.

FilterItemNames

The name of the filter. This is currently only supported for Export Definition type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', 'ResourceType']

FilterItems

Will contain the filter name and value to operate on. This is currently only supported for Export Definition type of ReservationRecommendations.

FormatType

The format of the export being delivered.

GranularityType

The granularity of rows in the export. Currently 'Daily' is supported for most cases.

RecurrenceType

The schedule recurrence.

StatusType

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.

SystemAssignedServiceIdentity

Managed service identity (either system assigned, or none)

SystemAssignedServiceIdentityType

Type of managed service identity (either system assigned, or none).

TimeframeType

The time frame for pulling data for the export. If custom, then a specific time period must be provided.

CommonExportProperties

The common properties of the export.

Name Type Description
compressionMode

CompressionModeType

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.

dataOverwriteBehavior

DataOverwriteBehaviorType

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.

definition

ExportDefinition

Has the definition for the export.

deliveryInfo

ExportDeliveryInfo

Has delivery information for the export.

exportDescription

string

The export description set by customer at time of export creation/update.

format

FormatType

The format of the export being delivered.

nextRunTimeEstimate

string (date-time)

If the export has an active schedule, provides an estimate of the next run time.

partitionData

boolean

If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.

runHistory

ExportExecutionListResult

If requested, has the most recent run history for the export.

systemSuspensionContext

ExportSuspensionContext

The export suspension reason if export is in SystemSuspended state. This is not populated currently.

CompressionModeType

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.

Value Description
gzip
none
snappy

DataOverwriteBehaviorType

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.

Value Description
CreateNewReport
OverwritePreviousReport

DestinationType

The export delivery destination type. Currently only 'AzureBlob' is supported.

Value Description
AzureBlob

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

Name Type Description
error

ErrorDetails

The details of the error.

ExecutionStatus

The last known status of the export run.

Value Description
Completed
DataNotAvailable
Failed
InProgress
NewDataNotAvailable
Queued
Timeout

ExecutionType

The type of the export run.

Value Description
OnDemand
Scheduled

Export

An export resource.

Name Type Description
eTag

string

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.

id

string

Resource Id.

identity

SystemAssignedServiceIdentity

The managed identity associated with Export

location

string

The location of the Export's managed identity. Only required when utilizing managed identity.

name

string

Resource name.

properties.compressionMode

CompressionModeType

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.

properties.dataOverwriteBehavior

DataOverwriteBehaviorType

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.

properties.definition

ExportDefinition

Has the definition for the export.

properties.deliveryInfo

ExportDeliveryInfo

Has delivery information for the export.

properties.exportDescription

string

The export description set by customer at time of export creation/update.

properties.format

FormatType

The format of the export being delivered.

properties.nextRunTimeEstimate

string (date-time)

If the export has an active schedule, provides an estimate of the next run time.

properties.partitionData

boolean

If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file.

properties.runHistory

ExportExecutionListResult

If requested, has the most recent run history for the export.

properties.schedule

ExportSchedule

Has schedule information for the export.

properties.systemSuspensionContext

ExportSuspensionContext

The export suspension reason if export is in SystemSuspended state. This is not populated currently.

type

string

Resource type.

ExportDataset

The definition for data in the export.

Name Type Description
configuration

ExportDatasetConfiguration

The export dataset configuration.

granularity

GranularityType

The granularity of rows in the export. Currently 'Daily' is supported for most cases.

ExportDatasetConfiguration

This is on path to deprecation and will not be supported going forward.

Name Type Description
columns

string[]

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).

dataVersion

string

The data version for the selected for the export. If not provided then the export will default to latest data version.

filters

FilterItems[]

Filters associated with the data sets.

ExportDefinition

The definition of an export.

Name Type Description
dataSet

ExportDataset

The definition for data in the export.

timePeriod

ExportTimePeriod

Has time period for pulling data for the export.

timeframe

TimeframeType

The time frame for pulling data for the export. If custom, then a specific time period must be provided.

type

ExportType

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.

ExportDeliveryDestination

This represents the blob storage account location where exports of costs will be delivered. There are two ways to configure the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key ).

Name Type Description
container

string

The name of the container where exports will be uploaded. If the container does not exist it will be created.

resourceId

string

The resource id of the storage account where exports will be delivered. This is not required if a sasToken and storageAccount are specified.

rootFolderPath

string

The name of the directory where exports will be uploaded.

sasToken

string

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.

storageAccount

string

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.

type

DestinationType

The export delivery destination type. Currently only 'AzureBlob' is supported.

ExportDeliveryInfo

The delivery information associated with a export.

Name Type Description
destination

ExportDeliveryDestination

Has destination for the export being delivered.

ExportExecutionListResult

Result of listing the run history of an export.

Name Type Description
value

ExportRun[]

A list of export runs.

ExportRecurrencePeriod

The start and end date for recurrence schedule.

Name Type Description
from

string (date-time)

The start date of recurrence.

to

string (date-time)

The end date of recurrence.

ExportRun

An export run.

Name Type Description
eTag

string

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.

id

string

Resource Id.

name

string

Resource name.

properties.endDate

string (date-time)

The end datetime for the export.

properties.error

ErrorDetails

The details of any error.

properties.executionType

ExecutionType

The type of the export run.

properties.fileName

string

The name of the exported file.

properties.manifestFile

string

The manifest file location(URI location) for the exported files.

properties.processingEndTime

string (date-time)

The time when the export run finished.

properties.processingStartTime

string (date-time)

The time when export was picked up to be run.

properties.runSettings

CommonExportProperties

The export settings that were in effect for this run.

properties.startDate

string (date-time)

The start datetime for the export.

properties.status

ExecutionStatus

The last known status of the export run.

properties.submittedBy

string

The identifier for the entity that triggered the export. For on-demand runs it is the user email. For scheduled runs it is 'System'.

properties.submittedTime

string (date-time)

The time when export was queued to be run.

type

string

Resource type.

ExportSchedule

The schedule associated with the export.

Name Type Description
recurrence

RecurrenceType

The schedule recurrence.

recurrencePeriod

ExportRecurrencePeriod

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.

status

StatusType

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.

ExportSuspensionContext

The properties of the export run. This is not populated currently.

Name Type Description
suspensionCode

string

The code for export suspension.

suspensionReason

string

The detailed reason for export suspension.

suspensionTime

string (date-time)

The time when the export was suspended.

ExportTimePeriod

The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 1 calendar month.

Name Type Description
from

string (date-time)

The start date for export data.

to

string (date-time)

The end date for export data.

ExportType

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.

Value Description
ActualCost
AmortizedCost
FocusCost
PriceSheet
ReservationDetails
ReservationRecommendations
ReservationTransactions
Usage

FilterItemNames

The name of the filter. This is currently only supported for Export Definition type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', 'ResourceType']

Value Description
LookBackPeriod
ReservationScope
ResourceType

FilterItems

Will contain the filter name and value to operate on. This is currently only supported for Export Definition type of ReservationRecommendations.

Name Type Description
name

FilterItemNames

The name of the filter. This is currently only supported for Export Definition type of ReservationRecommendations. Supported names are ['ReservationScope', 'LookBackPeriod', 'ResourceType']

value

string

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'].

FormatType

The format of the export being delivered.

Value Description
Csv
Parquet

GranularityType

The granularity of rows in the export. Currently 'Daily' is supported for most cases.

Value Description
Daily
Monthly

RecurrenceType

The schedule recurrence.

Value Description
Annually
Daily
Monthly
Weekly

StatusType

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.

Value Description
Active
Inactive

SystemAssignedServiceIdentity

Managed service identity (either system assigned, or none)

Name Type Description
principalId

string (uuid)

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string (uuid)

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

SystemAssignedServiceIdentityType

Type of managed service identity (either system assigned, or none).

SystemAssignedServiceIdentityType

Type of managed service identity (either system assigned, or none).

Value Description
None
SystemAssigned

TimeframeType

The time frame for pulling data for the export. If custom, then a specific time period must be provided.

Value Description
BillingMonthToDate
Custom
MonthToDate
TheCurrentMonth
TheLastBillingMonth
TheLastMonth
WeekToDate