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

Billing Subscriptions - Get By Customer

按 ID 获取订阅。 只有协议类型为 Microsoft 合作伙伴协议的计费帐户支持该操作。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}?api-version=2019-10-01-preview

URI 参数

名称 必需 类型 说明
billingAccountName
path True

string

唯一标识计费帐户的 ID。

billingSubscriptionName
path True

string

唯一标识订阅的 ID。

customerName
path True

string

唯一标识客户的 ID。

api-version
query True

string

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

响应

名称 类型 说明
200 OK

BillingSubscription

没问题。 请求已成功。

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 流。

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

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

BillingSubscriptionByCustomer

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}?api-version=2019-10-01-preview

Sample Response

{
  "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}",
  "name": "{billingSubscriptionName}",
  "type": "Microsoft.Billing/billingSubscriptions",
  "properties": {
    "displayName": "My Subscription",
    "subscriptionId": "6b96d3f2-9008-4a9d-912f-f87744185aa3",
    "subscriptionBillingStatus": "Active",
    "lastMonthCharges": {
      "currency": "USD",
      "value": 5000
    },
    "monthToDateCharges": {
      "currency": "USD",
      "value": 600
    },
    "customerId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}",
    "customerDisplayName": "Customer1",
    "reseller": {
      "resellerId": "3b65b5a8-bd4f-4084-90e9-e1bd667a2b19",
      "description": "Reseller2"
    },
    "skuId": "0002",
    "skuDescription": "Microsoft Azure Standard"
  }
}

定义

名称 说明
Amount

金额。

BillingSubscription

计费订阅。

BillingSubscriptionStatusType

订阅的当前计费状态。

ErrorDetails

错误的详细信息。

ErrorResponse

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

ErrorSubDetails
Reseller

经销商的详细信息。

Amount

金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。

BillingSubscription

计费订阅。

名称 类型 说明
id

string

资源 ID。

name

string

资源名称。

properties.billingProfileDisplayName

string

计费对象为订阅的计费对象信息的名称。

properties.billingProfileId

string

计费对象为订阅的计费配置文件的 ID。

properties.customerDisplayName

string

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

properties.customerId

string

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

properties.displayName

string

订阅的名称。

properties.invoiceSectionDisplayName

string

计费订阅的发票科目的名称。

properties.invoiceSectionId

string

计费订阅的发票科目的 ID。

properties.lastMonthCharges

Amount

上个月的费用。

properties.monthToDateCharges

Amount

本月至今费用。

properties.reseller

Reseller

此订阅的经销商。

properties.skuDescription

string

订阅的 Azure 计划的 SKU 说明。

properties.skuId

string

订阅的 Azure 计划的 SKU ID。

properties.subscriptionBillingStatus

BillingSubscriptionStatusType

订阅的当前计费状态。

properties.subscriptionId

string

订阅 ID。

type

string

资源类型。

BillingSubscriptionStatusType

订阅的当前计费状态。

名称 类型 说明
Abandoned

string

Active

string

Deleted

string

Inactive

string

Warning

string

ErrorDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

details

ErrorSubDetails[]

错误的子详细信息。

message

string

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

target

string

特定错误的目标。

ErrorResponse

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

名称 类型 说明
error

ErrorDetails

错误的详细信息。

ErrorSubDetails

名称 类型 说明
code

string

错误代码。

message

string

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

target

string

特定错误的目标。

Reseller

经销商的详细信息。

名称 类型 说明
description

string

经销商的名称。

resellerId

string

经销商的 MPN ID。