Web Pub Sub - Check Name Availability
檢查資源名稱是否有效且尚未使用中。
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability?api-version=2024-03-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
location
|
path | True |
string |
區域 |
subscription
|
path | True |
string uuid |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
name | True |
string |
要驗證的資源名稱。 例如“my-resource-name” |
type | True |
string |
資源類型。 可以是 “Microsoft.SignalRService/SignalR”、“Microsoft.SignalRService/WebPubSub”、“Microsoft.SignalRService/SignalR/replicas” 或 “Microsoft.SignalRService/WebPubSub/replicas” |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功。 回應描述名稱可用性。 |
|
Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
WebPubSub_CheckNameAvailability
範例要求
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.SignalRService/locations/eastus/checkNameAvailability?api-version=2024-03-01
{
"type": "Microsoft.SignalRService/WebPubSub",
"name": "myWebPubSubService"
}
範例回覆
{
"nameAvailable": false,
"reason": "AlreadyExists",
"message": "The name is already taken. Please try a different name."
}
定義
名稱 | Description |
---|---|
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Name |
檢查名稱可用性的要求結果。 它包含旗標和可能的失敗原因。 |
Name |
Data POST-ed to the nameAvailability action |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細資料。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
NameAvailability
檢查名稱可用性的要求結果。 它包含旗標和可能的失敗原因。
名稱 | 類型 | Description |
---|---|---|
message |
string |
作業的訊息。 |
nameAvailable |
boolean |
指出名稱是否可用。 |
reason |
string |
可用性的原因。 如果名稱無法使用,則為必要專案。 |
NameAvailabilityParameters
Data POST-ed to the nameAvailability action
名稱 | 類型 | Description |
---|---|---|
name |
string |
要驗證的資源名稱。 例如“my-resource-name” |
type |
string |
資源類型。 可以是 “Microsoft.SignalRService/SignalR”、“Microsoft.SignalRService/WebPubSub”、“Microsoft.SignalRService/SignalR/replicas” 或 “Microsoft.SignalRService/WebPubSub/replicas” |