你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Exports - Execute

运行导出的操作。

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

URI 参数

名称 必需 类型 说明
exportName
path True

string

导出名称。

scope
path True

string

资源的完全限定的 Azure 资源管理器标识符。

api-version
query True

string

minLength: 1

用于此操作的 API 版本。

请求正文

名称 类型 说明
timePeriod

ExportTimePeriod

具有为导出拉取数据的时间段。

响应

名称 类型 说明
200 OK

请求已成功。

Other Status Codes

ErrorResponse

意外错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

ExportRunByBillingAccount
ExportRunByBillingAccountWithOptionalRequestBody
ExportRunByDepartment
ExportRunByEnrollmentAccount
ExportRunByManagementGroup
ExportRunByResourceGroup
ExportRunBySubscription

ExportRunByBillingAccount

示例请求

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

示例响应

ExportRunByBillingAccountWithOptionalRequestBody

示例请求

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

示例响应

ExportRunByDepartment

示例请求

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

示例响应

ExportRunByEnrollmentAccount

示例请求

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

示例响应

ExportRunByManagementGroup

示例请求

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

示例响应

ExportRunByResourceGroup

示例请求

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

示例响应

ExportRunBySubscription

示例请求

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

示例响应

定义

名称 说明
ErrorDetails

错误的详细信息。

ErrorResponse

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。 \n\n一些错误响应:\n\n * 429 TooManyRequests - 请求被限速。 等待“x-ms-ratelimit-microsoft.consumption-retry-after”标头中指定的时间后重试。 \n\n * 503 服务不可用 - 服务暂时不可用。 在等待“Retry-After”标头中指定的时间后重试。

ExportRunRequest

导出运行请求。

ExportTimePeriod

导出中的数据的日期范围。 这只能指定时间帧设置为“Custom”。 最大日期范围为 1 个日历月。

ErrorDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

message

string

指示操作失败的原因的错误消息。

ErrorResponse

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。 \n\n一些错误响应:\n\n * 429 TooManyRequests - 请求被限速。 等待“x-ms-ratelimit-microsoft.consumption-retry-after”标头中指定的时间后重试。 \n\n * 503 服务不可用 - 服务暂时不可用。 在等待“Retry-After”标头中指定的时间后重试。

名称 类型 说明
error

ErrorDetails

错误的详细信息。

ExportRunRequest

导出运行请求。

名称 类型 说明
timePeriod

ExportTimePeriod

具有为导出拉取数据的时间段。

ExportTimePeriod

导出中的数据的日期范围。 这只能指定时间帧设置为“Custom”。 最大日期范围为 1 个日历月。

名称 类型 说明
from

string (date-time)

导出数据的开始日期。

to

string (date-time)

导出数据的结束日期。