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

Enrollment Accounts - List By Billing Account Name

列出计费帐户的注册帐户。 仅支持协议类型为企业协议的计费帐户执行此操作。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts?api-version=2019-10-01-preview
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts?api-version=2019-10-01-preview&$expand={$expand}&$filter={$filter}

URI 参数

Name In Required Type Description
billingAccountName
path True
  • string

唯一标识计费帐户的 ID。

api-version
query True
  • string

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

$expand
query
  • string

可用于扩展部门。

$filter
query
  • string

可用于按帐户名称进行筛选。 该筛选器支持“eq”、“lt”、“gt”、“le”、“ge”和“and”。 它当前不支持“ne”、“or”或“not”。 标记筛选器是一个键值配对字符串,其中键和值用冒号 (:) 分隔。

响应

Name Type Description
200 OK

没问题。 请求已成功。

Other Status Codes

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

Scopes

Name Description
user_impersonation 模拟用户帐户

示例

EnrollmentAccountsListByBillingAccount
EnrollmentAccountsListByBillingAccountWithExpand

EnrollmentAccountsListByBillingAccount

Sample Request

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

Sample Response

{
  "nextLink": "Link to next page",
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0",
      "name": "accountId0",
      "type": "Microsoft.Billing/enrollmentAccounts",
      "properties": {
        "accountName": "AccountName0",
        "costCenter": "C0",
        "status": "Active",
        "startDate": "2018-05-01T17:32:28Z",
        "endDate": "2019-05-31T17:32:28Z"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1",
      "name": "accountId1",
      "type": "Microsoft.Billing/enrollmentAccounts",
      "properties": {
        "accountName": "AccountName1",
        "costCenter": "C4",
        "status": "Active",
        "startDate": "2018-05-01T17:32:28Z",
        "endDate": "2019-05-31T17:32:28Z"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId2",
      "name": "accountId2",
      "type": "Microsoft.Billing/enrollmentAccounts",
      "properties": {
        "accountName": "AccountName2",
        "costCenter": "C4",
        "status": "Active",
        "startDate": "2018-05-01T17:32:28Z",
        "endDate": "2019-05-31T17:32:28Z"
      }
    }
  ]
}

EnrollmentAccountsListByBillingAccountWithExpand

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts?api-version=2019-10-01-preview&$expand=properties/department

Sample Response

{
  "nextLink": "Link to next page",
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0",
      "name": "accountId0",
      "type": "Microsoft.Billing/enrollmentAccounts",
      "properties": {
        "accountName": "AccountName0",
        "costCenter": "C0",
        "status": "Active",
        "startDate": "2018-05-01T17:32:28Z",
        "endDate": "2019-05-31T17:32:28Z",
        "department": {
          "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1",
          "name": "departmentId1",
          "type": "Microsoft.Billing/departments",
          "properties": {
            "departmentName": "departmentName1",
            "costCenter": "C1",
            "status": "Active"
          }
        }
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1",
      "name": "accountId1",
      "type": "Microsoft.Billing/enrollmentAccounts",
      "properties": {
        "accountName": "AccountName1",
        "costCenter": "C4",
        "status": "Active",
        "startDate": "2018-05-01T17:32:28Z",
        "endDate": "2019-05-31T17:32:28Z"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId2",
      "name": "accountId2",
      "type": "Microsoft.Billing/enrollmentAccounts",
      "properties": {
        "accountName": "AccountName2",
        "costCenter": "C4",
        "status": "Active",
        "startDate": "2018-05-01T17:32:28Z",
        "endDate": "2019-05-31T17:32:28Z",
        "department": {
          "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1",
          "name": "departmentId1",
          "type": "Microsoft.Billing/departments",
          "properties": {
            "departmentName": "departmentName1",
            "costCenter": "C1",
            "status": "Active"
          }
        }
      }
    }
  ]
}

定义

Department

部门。

EnrollmentAccount

注册帐户。

EnrollmentAccountListResult

注册帐户列表。

ErrorDetails

错误的详细信息。

ErrorResponse

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

ErrorSubDetails

Department

部门。

Name Type Description
id
  • string

资源 ID。

name
  • string

资源名称。

properties.costCenter
  • string

与部门关联的成本中心。

properties.departmentName
  • string

部门的名称。

properties.enrollmentAccounts

关联的注册帐户。 默认情况下,除非在$expand中指定,否则不会填充此值。

properties.status
  • string

部门的状态。

type
  • string

资源类型。

EnrollmentAccount

注册帐户。

Name Type Description
id
  • string

资源 ID。

name
  • string

资源名称。

properties.accountName
  • string

注册帐户的名称。

properties.accountOwner
  • string

注册帐户的所有者。

properties.costCenter
  • string

与注册帐户关联的成本中心。

properties.department

关联部门。 默认情况下,除非在$expand中指定,否则不会填充此值。

properties.endDate
  • string

注册帐户的结束日期。

properties.startDate
  • string

注册帐户的开始日期。

properties.status
  • string

注册帐户的状态。

type
  • string

资源类型。

EnrollmentAccountListResult

注册帐户列表。

Name Type Description
nextLink
  • string

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

value

注册帐户列表。

ErrorDetails

错误的详细信息。

Name Type Description
code
  • string

错误代码。

details

错误的子详细信息。

message
  • string

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

target
  • string

特定错误的目标。

ErrorResponse

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

Name Type Description
error

错误的详细信息。

ErrorSubDetails

Name Type Description
code
  • string

错误代码。

message
  • string

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

target
  • string

特定错误的目标。