DeleteUserKey

Updated at:

Deletes a specified SSH key for the current user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

DELETE /api/v3/user/keys/{keyId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

keyId

integer

Yes

The primary key ID of the SSH key.

50998

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The enterprise identifier, also known as the enterprise ID. It is a string that can be obtained from the Yunxiao access URL, such as https://devops.aliyun.com/organization/[OrganizationId].

5ebbc0228123212b59xxxxx

accessToken

string

No

The personal access token. This field is not required if you use an Alibaba Cloud AccessKey pair or Security Token Service (STS) temporary authorization.

f0b1e61db5961df5975a93f9129d2513

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

ASSDS-ASSASX-XSAXSA-XSAXSAXS

errorCode

string

The error code.

SYSTEM_UNKNOWN_ERROR

errorMessage

string

The error message.

SYSTEM_UNKNOWN_ERROR

success

boolean

Indicates whether the call was successful.

true

result

object

The returned result.

id

integer

The primary key ID of the SSH key.

50998

createdAt

string

The creation time in the YYYY-MM-DD HH:mm:ss format.

2022-03-18 14:24:54

updatedAt

string

The update time in the YYYY-MM-DD HH:mm:ss format.

2022-03-18 14:24:54

title

string

The title of the SSH key.

Key title

fingerPrint

string

The fingerprint information.

85:3c:55:fe:09:95:ff:93:7c:8a:22:21:43:06:25:97

shaContext

string

The encryption information of the SHA1-encrypted public key string.

0c6473124ab30d411b28d264661a7d0a8b1c6c79

publicKey

string

The public key string of the SSH key.

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFhmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm doc-example

context

string

The context information of the public key string.

AAAAC3NzaC1lZDI1NTE5AAAAIFhmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm

expireTime

string

The expiration time in the YYYY-MM-DD HH:mm:ss format.

2022-03-18 14:24:54

lastUsedTime

string

The last used time in the YYYY-MM-DD HH:mm:ss format.

2022-03-18 14:24:54

keyScope

string

The scope. Valid values:

  • ALL: All operations, including read and write operations such as clone, pull, and push.

  • READ: Read-only operations. Only clone and pull are supported.

ALL

Examples

Success response

JSON format

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "errorMessage": "SYSTEM_UNKNOWN_ERROR",
  "success": true,
  "result": {
    "id": 50998,
    "createdAt": "2022-03-18 14:24:54",
    "updatedAt": "2022-03-18 14:24:54",
    "title": "Key title",
    "fingerPrint": "xxx",
    "shaContext": "xxx",
    "publicKey": "xxx",
    "context": "xxx",
    "expireTime": "2022-03-18 14:24:54\n",
    "lastUsedTime": "2022-03-18 14:24:54\n",
    "keyScope": "ALL"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.