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

Scheduled Actions - Run By Scope

在给定范围内运行共享的计划操作。

POST https://management.azure.com/{scope}/providers/Microsoft.CostManagement/scheduledActions/{name}/execute?api-version=2024-08-01

URI 参数

名称 必需 类型 说明
name
path True

string

计划的操作名称。

scope
path True

string

与计划操作操作关联的范围。 这包括订阅范围的“subscriptions/{subscriptionId}”、resourceGroup 范围的“subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}”、 “providers/Microsoft.Billing/billingAccounts/{billingAccountId}” for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{EnrollmentAccount 范围的 enrollmentAccountId},“providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}” for BillingProfile scope, “providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}” for InvoiceSection scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft' 。外部订阅范围的 CostManagement/externalSubscriptions/{externalSubscriptionName}' 。 注意:见解警报仅适用于订阅范围。

api-version
query True

string

用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

还行。 请求已成功。 可能需要长达一小时才能接收成本分析信息。

Other Status Codes

ErrorResponseWithNestedDetails

描述操作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

ScheduledActionRunByScope

示例请求

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/monthlyCostByResource/execute?api-version=2024-08-01

示例响应

定义

名称 说明
ErrorDetailsWithNestedDetails

错误的详细信息。

ErrorResponseWithNestedDetails

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。

一些错误响应:

  • 429 TooManyRequests - 请求受到限制。 等待“x-ms-ratelimit-microsoft.consumption-retry-after”标头中指定的时间后重试。

  • 503 ServiceUnavailable - 服务暂时不可用。 在等待“Retry-After”标头中指定的时间后重试。

ErrorDetailsWithNestedDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

details

ErrorDetailsWithNestedDetails[]

错误的其他详细信息。

message

string

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

ErrorResponseWithNestedDetails

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。

一些错误响应:

  • 429 TooManyRequests - 请求受到限制。 等待“x-ms-ratelimit-microsoft.consumption-retry-after”标头中指定的时间后重试。

  • 503 ServiceUnavailable - 服务暂时不可用。 在等待“Retry-After”标头中指定的时间后重试。

名称 类型 说明
error

ErrorDetailsWithNestedDetails

错误的详细信息。