Share via


Invoice Sections - List By Billing Profile

列出用戶可存取的發票區段。 只有合約類型為 Microsoft 客戶合約的計費帳戶才支援此作業。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections?api-version=2020-05-01

URI 參數

名稱 位於 必要 類型 Description
billingAccountName
path True

string

可唯一識別計費帳戶的標識碼。

billingProfileName
path True

string

可唯一識別帳單配置檔的標識碼。

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。 目前的版本為 2020-05-01。

回應

名稱 類型 Description
200 OK

InvoiceSectionListResult

正常。 要求已成功。

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

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

InvoiceSectionsListByBillingProfile

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections?api-version=2020-05-01

Sample Response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000",
      "name": "22000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections",
      "properties": {
        "displayName": "invoiceSection1",
        "labels": {
          "pcCode": "A123456",
          "costCategory": "Support"
        },
        "state": "Active",
        "systemId": "XX1X-XXAA-XXX-ZZZ",
        "tags": {
          "pcCode": "A123456",
          "costCategory": "Support"
        }
      }
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000011",
      "name": "22000000-0000-0000-0000-000000000011",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections",
      "properties": {
        "displayName": "invoiceSection2",
        "labels": {
          "pcCode": "Z223456",
          "costCategory": "Marketing"
        },
        "state": "Restricted",
        "systemId": "YY1X-BBAA-XXX-ZZZ",
        "tags": {
          "pcCode": "Z223456",
          "costCategory": "Marketing"
        },
        "targetCloud": "USSec"
      }
    }
  ]
}

定義

名稱 Description
ErrorDetails

錯誤的詳細數據。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

ErrorSubDetails
InvoiceSection

發票區段。

InvoiceSectionListResult

發票區段的清單。

InvoiceSectionState

識別發票區段的狀態。

targetCloud

識別與發票區段相關聯的雲端環境。 這是系統管理的選擇性字段,而且會在發票區段與各種雲端中的帳戶相關聯時更新。

ErrorDetails

錯誤的詳細數據。

名稱 類型 Description
code

string

錯誤碼。

details

ErrorSubDetails[]

錯誤的子詳細數據。

message

string

錯誤訊息,指出作業失敗的原因。

target

string

特定錯誤的目標。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

名稱 類型 Description
error

ErrorDetails

錯誤的詳細數據。

ErrorSubDetails

名稱 類型 Description
code

string

錯誤碼。

message

string

錯誤訊息,指出作業失敗的原因。

target

string

特定錯誤的目標。

InvoiceSection

發票區段。

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.displayName

string

發票區段的名稱。

properties.labels

object

與發票區段相關聯的元數據字典。

properties.state

InvoiceSectionState

識別發票區段的狀態。

properties.systemId

string

系統為發票區段產生唯一標識符。

properties.tags

object

與發票區段相關聯的元數據字典。 支援的索引鍵/值長度上限為 256 個字元。 索引鍵/值不應空白值或 Null。 索引鍵不能包含 <> % & \ ? /

properties.targetCloud

targetCloud

識別與發票區段相關聯的雲端環境。 這是系統管理的選擇性字段,而且會在發票區段與各種雲端中的帳戶相關聯時更新。

type

string

資源類型。

InvoiceSectionListResult

發票區段的清單。

名稱 類型 Description
nextLink

string

連結 (url) 到下一頁的結果。

totalCount

number

總記錄數。

value

InvoiceSection[]

發票區段的清單。

InvoiceSectionState

識別發票區段的狀態。

名稱 類型 Description
Active

string

Restricted

string

targetCloud

識別與發票區段相關聯的雲端環境。 這是系統管理的選擇性字段,而且會在發票區段與各種雲端中的帳戶相關聯時更新。

名稱 類型 Description
USGov

string

USNat

string

USSec

string