共用方式為


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=2023-08-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

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

標題

Location: string

Other Status Codes

ErrorResponse

錯誤回應: ***

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

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

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

  • 400 MissingKeyVaultUriForRestore - 必須有 Azure Key Vault 密鑰 URI '{0}',才能在伺服器 '{1}' 下成功還原資料庫 '{2}'。

  • 400 AzureKeyVaultKeyUsedOnGeoPrimary - 作業無法完成,因為 Azure Key Vault 密鑰名稱 {0} 目前設定為異地主要上的加密保護裝置。

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

  • 400 PerDatabaseCMKAKVKeyMaterialMissingOnGeoSecondary - 異地複寫中的所有資料庫都必須包含與源資料庫的加密保護裝置相同的密鑰數據。 請將索引鍵 '{0}' 與相同的索引鍵數據新增至目標資料庫 '{1}'。

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

  • 400 PerDatabaseCMKAKVKeyUriMissingOnGeoSecondary - 啟用資料庫層級 TDE 保護裝置的自動輪替時,來源和目標資料庫都必須連線到相同的密鑰保存庫。 請將金鑰 '{0}' (從連接到源資料庫的相同金鑰儲存函式庫) 新增至目標資料庫'{1}'。

  • 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeysWithDatabaseName - 嘗試復寫以資料庫層級加密保護裝置設定的資料庫時,主資料庫目前使用的密鑰必須傳遞至輔助資料庫 '{0}'

  • 400 ManagedInstanceNoConditionToMakeDatabaseAccessible - 作業無法完成,因為沒有足夠許可權可在受控實例上啟動可存取的工作流程,{0}。

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

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

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

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

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

  • 400 BlockSystemAssignedIdentityForCrossTenantCMK - 跨租使用者 CMK 只能在伺服器設定為使用者指派的受控識別時設定。 請參閱 https://aka.ms/sqltdebyokumi 來設定使用者指派的受控識別。

  • 400 PerDatabaseCMKCopyOrReplicationAttemptedWithoutCurrentKeys - 嘗試復寫以資料庫層級加密保護裝置設定的資料庫時,主資料庫所使用的目前密鑰必須傳遞至輔助資料庫。

  • 400 CannotDropDatabaseAKVError - 無法安全地卸載伺服器 {0} 上的資料庫 {1},因為資料庫是以客戶管理的密鑰加密,無法再卸除前取得最後一個備份。 請還原伺服器上的 Azure Key Vault 存取權,並重新驗證密鑰,讓此資料庫可供存取,然後繼續進行卸除。 如需詳細資訊,請參閱 https://aka.ms/tdecmkrestorability

  • 400 CreateDatabaseAttemptedWithRotationInProgress - 由於伺服器上的持續透明數據加密 (TDE) 密鑰輪替,因此目前無法執行建立資料庫作業。 請稍後再試一次作業。

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

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

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

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

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

  • 400 CMKOperationNotAllowed - 當伺服器沒有 Azure Key Vault 存取權時,用戶嘗試在伺服器上執行作業。

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

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

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

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

  • 400 AzureKeyVaultKeyNameCurrentlyInUse - 作業無法完成,因為 Azure Key Vault 密鑰名稱 {0} 目前正在使用中。

  • 400 AzureKeyVaultKeyThumbprintIsDifferent - 作業無法完成,因為 Azure Key Vault 密鑰數據與目前的加密保護裝置密鑰不同。

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

  • 400 OldGenerationOfAKVKeyBeingUsedError - 不允許使用舊版的 AKV 密鑰作為 TDE 保護裝置。 請使用最新版本的 AKV 金鑰作為加密保護裝置

  • 400 PerDatabaseCMKMissingIdentityOnGeoSecondaryDatabase - 未在目標資料庫上設定每個資料庫 CMK 身分識別。

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

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

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

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

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

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

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

  • 400 ManagedInstanceStoppingOrStopped - 實例處於停止/停止狀態時提交的衝突作業

  • 400 ManagedInstanceStarting - 實例處於啟動狀態時提交的衝突作業

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

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

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

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

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

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

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

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

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

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

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

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

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

  • 409 CannotCancelOperation - 管理作業處於無法取消的狀態。

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

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

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

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

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

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

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

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

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

範例

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=2023-08-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"
  }
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/locations/southeastasia/transparentDataEncryptionOperationResults/11111111-1111-1111-1111-111111111111

定義

名稱 Description
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

LogicalDatabaseTransparentDataEncryption

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

TransparentDataEncryptionName

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

TransparentDataEncryptionState

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

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

LogicalDatabaseTransparentDataEncryption

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

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.state

TransparentDataEncryptionState

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

type

string

資源類型。

TransparentDataEncryptionName

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

Description
current

TransparentDataEncryptionState

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

Description
Disabled
Enabled