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 |
---|---|---|---|---|
encryption
|
path | True |
要更新之加密保護裝置的名稱。 |
|
resource
|
path | True |
string |
包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。 |
server
|
path | True |
string |
伺服器的名稱。 |
subscription
|
path | True |
string |
識別 Azure 訂用帳戶的訂用帳戶標識碼。 |
api-version
|
query | True |
string |
要用於要求的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
properties.serverKeyType | True |
加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。 |
|
properties.autoRotationEnabled |
boolean |
金鑰自動輪替選擇加入旗標。 True 或 false。 |
|
properties.serverKeyName |
string |
伺服器金鑰的名稱。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
已成功更新加密保護裝置。 |
|
202 Accepted |
接受 標題 Location: string |
|
Other Status Codes |
錯誤回應: ***
|
範例
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 |
---|---|
Encryption |
伺服器加密保護裝置。 |
Encryption |
要更新之加密保護裝置的名稱。 |
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Server |
加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。 |
EncryptionProtector
伺服器加密保護裝置。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源標識碼。 |
kind |
string |
加密保護裝置的種類。 這是用於 Azure 入口網站體驗的元數據。 |
location |
string |
資源位置。 |
name |
string |
資源名稱。 |
properties.autoRotationEnabled |
boolean |
金鑰自動輪替選擇加入旗標。 True 或 false。 |
properties.serverKeyName |
string |
伺服器金鑰的名稱。 |
properties.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 |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細數據。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
ServerKeyType
加密保護裝置類型,例如 'ServiceManaged'、'AzureKeyVault'。
值 | Description |
---|---|
AzureKeyVault | |
ServiceManaged |