共用方式為


Encryption Protectors - Create Or Update

更新現有的加密保護裝置。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/current?api-version=2023-08-01

URI 參數

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

EncryptionProtectorName

要更新之加密保護裝置的名稱。

resourceGroupName
path True

string

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

serverName
path True

string

伺服器的名稱。

subscriptionId
path True

string

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

api-version
query True

string

要用於要求的 API 版本。

要求本文

名稱 必要 類型 Description
properties.serverKeyType True

ServerKeyType

加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。

properties.autoRotationEnabled

boolean

金鑰自動輪替選擇加入旗標。 True 或 false。

properties.serverKeyName

string

伺服器金鑰的名稱。

回應

名稱 類型 Description
200 OK

EncryptionProtector

已成功更新加密保護裝置。

202 Accepted

接受

標題

Location: string

Other Status Codes

ErrorResponse

錯誤回應: ***

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

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

  • 400 InvalidKeyName - 為伺服器金鑰名稱指定了無效的值。

  • 400 InvalidKeyType - 不支援建立伺服器密鑰類型。

  • 400 InvalidUpsertKeyType - 服務管理的 TDE 金鑰是由服務所管理。 服務管理的 TDE 金鑰不支援使用者建立或更新。

  • 400 InvalidKeyUpsertRequest - 建立伺服器密鑰要求不存在或沒有任何屬性物件。

  • 400 InvalidEncryptionProtectorName - 不支援加密保護裝置密鑰名稱。

  • 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 無效。

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

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

  • 404 ResourceNotFound - 找不到要求的資源。

  • 404 ServerKeyNotFound - 目前訂用帳戶上找不到要求的伺服器密鑰。

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

  • 409 EncryptionProtectorChangeInProgress - 無法在保護裝置變更進行時更新資料庫加密密鑰保護裝置

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

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

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

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

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

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

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

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

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

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

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

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

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

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

範例

Update the encryption protector to key vault
Update the encryption protector to service managed

Update the encryption protector to key vault

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current?api-version=2023-08-01

{
  "properties": {
    "serverKeyType": "AzureKeyVault",
    "serverKeyName": "someVault_someKey_01234567890123456789012345678901",
    "autoRotationEnabled": false
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current",
  "name": "current",
  "type": "Microsoft.Sql/servers/encryptionProtector",
  "location": "West US",
  "kind": "azurekeyvault",
  "properties": {
    "serverKeyName": "someVault_someKey_01234567890123456789012345678901",
    "serverKeyType": "AzureKeyVault",
    "autoRotationEnabled": false
  }
}

Update the encryption protector to service managed

範例要求

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current?api-version=2023-08-01

{
  "properties": {
    "serverKeyType": "ServiceManaged",
    "serverKeyName": "ServiceManaged"
  }
}

範例回覆

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current",
  "name": "current",
  "type": "Microsoft.Sql/servers/encryptionProtector",
  "location": "West US",
  "kind": "servicemanaged",
  "properties": {
    "serverKeyName": "ServiceManaged",
    "serverKeyType": "ServiceManaged"
  }
}

定義

名稱 Description
EncryptionProtector

伺服器加密保護裝置。

EncryptionProtectorName

要更新之加密保護裝置的名稱。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

ServerKeyType

加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。

EncryptionProtector

伺服器加密保護裝置。

名稱 類型 Description
id

string

資源標識碼。

kind

string

加密保護裝置的種類。 這是用於 Azure 入口網站體驗的元數據。

location

string

資源位置。

name

string

資源名稱。

properties.autoRotationEnabled

boolean

金鑰自動輪替選擇加入旗標。 True 或 false。

properties.serverKeyName

string

伺服器金鑰的名稱。

properties.serverKeyType

ServerKeyType

加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。

properties.subregion

string

加密保護裝置的子區域。

properties.thumbprint

string

伺服器金鑰的指紋。

properties.uri

string

伺服器金鑰的 URI。

type

string

資源類型。

EncryptionProtectorName

要更新之加密保護裝置的名稱。

Description
current

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

ServerKeyType

加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。

Description
AzureKeyVault
ServiceManaged