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

Billing Subscriptions - List By Billing Account

列出计费帐户的订阅。 协议类型为 Microsoft 客户协议、Microsoft 合作伙伴协议 和 Microsoft Online Services Program 的计费帐户当前支持此操作。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions?api-version=2021-10-01

URI 参数

名称 必需 类型 说明
billingAccountName
path True

string

唯一标识计费帐户的 ID。

api-version
query True

string

要与客户端请求一起使用的 API 版本。 当前版本为 2021-10-01。

响应

名称 类型 说明
200 OK

BillingSubscriptionsListResult

没问题。 请求已成功。

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

BillingSubscriptionsListByBillingAccount

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions?api-version=2021-10-01

Sample Response

{
  "totalCount": 3,
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/418b0e9c-5dc3-4260-918f-30b90619fe07",
      "name": "418b0e9c-5dc3-4260-918f-30b90619fe07",
      "type": "Microsoft.Billing/billingAccounts/billingSubscriptions",
      "properties": {
        "autoRenew": "Off",
        "billingFrequency": "P1M",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664",
        "billingProfileDisplayName": "Contoso operations billing profile",
        "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664",
        "displayName": "Subscription 1",
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073",
        "invoiceSectionDisplayName": "Contoso operations invoice section",
        "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073",
        "lastMonthCharges": {
          "currency": "USD",
          "value": 5000
        },
        "monthToDateCharges": {
          "currency": "USD",
          "value": 600
        },
        "productCategory": "UsageBased",
        "productType": "Usage based",
        "productTypeId": "DZH318Z0BPS6",
        "purchaseDate": "2021-10-01T00:00:00Z",
        "quantity": 1,
        "skuId": "0001",
        "skuDescription": "Microsoft Azure Plan",
        "status": "Active",
        "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingSubscriptions/9e030ae5-51ed-4e02-8e17-d51b3aa55980",
      "name": "9e030ae5-51ed-4e02-8e17-d51b3aa55980",
      "type": "Microsoft.Billing/billingAccounts/billingSubscriptions",
      "properties": {
        "autoRenew": "Off",
        "billingFrequency": "P1M",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664",
        "billingProfileDisplayName": "Contoso operations billing profile",
        "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664",
        "displayName": "Subscription 2",
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd073",
        "invoiceSectionDisplayName": "Contoso operations invoice section",
        "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073",
        "lastMonthCharges": {
          "currency": "USD",
          "value": 1000
        },
        "monthToDateCharges": {
          "currency": "USD",
          "value": 400
        },
        "productCategory": "UsageBased",
        "productType": "Usage based",
        "productTypeId": "DZH318Z0BPS6",
        "purchaseDate": "2021-10-01T00:00:00Z",
        "quantity": 1,
        "skuId": "0001",
        "skuDescription": "Microsoft Azure Plan",
        "status": "Active",
        "subscriptionId": "6b96d3f2-9008-4a9d-912f-6b96d3f2"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}billingSubscriptions/7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e",
      "name": "7f271b5e-a89e-45cc-8fa5-cd5c643f8b5e",
      "type": "Microsoft.Billing/billingAccounts/billingSubscriptions",
      "properties": {
        "autoRenew": "Off",
        "billingFrequency": "P1M",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664",
        "billingProfileDisplayName": "Contoso operations billing profile",
        "billingProfileName": "2b72f936-0166-47d6-91a3-ef9f84f36664",
        "displayName": "Subscription 3",
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/2b72f936-0166-47d6-91a3-ef9f84f36664/invoiceSections/5c562559-e31b-4bfe-b608-f8b5b3fbd0730",
        "invoiceSectionDisplayName": "Contoso operations invoice section",
        "invoiceSectionName": "5c562559-e31b-4bfe-b608-f8b5b3fbd073",
        "lastMonthCharges": {
          "currency": "USD",
          "value": 6000
        },
        "monthToDateCharges": {
          "currency": "USD",
          "value": 900
        },
        "productCategory": "SeatBased",
        "productType": "Microsoft 365 Business Standard",
        "productTypeId": "CFQ7TTC0LDPB",
        "purchaseDate": "2021-08-01T00:12:49.7261677+00:00",
        "quantity": 4,
        "skuId": "0001",
        "skuDescription": "Microsoft 365 Business Standard",
        "status": "Active",
        "termDuration": "P1Y",
        "termStartDate": "2021-10-01T00:00:00Z",
        "termEndDate": "2022-09-30T00:00:00Z"
      }
    }
  ]
}

定义

名称 说明
Amount

金额。

AutoRenew

指示是打开还是关闭订阅的自动续订。

BillingSubscription

计费订阅。

BillingSubscriptionsListResult

计费订阅列表。

BillingSubscriptionStatus

订阅的状态。 此字段不适用于企业协议计费帐户。

ErrorDetails

错误的详细信息。

ErrorResponse

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

ErrorSubDetails

错误的子详细信息。

NextBillingCycleDetails

下一个计费周期订阅的详细信息。

RenewalTermDetails

续订时订阅的期限详细信息。

Reseller

经销商的详细信息。

SubscriptionEnrollmentAccountStatus

订阅的当前注册帐户状态。 此字段仅适用于企业协议计费帐户。

Amount

金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。

AutoRenew

指示是打开还是关闭订阅的自动续订。

名称 类型 说明
Off

string

On

string

BillingSubscription

计费订阅。

名称 类型 说明
id

string

资源 ID。

name

string

资源名称。

properties.autoRenew

AutoRenew

指示是打开还是关闭订阅的自动续订。

properties.beneficiaryTenantId

string

订阅的预配租户。

properties.billingFrequency

string

订阅的计费频率,采用ISO8601格式。 示例:P1M、P3M、P1Y

properties.billingPolicies

object

与订阅关联的计费策略字典。

properties.billingProfileDisplayName

string

计费对象信息的显示名称。 此字段仅适用于Microsoft 客户协议计费帐户。

properties.billingProfileId

string

计费对象为订阅的计费对象信息的 ID。 此字段仅适用于Microsoft 客户协议计费帐户。

properties.billingProfileName

string

计费对象为订阅的计费配置文件的名称。 此字段仅适用于Microsoft 客户协议计费帐户。

properties.consumptionCostCenter

string

应用于订阅的成本中心。 此字段仅适用于Microsoft 客户协议类型计费帐户的消耗订阅。

properties.customerDisplayName

string

为其创建订阅的客户的名称。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.customerId

string

为其创建订阅的客户 ID。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.customerName

string

为其创建订阅的客户的名称。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.displayName

string

订阅的名称。

properties.enrollmentAccountDisplayName

string

与订阅关联的注册帐户名称。 此字段仅适用于企业协议计费帐户。

properties.enrollmentAccountId

string

与订阅关联的注册帐户 ID。 此字段仅适用于企业协议计费帐户。

properties.enrollmentAccountSubscriptionDetails.enrollmentAccountStartDate

string

注册帐户和订阅关联开始日期。 此字段仅适用于企业协议计费帐户。

properties.enrollmentAccountSubscriptionDetails.subscriptionEnrollmentAccountStatus

SubscriptionEnrollmentAccountStatus

订阅的当前注册帐户状态。 此字段仅适用于企业协议计费帐户。

properties.invoiceSectionDisplayName

string

计费订阅的发票科目的显示名称。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.invoiceSectionId

string

计费订阅的发票科目的 ID。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.invoiceSectionName

string

计费订阅的发票科目的名称。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.lastMonthCharges

Amount

上个月的费用。 此字段仅适用于Microsoft 客户协议计费帐户的基于使用情况的订阅。

properties.monthToDateCharges

Amount

当前月份至今费用。 此字段仅适用于Microsoft 客户协议计费帐户的基于使用情况的订阅。

properties.nextBillingCycleDetails

NextBillingCycleDetails

接下来计费周期订阅的详细信息。

properties.offerId

string

订阅的产品/服务 ID。 此字段仅适用于 Microsoft Online Services 计划计费帐户。

properties.productCategory

string

为其购买订阅的产品类别。 可能的值包括:AzureSupport、Hardware、ReservationOrder、SaaS、SavingsPlanOrder、Software、UsageBased、Other

properties.productType

string

为其购买订阅的产品的类型

properties.productTypeId

string

为其购买订阅的产品的 ID

properties.purchaseDate

string

订阅的购买日期(UTC 时间)。

properties.quantity

integer

为订阅购买的许可证数

properties.renewalTermDetails

RenewalTermDetails

下次续订时订阅的期限详细信息。

properties.reseller

Reseller

为其创建订阅的经销商。 字段可用于Microsoft 合作伙伴协议计费帐户。

properties.skuDescription

string

为其购买订阅的产品的 SKU 说明。 此字段仅适用于Microsoft 客户协议计费帐户。

properties.skuId

string

为其购买订阅的产品的 SKU ID。 此字段仅适用于Microsoft 客户协议计费帐户。

properties.status

BillingSubscriptionStatus

订阅的状态。 此字段不适用于企业协议计费帐户。

properties.subscriptionId

string

基于使用情况的订阅的 ID。 此字段仅适用于Microsoft 客户协议计费帐户的基于使用情况的订阅。

properties.suspensionReasons

string[]

订阅的挂起原因。 此字段不适用于企业协议计费帐户。

properties.termDuration

string

可以使用订阅的持续时间。 示例 P1Y 和 P1M

properties.termEndDate

string

术语的结束日期(UTC 时间)。

properties.termStartDate

string

术语的开始日期(以 UTC 时间为单位)。

type

string

资源类型。

BillingSubscriptionsListResult

计费订阅列表。

名称 类型 说明
nextLink

string

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

totalCount

number

总记录数。

value

BillingSubscription[]

计费订阅列表。

BillingSubscriptionStatus

订阅的状态。 此字段不适用于企业协议计费帐户。

名称 类型 说明
Active

string

AutoRenew

string

Cancelled

string

Deleted

string

Disabled

string

Expired

string

Expiring

string

Suspended

string

Unknown

string

Warned

string

ErrorDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

details

ErrorSubDetails[]

错误的子详细信息。

message

string

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

target

string

特定错误的目标。

ErrorResponse

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

名称 类型 说明
error

ErrorDetails

错误的详细信息。

ErrorSubDetails

错误的子详细信息。

名称 类型 说明
code

string

错误代码。

message

string

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

target

string

特定错误的目标。

NextBillingCycleDetails

下一个计费周期订阅的详细信息。

名称 类型 说明
billingFrequency

string

下一计费周期订阅的计费频率。

RenewalTermDetails

续订时订阅的期限详细信息。

名称 类型 说明
billingFrequency

string

订阅的计费频率。

productTypeId

string

产品的 ID。

quantity

integer

许可证数

skuId

string

产品的 SKU ID

termDuration

string

订阅的期限持续时间。 示例 P1M 和 P1Y

Reseller

经销商的详细信息。

名称 类型 说明
description

string

经销商的名称。

resellerId

string

经销商的 MPN ID。

SubscriptionEnrollmentAccountStatus

订阅的当前注册帐户状态。 此字段仅适用于企业协议计费帐户。

名称 类型 说明
Active

string

Cancelled

string

Deleted

string

Expired

string

TransferredOut

string

Transferring

string