Check Name Availability - Execute
檢查伺服器名稱的可用性
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DBforMySQL/locations/{locationName}/checkNameAvailability?api-version=2023-06-30
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
location
|
path | True |
string |
位置的名稱。 Regex pattern: |
subscription
|
path | True |
string uuid |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
name | True |
string |
要驗證的資源名稱。 |
type |
string |
用於驗證的資源類型。 |
回應
名稱 | 類型 | 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
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
Check name availability
Sample Request
POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforMySQL/locations/SouthEastAsia/checkNameAvailability?api-version=2023-06-30
{
"name": "name1",
"type": "Microsoft.DBforMySQL/flexibleServers"
}
Sample Response
{
"nameAvailable": true,
"message": "",
"reason": ""
}
定義
名稱 | Description |
---|---|
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Name |
表示資源名稱可用性。 |
Name |
從用戶端要求以檢查資源名稱可用性。 |
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 |
名稱無法使用的原因。 |
NameAvailabilityRequest
從用戶端要求以檢查資源名稱可用性。
名稱 | 類型 | Description |
---|---|---|
name |
string |
要驗證的資源名稱。 |
type |
string |
用於驗證的資源類型。 |