你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Server Keys - Delete

删除具有给定名称的服务器密钥。

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

URI 参数

名称 必需 类型 说明
keyName
path True

string

要删除的服务器密钥的名称。

resourceGroupName
path True

string

包含该资源的资源组名称。 可以从 Azure 资源管理器 API 或门户获取此值。

serverName
path True

string

服务器的名称。

subscriptionId
path True

string

用于标识 Azure 订阅的订阅 ID。

api-version
query True

string

要用于请求的 API 版本。

响应

名称 类型 说明
200 OK

已成功删除服务器密钥。

202 Accepted

已接受

204 No Content

指定的服务器密钥不存在。

Other Status Codes

错误响应:***

  • 400 InvalidKeyName - 为服务器密钥名称提供了无效值。

  • 400 InvalidKeyType - 不支持创建服务器密钥类型。

  • 400 InvalidUpsertKeyType - 服务托管的 TDE 密钥由服务管理。 服务管理的 TDE 密钥不支持用户创建或更新。

  • 400 InvalidKeyUpsertRequest - 创建服务器密钥请求不存在或没有 properties 对象。

  • 400 SecurityAdalPrincipalCertExpiredError - 无法完成操作,因为 Azure 密钥保管库 主体证书已过期。

  • 400 AkvHostNotResolvingFromNode - 无法从服务器“”{0}上的 SQL 解析 AKV 主机“”。{1}

  • 400 SecurityInvalidAzureKeyVaultRecoveryLevel - 提供的密钥保管库 URI 无效。

  • 400 KeyMaterialNotFoundOnRemoteServer - 远程服务器无权访问用作 TDE 保护器的密钥材料。

  • 400 AzureKeyVaultRsaKeyNotSupported - 提供的密钥保管库使用不受支持的 RSA 密钥大小或密钥类型。 支持的 RSA 密钥大小为 2048 或 3072,密钥类型为 RSA 或 RSA-HSM。

  • 400 AzureKeyVaultKeyDisabled - 无法在服务器上完成该操作,因为 Azure 密钥保管库密钥已禁用。

  • 400 AzureKeyVaultInvalidExpirationDate - 无法完成操作,因为 Azure 密钥保管库密钥过期日期无效。

  • 400 SameKeyUriNotFoundOnRemoteServer - 辅助服务器没有与启用了密钥自动轮换的主服务器的加密保护程序相同的密钥保管库中的密钥材料。

  • 400 安全性AzureKeyVaultUrlNullOrEmpty - 无法完成操作,因为 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 - 服务器“”{0}上的 SQL 无法访问 AKV 终结点“”。{1}

  • 400 SecurityAzureKeyVaultInvalidKeyName - 由于服务器密钥名称无效,操作无法完成。

  • 400 AdalGenericError - 无法完成操作,因为遇到 Azure Active Directory 错误。

  • 400 AdalServicePrincipalNotFound - 无法完成操作,因为遇到“找不到 Azure Active Directory 库服务主体”错误。

  • 400 AzureKeyVaultMalformedVaultUri - 提供的密钥保管库 URI 无效。

  • 400 SecurityAzureKeyVaultGeoChainError - 使用 Azure 密钥保管库 (BYOK) 启用透明数据加密时,不支持创建辅助 (称为链接) 的过程。

  • 400 PerDatabaseCMKDWNotSupported - 数据仓库版本不支持预览版中的数据库级 CMK。

  • 404 SubscriptionDoesNotHaveServer - 找不到请求的服务器

  • 404 ServerNotInSubscriptionResourceGroup - 指定的服务器不存在于指定的资源组和订阅中。

  • 404 ResourceNotFound - 找不到请求的资源。

  • 404 OperationIdNotFound - ID 为 的操作不存在。

  • 409 ServerKeyNameAlreadyExists - 服务器上已存在服务器密钥。

  • 409 ServerKeyUriAlreadyExists - 服务器上已存在服务器密钥 URI。

  • 409 ServerKeyDoesNotExists - 服务器密钥不存在。

  • 409 AzureKeyVaultKeyNameNotFound - 无法完成操作,因为 Azure 密钥保管库密钥名称不存在。

  • 409 AzureKeyVaultKeyInUse - 服务器当前正在使用密钥。

  • 409 OperationCancelled - 用户已取消操作。

  • 409 操作中断 - 无法完成对资源的操作,因为同一资源上的另一个操作中断了该操作。

  • 429 SubscriptionTooManyCreateUpdateRequests - 请求数超出可用资源可以处理的最大请求数。

  • 429 SubscriptionTooManyRequests - 请求数超出可用资源可以处理的最大请求数。

  • 500 OperationTimedOut - 操作超时并自动回滚。 请重试该操作。

  • 503 AzureKeyVaultConnectionFailed - 无法在服务器上完成该操作,因为尝试连接到 Azure 密钥保管库失败

  • 503 AzureKeyVaultGenericConnectionError - 无法完成该操作,因为在尝试检索密钥保管库信息 时遇到错误。

  • 503 TooManyRequests - 请求数超出可用资源可以处理的最大请求数。

示例

Delete the server key

Sample Request

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

Sample Response