Cost Allocation Rules - Check Name Availability

コスト割り当てルールの名前の可用性と正確性を確認します

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability?api-version=2023-11-01

URI パラメーター

名前 / 必須 説明
billingAccountId
path True

string

BillingAccount ID

api-version
query True

string

この操作に使用する API バージョン。

要求本文

名前 説明
name

string

規則名

type

string

リソースの種類。 これは Microsoft.CostManagement/costAllocationRules である必要があります

応答

名前 説明
200 OK

CostAllocationRuleCheckNameAvailabilityResponse

コスト割り当てルール名の可用性の応答。

Other Status Codes

ErrorResponse

操作に失敗した理由を説明するエラー応答

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントの借用

CostAllocationRuleCheckNameAvailability

要求のサンプル

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/checkNameAvailability?api-version=2023-11-01

{
  "name": "testRule",
  "type": "Microsoft.CostManagement/costAllocationRules"
}

応答のサンプル

{
  "nameAvailable": false,
  "reason": "AlreadyExists",
  "message": "A cost allocation rule with name testRule is already present for the billing account 100. Please specify a differnt name."
}

定義

名前 説明
CostAllocationRuleCheckNameAvailabilityRequest

コスト割り当て規則チェック名前の可用性要求

CostAllocationRuleCheckNameAvailabilityResponse

コスト割り当て規則チェック名前の可用性応答

ErrorDetails

エラーの詳細。

ErrorResponse

エラー応答は、サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに示されています。

いくつかのエラー応答:

  • 429 TooManyRequests - 要求が調整されました。 "x-ms-ratelimit-microsoft.consumption-retry-after" ヘッダーで指定された時間を待ってから再試行します。

  • 503 ServiceUnavailable - サービスは一時的に使用できません。 "Retry-After" ヘッダーで指定された時刻まで待ってから、再試行してください。

Reason

この名前が使用できない理由。

CostAllocationRuleCheckNameAvailabilityRequest

コスト割り当て規則チェック名前の可用性要求

名前 説明
name

string

規則名

type

string

リソースの種類。 これは Microsoft.CostManagement/costAllocationRules である必要があります

CostAllocationRuleCheckNameAvailabilityResponse

コスト割り当て規則チェック名前の可用性応答

名前 説明
message

string

名前が使用できない場合のエラー メッセージ

nameAvailable

boolean

このルール名を使用できるかどうか

reason

Reason

この名前が使用できない理由

ErrorDetails

エラーの詳細。

名前 説明
code

string

エラー コード。

message

string

操作が失敗した理由を示すエラー メッセージ。

ErrorResponse

エラー応答は、サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに示されています。

いくつかのエラー応答:

  • 429 TooManyRequests - 要求が調整されました。 "x-ms-ratelimit-microsoft.consumption-retry-after" ヘッダーで指定された時間を待ってから再試行します。

  • 503 ServiceUnavailable - サービスは一時的に使用できません。 "Retry-After" ヘッダーで指定された時刻まで待ってから、再試行してください。

名前 説明
error

ErrorDetails

エラーの詳細。

Reason

この名前が使用できない理由。

名前 説明
AlreadyExists

string

Invalid

string

Valid

string