Encryption Protectors - Create Or Update

匯報 現有的加密保護裝置。

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

URI 參數

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

EncryptionProtectorName

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

resourceGroupName
path True

string

包含資源的資源群組名稱。 您可以從 Azure 資源管理員 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

已接受

Other Status Codes

錯誤回應: ≦

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

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

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

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

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

  • 400 SecurityAdalPrincipalCertExpiredError - 作業無法完成,因為 Azure 金鑰保存庫 主體憑證已過期。

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

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - 提供的 金鑰保存庫 uri 無效。

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

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

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

  • 400 AzureKeyVaultInvalidExpirationDate - 作業無法完成,因為 Azure 金鑰保存庫 密鑰到期日無效。

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

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - 作業無法完成,因為 Azure 金鑰保存庫 Uri 為 Null 或空白。

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

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

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

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

  • 400 AzureKeyVaultInvalidUri - 來自 Azure 金鑰保存庫 的無效回應。 請使用有效的 Azure 金鑰保存庫 URI。

  • 400 AzureKeyVaultMissingPermissions - 伺服器缺少 Azure 金鑰保存庫 的必要許可權。

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

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

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

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

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

  • 400 AzureKeyVaultMalformedVaultUri - 提供的 金鑰保存庫 uri 無效。

  • 400 SecurityAzureKeyVaultGeoChainError - 使用 Azure 金鑰保存庫 (BYOK) 啟用透明數據加密時,不支援建立次要 (稱為鏈結) 的程式。

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

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

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

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

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

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

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

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

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

  • 「409 ServerKeyDoesNotExists - 伺服器金鑰不存在。」

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

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

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

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

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

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

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

  • 503 AzureKeyVaultConnectionFailed - 無法在伺服器上完成作業,因為嘗試連線到 Azure 金鑰保存庫 失敗

  • 503 AzureKeyVaultGenericConnectionError - 作業無法完成,因為嘗試擷取 金鑰保存庫 資訊時發生錯誤。

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

範例

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

Update the encryption protector to key vault

Sample Request

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

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

Sample Response

{
  "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

Sample Request

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

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

Sample Response

{
  "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

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

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

string

ServerKeyType

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

名稱 類型 Description
AzureKeyVault

string

ServiceManaged

string