Exports - Get Execution History
The operation to get the run history of an export for the defined scope and export name.
GET https://management.azure.com/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory?api-version=2024-08-01
Name | In | Required | Type | Description |
---|---|---|---|---|
export
|
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 |
The API version to use for this operation. |
Name | Type | Description |
---|---|---|
200 OK |
OK. The request has succeeded. |
|
Other Status Codes |
Error response describing why the operation failed. |
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/{billingAccount-id}/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
}
]
}
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
}
]
}
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
}
]
}
Sample request
GET https://management.azure.com/providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
},
{
"id": "providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledForTestExport/TestExportSchedule/20180729-20180804/TestExportSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
}
]
}
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
},
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
}
]
}
Sample request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
},
{
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"runSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "exports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"definition": {
"type": "ActualCost",
"timeframe": "Custom",
"timePeriod": {
"from": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z"
},
"dataSet": {
"granularity": "Daily",
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity"
]
}
}
}
}
}
}
]
}
Name | Description |
---|---|
Common |
The common properties of the export. |
Error |
The details of the error. |
Error |
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:
|
Execution |
The last known status of the export run. |
Execution |
The type of the export run. |
Export |
The definition for data in the export. |
Export |
The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns. |
Export |
The definition of an export. |
Export |
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 ). |
Export |
The delivery information associated with a export. |
Export |
Result of listing the run history of an export. |
Export |
An export run. |
Export |
The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months. |
Export |
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. |
Format |
The format of the export being delivered. Currently only 'Csv' is supported. |
Granularity |
The granularity of rows in the export. Currently only 'Daily' is supported. |
Timeframe |
The time frame for pulling data for the export. If custom, then a specific time period must be provided. |
The common properties of the export.
Name | Type | Description |
---|---|---|
definition |
Has the definition for the export. |
|
deliveryInfo |
Has delivery information for the export. |
|
format |
The format of the export being delivered. Currently only 'Csv' is supported. |
|
nextRunTimeEstimate |
string |
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. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes. |
runHistory |
If requested, has the most recent run history for the export. |
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
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 |
The details of the error. |
The last known status of the export run.
Value | Description |
---|---|
Completed | |
DataNotAvailable | |
Failed | |
InProgress | |
NewDataNotAvailable | |
Queued | |
Timeout |
The type of the export run.
Value | Description |
---|---|
OnDemand | |
Scheduled |
The definition for data in the export.
Name | Type | Description |
---|---|---|
configuration |
The export dataset configuration. |
|
granularity |
The granularity of rows in the export. Currently only 'Daily' is supported. |
The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.
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). |
The definition of an export.
Name | Type | Description |
---|---|---|
dataSet |
The definition for data in the export. |
|
timePeriod |
Has time period for pulling data for the export. |
|
timeframe |
The time frame for pulling data for the export. If custom, then a specific time period must be provided. |
|
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. |
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. |
The delivery information associated with a export.
Name | Type | Description |
---|---|---|
destination |
Has destination for the export being delivered. |
Result of listing the run history of an export.
Name | Type | Description |
---|---|---|
value |
A list of export runs. |
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.error |
The details of any error. |
|
properties.executionType |
The type of the export run. |
|
properties.fileName |
string |
The name of the exported file. |
properties.processingEndTime |
string |
The time when the export run finished. |
properties.processingStartTime |
string |
The time when export was picked up to be run. |
properties.runSettings |
The export settings that were in effect for this run. |
|
properties.status |
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 |
The time when export was queued to be run. |
type |
string |
Resource type. |
The date range for data in the export. This should only be specified with timeFrame set to 'Custom'. The maximum date range is 3 months.
Name | Type | Description |
---|---|---|
from |
string |
The start date for export data. |
to |
string |
The end date for export data. |
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 | |
Usage |
The format of the export being delivered. Currently only 'Csv' is supported.
Value | Description |
---|---|
Csv |
The granularity of rows in the export. Currently only 'Daily' is supported.
Value | Description |
---|---|
Daily |
The time frame for pulling data for the export. If custom, then a specific time period must be provided.
Value | Description |
---|---|
BillingMonthToDate | |
Custom | |
MonthToDate | |
TheLastBillingMonth | |
TheLastMonth | |
WeekToDate |