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

Reservation Transactions - List

计费帐户范围内预留实例的事务列表。 注意:退款交易与其购买交易一起发布(即在购买计费月份)。 例如,退款是在 2021 年 5 月请求的。 此退款交易的日期为 2021 年 5 月,但预订购买时的计费月份为 2020 年 4 月。 注意:ARM 的有效负载大小限制为 12MB,因此,当响应大小超过 ARM 限制时,当前调用方将获得 400。 在这种情况下,应使用较小的日期范围进行 API 调用。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01&$filter={$filter}&useMarkupIfPartner={useMarkupIfPartner}&previewMarkupPercentage={previewMarkupPercentage}

URI 参数

名称 必需 类型 说明
billingAccountId
path True

string

计费帐户 ID

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

$filter
query

string

按日期范围筛选预留事务。 开始日期和结束日期的属性/EventDate。 筛选器支持“le”和“ge”。 注意:API 返回整个开始日期和结束日期计费月的数据。 例如,筛选器属性/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 将包含整个 2020 年 12 月的数据(即将包含日期 12 月 30 和 31 日的记录)

previewMarkupPercentage
query

number (decimal)

要应用的预览标记百分比。

useMarkupIfPartner
query

boolean

如果调用方是合作伙伴,则应用对事务进行标记。

响应

名称 类型 说明
200 OK

ReservationTransactionsListResult

请求已成功。

Other Status Codes

ErrorResponse

意外错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

ReservationTransactionsByEnrollmentNumber

示例请求

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01&$filter=properties/eventDate+ge+2020-05-20+AND+properties/eventDate+le+2020-05-30&useMarkupIfPartner=True&previewMarkupPercentage=15.5

示例响应

{
  "value": [
    {
      "name": "201909091919",
      "type": "Microsoft.Consumption/reservationTransactions",
      "id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
      "properties": {
        "description": "Standard_DS1_v2 westus 1 Year",
        "accountName": "Microsoft Infrastructure",
        "accountOwnerEmail": "admin@microsoft.com",
        "amount": -21,
        "armSkuName": "Standard_DS1_v2",
        "billingFrequency": "recurring",
        "billingMonth": 20190901,
        "costCenter": "",
        "currency": "USD",
        "currentEnrollment": "123456",
        "departmentName": "Unassigned",
        "eventDate": "2019-09-09T19:19:04Z",
        "eventType": "Refund",
        "monetaryCommitment": 523123.9,
        "overage": 23234.49,
        "purchasingEnrollment": "123456",
        "purchasingSubscriptionGuid": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
        "purchasingSubscriptionName": "Infrastructure Subscription",
        "quantity": 1,
        "region": "westus",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservationOrderName": "Transaction-DS1_v2",
        "term": "P1Y"
      },
      "tags": []
    },
    {
      "name": "201909091919",
      "type": "Microsoft.Consumption/reservationTransactions",
      "id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
      "properties": {
        "description": "Standard_DS1_v2 westus 1 Year",
        "accountName": "Microsoft Infrastructure",
        "accountOwnerEmail": "admin@microsoft.com",
        "amount": 21,
        "armSkuName": "Standard_DS1_v2",
        "billingFrequency": "recurring",
        "billingMonth": 20190901,
        "costCenter": "",
        "currency": "USD",
        "currentEnrollment": "123456",
        "departmentName": "Unassigned",
        "eventDate": "2019-09-09T19:19:04Z",
        "eventType": "Purchase",
        "monetaryCommitment": 523123.9,
        "overage": 23234.49,
        "purchasingEnrollment": "123456",
        "purchasingSubscriptionGuid": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
        "purchasingSubscriptionName": "Infrastructure Subscription",
        "quantity": 1,
        "region": "westus",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservationOrderName": "Transaction-DS1_v2",
        "term": "P1Y"
      },
      "tags": []
    }
  ]
}

定义

名称 说明
createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ReservationTransaction

预留事务资源。

ReservationTransactionsListResult

列出预留建议的结果。

systemData

与创建和上次修改资源相关的元数据。

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ReservationTransaction

预留事务资源。

名称 类型 说明
id

string

资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.accountName

string

进行事务的帐户的名称。

properties.accountOwnerEmail

string

发出事务的帐户所有者的电子邮件。

properties.amount

number (decimal)

事务的费用。

properties.armSkuName

string

这是 ARM Sku 名称。 它可用于在使用情况记录中的其他信息中加入 serviceType 字段。

properties.billingFrequency

string

计费频率,可以是一次性或定期计费。

properties.billingMonth

integer (int32)

事件启动的计费月份(yyyyMMdd)。

properties.costCenter

string

如果此部门是部门和成本中心,则此部门的成本中心。

properties.currency

string

用于支付交易费用的 ISO 货币,例如美元。

properties.currentEnrollment

string

当前注册。

properties.departmentName

string

部门名称。

properties.description

string

事务的说明。

properties.eventDate

string (date-time)

事务的日期

properties.eventType

string

交易的类型(购买、取消或退款)。

properties.monetaryCommitment

number (decimal)

注册范围内的货币承诺金额。

properties.overage

number (decimal)

注册范围内的超额金额。

properties.purchasingEnrollment

string

购买注册。

properties.purchasingSubscriptionGuid

string (uuid)

进行事务的订阅 GUID。

properties.purchasingSubscriptionName

string

发出事务的订阅名称。

properties.quantity

number (decimal)

事务的数量。

properties.region

string

事务的区域。

properties.reservationOrderId

string

预留订单 ID 是预留购买的标识符。 每个预留订单 ID 表示单个购买交易。 预留订单包含预留。 预留顺序指定预留的 VM 大小和区域。

properties.reservationOrderName

string

预留订单的名称。

properties.term

string

这是事务的术语。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

string[]

资源标记。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

ReservationTransactionsListResult

列出预留建议的结果。

名称 类型 说明
nextLink

string

指向下一页结果的链接(url)。

value

ReservationTransaction[]

预留建议的列表。

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。