次の方法で共有


Manage billing - Get a customer's utilization records for Azure

パートナーの顧客が所有する Azure サブスクリプションに属するリソースの使用率を取得します。

GET https://api.partnercenter.microsoft.com/v1/customers/{customer_id}/subscriptions/{subscription_id}/utilizations/azure
GET https://api.partnercenter.microsoft.com/v1/customers/{customer_id}/subscriptions/{subscription_id}/utilizations/azure?start_time={start_time}&end_time={end_time}&size={size}&granularity={granularity}&show_details={show_details}&seek_operation={seek_operation}

URI パラメーター

名前 / 必須 説明
customer_id
path True

string

サブスクリプションを所有する顧客の ID。

subscription_id
path True

string

使用率を取得する Azure サブスクリプションの ID。

end_time
query

string

date-time

課金システムで使用率が測定された終了時刻。

granularity
query

string

リソースの使用時間の細分性。 1 日または 1 時間にできます。 Defalt は毎日行います。

seek_operation
query

string

実行するシーク操作。 [次へ] のみがサポートされます。

show_details
query

boolean

true に設定すると、使用率レコードはリソース インスタンス レベルによって分割されます。 false に設定すると、使用率レコードはリソース レベルで集計されます。 既定値は true です。

size
query

integer

int32

返すレコードの最大数 (省略可能)。 既定値は 1000 です。 返されるリソース コレクションでは、使用可能な使用率レコードが増えた場合に備えて、次のリンクが指定されます。

start_time
query

string

date-time

課金システムで使用率が測定された開始時刻。

要求ヘッダー

名前 必須 説明
Authorization True

string

承認ベアラー トークン

ms-correlationid

string

要求を内部的に追跡するために使用されます。 ms-correlationid が指定されていない場合、サーバーは要求ごとに新しいものを生成します

ms-cv

string

要求を内部的に追跡するために使用されます。 ms-cv が指定されていない場合、サーバーは要求ごとに新しいものを生成します

ms-requestid

string

要求のべき等性に使用されます。 ms-requestid が指定されていない場合、サーバーは要求ごとに新しいものを生成します

応答

名前 説明
200 OK

Collections.ResourceCollection[Utilizations.AzureUtilizationRecord]

要求は成功しました。 応答本文には、Azure 使用率レコード リソース コレクションが含まれています。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

204 No Content

Collections.ResourceCollection[Utilizations.AzureUtilizationRecord]

指定された開始時刻と終了時刻に対してデータを使用することはできません。 retry-after ヘッダーを含むコンテンツは返されません。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

400 Bad Request

入力が見つからないか、無効でした。 応答本文には、エラーの詳細が表示されます。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

401 Unauthorized

要求が認証されませんでした。 クライアントは、最初にパートナー API サービスで認証する必要があります。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

403 Forbidden

要求は認証されましたが、呼び出し元はそれを呼び出す権限がないため拒否されました。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

404 Not Found

リソースが見つからないか、指定された入力パラメーターで使用できません。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

500 Internal Server Error

パートナー API サービスまたはその依存関係のいずれかが要求を満たすことができませんでした。 呼び出し元はこれを再試行できます。

Media Types: "application/json", "text/json", "application/xml", "text/xml"

定義

名前 説明
Collections.ResourceCollection[Utilizations.AzureUtilizationRecord]
Link
ResourceAttributes
ResourceLinks
System.Collections.Generic.KeyValuePair[System.String,System.String]
Utilizations.AzureInstanceData
Utilizations.AzureResource
Utilizations.AzureUtilizationRecord

Collections.ResourceCollection[Utilizations.AzureUtilizationRecord]

名前 説明
attributes

ResourceAttributes

items

Utilizations.AzureUtilizationRecord[]

links

ResourceLinks

totalCount

integer

名前 説明
headers

System.Collections.Generic.KeyValuePair[System.String,System.String][]

method

string

uri

string

ResourceAttributes

名前 説明
etag

string

objectType

string

名前 説明
next

Link

previous

Link

self

Link

System.Collections.Generic.KeyValuePair[System.String,System.String]

名前 説明
key

string

value

string

Utilizations.AzureInstanceData

名前 説明
additionalInfo

object

location

string

orderNumber

string

partNumber

string

resourceUri

string

tags

object

Utilizations.AzureResource

名前 説明
category

string

id

string

name

string

region

string

subcategory

string

Utilizations.AzureUtilizationRecord

名前 説明
attributes

ResourceAttributes

infoFields

object

instanceData

Utilizations.AzureInstanceData

quantity

number

resource

Utilizations.AzureResource

unit

string

usageEndTime

string

usageStartTime

string