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=2023-11-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

The API version to use for this operation.

Responses

Name Type Description
200 OK

ExportExecutionListResult

OK. The request has succeeded.

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

ExportRunHistoryGetByBillingAccount
ExportRunHistoryGetByDepartment
ExportRunHistoryGetByEnrollmentAccount
ExportRunHistoryGetByManagementGroup
ExportRunHistoryGetByResourceGroup
ExportRunHistoryGetBySubscription

ExportRunHistoryGetByBillingAccount

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2023-11-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"
                ]
              }
            }
          }
        }
      }
    }
  ]
}

ExportRunHistoryGetByDepartment

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12/departments/1234/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2023-11-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"
                ]
              }
            }
          }
        }
      }
    }
  ]
}

ExportRunHistoryGetByEnrollmentAccount

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2023-11-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"
                ]
              }
            }
          }
        }
      }
    }
  ]
}

ExportRunHistoryGetByManagementGroup

Sample Request

GET https://management.azure.com/providers/Microsoft.Management/managementGroups/TestMG/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2023-11-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"
                ]
              }
            }
          }
        }
      }
    }
  ]
}

ExportRunHistoryGetByResourceGroup

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2023-11-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"
                ]
              }
            }
          }
        }
      }
    }
  ]
}

ExportRunHistoryGetBySubscription

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport/runHistory?api-version=2023-11-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"
                ]
              }
            }
          }
        }
      }
    }
  ]
}

Definitions

Name Description
CommonExportProperties

The common properties of the export.

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.

ExportDataset

The definition for data in the export.

ExportDatasetConfiguration

The export dataset configuration. Allows columns to be selected for the export. If not provided then the export will include all available columns.

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.

ExportRun

An export run.

ExportTimePeriod

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.

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.

FormatType

The format of the export being delivered. Currently only 'Csv' is supported.

GranularityType

The granularity of rows in the export. Currently only 'Daily' is supported.

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
definition

ExportDefinition

Has the definition for the export.

deliveryInfo

ExportDeliveryInfo

Has delivery information for the export.

format

FormatType

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

ExportExecutionListResult

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

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.

Name Type Description
Completed

string

DataNotAvailable

string

Failed

string

InProgress

string

NewDataNotAvailable

string

Queued

string

Timeout

string

ExecutionType

The type of the export run.

Name Type Description
OnDemand

string

Scheduled

string

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 only 'Daily' is supported.

ExportDatasetConfiguration

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

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.

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.

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

string

The time when the export run finished.

properties.processingStartTime

string

The time when export was picked up to be run.

properties.runSettings

CommonExportProperties

The export settings that were in effect for this run.

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

The time when export was queued to be run.

type

string

Resource type.

ExportTimePeriod

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.

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.

Name Type Description
ActualCost

string

AmortizedCost

string

Usage

string

FormatType

The format of the export being delivered. Currently only 'Csv' is supported.

Name Type Description
Csv

string

GranularityType

The granularity of rows in the export. Currently only 'Daily' is supported.

Name Type Description
Daily

string

TimeframeType

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

Name Type Description
BillingMonthToDate

string

Custom

string

MonthToDate

string

TheLastBillingMonth

string

TheLastMonth

string

WeekToDate

string