Server Azure AD Only Authentications - Create Or Update

設定僅伺服器 Active Directory 驗證屬性,或更新現有的伺服器 Active Directory 僅驗證屬性。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/Default?api-version=2021-11-01

URI 參數

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

AuthenticationName

伺服器 azure Active Directory 僅驗證的名稱。

resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure 資源管理員 API 或入口網站取得這個值。

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string

可識別 Azure 訂用帳戶的訂用帳戶識別碼。

api-version
query True

string

要用於要求的 API 版本。

要求本文

名稱 必要 類型 Description
properties.azureADOnlyAuthentication True

boolean

僅啟用 Azure Active Directory 驗證。

回應

名稱 類型 Description
200 OK

ServerAzureADOnlyAuthentication

已成功更新僅限 Azure Active Directory 驗證屬性。

201 Created

ServerAzureADOnlyAuthentication

已成功更新 Azure Active Directory 的驗證屬性。

202 Accepted

已接受

Other Status Codes

錯誤回應: ≦

  • 400 InvalidServerAzureADOnlyAuthenticationParameter - 使用者嘗試將 AzureADOnlyAuthentication 參數設定為不允許的 false,請改用 azureADOnlyAuthentications API。

  • 400 InvalidServerAADOnlyAuthTypePropertyName - 伺服器 Azure Active Directory 僅驗證類型應該是預設值

  • 400 InvalidServerAADOnlyAuthNoAADAdminPropertyName - 未設定 AAD 管理員,必須先設定 AAD 管理員,才能啟用/停用僅限 AAD 驗證。

  • 404 SubscriptionDoesNotHaveServer - 找不到要求的伺服器

  • 404 ServerNotInSubscriptionResourceGroup - 指定的伺服器不存在於指定的資源群組和訂用帳戶中。

  • 404 OperationIdNotFound - 標識符為的作業不存在。

  • 409 OperationCancelled - 使用者已取消作業。

  • 409 OperationInterrupted - 無法完成資源上的作業,因為它被相同資源上的另一個作業中斷。

  • 429 SubscriptionTooManyCreateUpdateRequests - 超出可用資源可處理之最大要求的要求。

  • 429 SubscriptionTooManyRequests - 超出可用資源可處理的最大要求。

  • 500 OperationTimedOut - 作業逾時並自動回復。 請重試該作業。

  • 503 TooManyRequests - 超出可用資源可處理之最大要求的要求。

範例

Creates or updates Azure Active Directory only authentication object.

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureADOnlyAuthentications/Default?api-version=2021-11-01

{
  "properties": {
    "azureADOnlyAuthentication": false
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default",
  "name": "Default",
  "type": "Microsoft.Sql/servers/azureadonlyauthentications",
  "properties": {
    "azureADOnlyAuthentication": false
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default",
  "name": "Default",
  "type": "Microsoft.Sql/servers/azureadonlyauthentications",
  "properties": {
    "azureADOnlyAuthentication": false
  }
}

定義

名稱 Description
AuthenticationName

伺服器 azure Active Directory 僅驗證的名稱。

ServerAzureADOnlyAuthentication

Azure Active Directory 僅驗證。

AuthenticationName

伺服器 azure Active Directory 僅驗證的名稱。

名稱 類型 Description
Default

string

ServerAzureADOnlyAuthentication

Azure Active Directory 僅驗證。

名稱 類型 Description
id

string

資源識別碼。

name

string

資源名稱。

properties.azureADOnlyAuthentication

boolean

僅啟用 Azure Active Directory 驗證。

type

string

資源類型。