你当前正在访问 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 - 创建服务器密钥请求不存在或没有属性对象。

  • 400 SecurityAdalPrincipalCertExpiredError - 无法完成该作,因为 Azure Key Vault 主体证书已过期。

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

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

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

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

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

  • 400 AzureKeyVaultInvalidExpirationDate - 无法完成该作,因为 Azure Key Vault 密钥到期日期无效。

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

  • 400 SecurityAzureKeyVaultUrlNullOrEmpty - 无法完成作,因为 Azure Key Vault URI 为 null 或为空。

  • 400 SameKeyMaterialNotFoundOnRemoteServer - 辅助服务器没有主服务器的加密保护程序的密钥材料。

  • 400 PerDatabaseCMKRestoreNotSupported - 在预览版中配置数据库级 CMK 时不支持数据库还原。

  • 400 AzureKeyVaultNoServerIdentity - 服务器标识未正确配置。

  • 超大规模版本不支持 400 PerDatabaseCMKHSNotSupported - 预览版中的数据库级 CMK。

  • 400 AzureKeyVaultInvalidUri - 来自 Azure Key Vault 的无效响应。 请使用有效的 Azure Key Vault URI。

  • 400 AzureKeyVaultMissingPermissions - 服务器缺少对 Azure Key Vault 所需的权限。

  • 400 UmiMissingAkvPermissions - 用户提供的 PrimaryUserAssignedIdentityId 无权访问提供的 KeyId

  • 400 AkvEndpointNotReachableFromNode - AKV 终结点“{0}”无法从 SQL 访问,位于服务器“{1}”。

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

  • 400 AdalGenericError - 由于遇到 Azure Active Directory 错误,无法完成该作。

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

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

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

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

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

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

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

  • 404 OperationIdNotFound - ID作不存在。

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

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

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

  • 409 AzureKeyVaultKeyNameNotFound - 无法完成该作,因为 Azure Key Vault 密钥名称不存在。

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

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

  • 409 OperationInterrupted - 无法完成资源上的作,因为它被同一资源上的另一个作中断。

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

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

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

  • 503 AzureKeyVaultConnectionFailed - 无法在服务器上完成该作,因为尝试连接到 Azure Key Vault 失败

  • 503 AzureKeyVaultGenericConnectionError - 无法完成该作,因为尝试检索 Key Vault 信息时遇到错误。

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

示例

Delete the server key

示例请求

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

示例响应