共用方式為


Transparent Data Encryptions - Create Or Update

更新邏輯資料庫的透明數據加密組態。

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

URI 參數

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

string

定義安全警示原則的邏輯資料庫名稱。

resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string

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

tdeName
path True

TransparentDataEncryptionName

透明數據加密組態的名稱。

api-version
query True

string

要用於要求的 API 版本。

要求本文

名稱 必要 類型 Description
properties.state True

TransparentDataEncryptionState

指定透明數據加密的狀態。

回應

名稱 類型 Description
200 OK

LogicalDatabaseTransparentDataEncryption

已成功更新資料庫透明數據加密狀態。

201 Created

LogicalDatabaseTransparentDataEncryption

已成功建立資料庫透明數據加密狀態。

202 Accepted

正在建立或更新資料庫透明數據加密組態。

Other Status Codes

錯誤回應: ***

  • 400 SecurityAdalPrincipalCertExpiredError - 作業無法完成,因為 Azure Key Vault 主體憑證已過期。

  • 400 AkvHostNotResolvingFromNode - AKV 主機 '{0}' 無法從 SQL 解析,在伺服器 '{1}'。

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - 提供的 Key Vault URI 無效。

  • 400 KeyMaterialNotFoundOnRemoteServer - 遠端伺服器無法存取做為 TDE 保護裝置的金鑰數據。

  • 400 AzureKeyVaultRsaKeyNotSupported - 提供的密鑰保存庫使用不支援的 RSA 金鑰大小或密鑰類型。 支援的 RSA 金鑰大小為 2048 或 3072,而密鑰類型為 RSA 或 RSA-HSM。

  • 400 AzureKeyVaultKeyDisabled - 無法完成伺服器上的作業,因為 Azure Key Vault 密鑰已停用。

  • 400 AzureKeyVaultInvalidExpirationDate - 作業無法完成,因為 Azure Key Vault 密鑰到期日無效。

  • 400 SameKeyUriNotFoundOnRemoteServer - 輔助伺服器沒有與啟用密鑰自動輪替之主伺服器加密保護裝置相同的密鑰保存庫的金鑰數據。

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - 作業無法完成,因為 Azure Key Vault URI 為 Null 或空白。

  • 400 SameKeyMaterialNotFoundOnRemoteServer - 輔助伺服器沒有主伺服器加密保護裝置的密鑰內容。

  • 400 PerDatabaseCMKRestoreNotSupported - 在預覽中設定資料庫層級 CMK 時,不支持資料庫還原。

  • 400 AzureKeyVaultNoServerIdentity - 伺服器識別未正確設定。

  • 超大規模資料庫版本不支援 400 PerDatabaseCMKHSNotSupported - 預覽版的資料庫層級 CMK。

  • 400 AzureKeyVaultInvalidUri - 來自 Azure Key Vault 的無效回應。 請使用有效的 Azure Key Vault URI。

  • 400 AzureKeyVaultMissingPermissions - 伺服器缺少 Azure Key Vault 的必要許可權。

  • 400 UmiMissingAkvPermissions - 使用者所提供的 PrimaryUserAssignedIdentityId 無法存取提供的 KeyId

  • 400 AkvEndpointNotReachableFromNode - AKV 端點 '{0}' 無法從 SQL 連線,在伺服器 '{1}'。

  • 400 SecurityAzureKeyVaultInvalidKeyName - 作業無法完成,因為伺服器密鑰名稱無效。

  • 400 AdalGenericError - 作業無法完成,因為發生 Azure Active Directory 錯誤。

  • 400 AdalServicePrincipalNotFound - 作業無法完成,因為找不到 Azure Active Directory 連結庫服務主體錯誤。

  • 400 AzureKeyVaultMalformedVaultUri - 提供的 Key Vault URI 無效。

  • 400 SecurityAzureKeyVaultGeoChainError - 使用 Azure Key Vault 啟用透明數據加密時,不支援建立次要複本(稱為鏈結的程式)。

  • 400 PerDatabaseCMKDWNotSupported - Datawarehouse 版本不支援預覽中的資料庫層級 CMK。

  • 400 ReadOnly - 無法在唯讀、具有唯讀檔案或未復原的資料庫上啟用或修改資料庫加密。

  • 400 CanNotDropAlterOnMirror - 請修改主資料庫上的透明數據加密。

  • 400 AttemptedEncryptionOnSystemDatabase - 無法加密系統資料庫。 無法針對 'master'、'model'、'tempdb'、'msdb' 或 'resource' 資料庫執行資料庫加密作業。

  • 400 InvalidTransparentDataEncryptionUpdateRequest - 請輸入有效的狀態。 請使用 「已啟用」或「已停用」。

  • 400 InvalidTransparentDataEncryptionName - 不支援透明數據加密密鑰名稱。

  • 401 CanNotChangeReadOnlyDuringTdeScan - 無法在加密轉換進行時修改檔案群組只讀/讀寫狀態。

  • 409 ServerKeyNameAlreadyExists - 伺服器密鑰已存在於伺服器上。

  • 409 ServerKeyUriAlreadyExists - 伺服器密鑰 URI 已存在於伺服器上。

  • 409 ServerKeyDoesNotExists - 伺服器密鑰不存在。

  • 409 AzureKeyVaultKeyNameNotFound - 作業無法完成,因為 Azure Key Vault 密鑰名稱不存在。

  • 409 AzureKeyVaultKeyInUse - 伺服器目前正在使用密鑰。

  • 409 NeedsLogBackup - 請等候數分鐘的時間進行記錄備份。

  • 409 EncryptionInProgress - 無法在加密掃描進行時修改加密。

  • 409 KeyChangeInProgress - 無法在加密、解密或密鑰變更掃描進行時變更資料庫加密密鑰。

  • 409 NoBulkOperationLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY 失敗,因為無法將鎖定放在資料庫上。 稍後再試一次。

  • 409 AltStateConflict - 作業無法在資料庫上執行,因為它涉及資料庫鏡像會話或可用性群組。 參與資料庫鏡像會話或可用性群組的資料庫上不允許某些作業。

  • 503 AzureKeyVaultConnectionFailed - 無法完成伺服器上的作業,因為嘗試連線到 Azure Key Vault 失敗

  • 503 AzureKeyVaultGenericConnectionError - 作業無法完成,因為嘗試擷取 Key Vault 資訊時發生錯誤。

  • 503 NoDekLock - CREATE/ALTER/DROP DATABASE ENCRYPTION KEY 失敗,因為無法將鎖定放在資料庫上。 稍後再試一次。

範例

Update a database's Transparent Data Encryption state with minimal parameters

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption/current?api-version=2021-11-01

{
  "properties": {
    "state": "Enabled"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption",
  "name": "current",
  "type": "Microsoft.Sql/servers/databases/transparentDataEncryption",
  "properties": {
    "state": "Enabled"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption",
  "name": "current",
  "type": "Microsoft.Sql/servers/databases/transparentDataEncryption",
  "properties": {
    "state": "Enabled"
  }
}

定義

名稱 Description
LogicalDatabaseTransparentDataEncryption

邏輯資料庫透明數據加密狀態。

TransparentDataEncryptionName

透明數據加密組態的名稱。

TransparentDataEncryptionState

指定透明數據加密的狀態。

LogicalDatabaseTransparentDataEncryption

邏輯資料庫透明數據加密狀態。

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.state

TransparentDataEncryptionState

指定透明數據加密的狀態。

type

string

資源類型。

TransparentDataEncryptionName

透明數據加密組態的名稱。

Description
current

TransparentDataEncryptionState

指定透明數據加密的狀態。

Description
Disabled
Enabled