DeleteKeyPairs

1. API Description

The API is used to delete one or more key pairs.

Note

  • Operations on key pairs that are already be placed on servers are also supported. You can still log in to your instances via these key pairs.

  • If any illegal keyIds exists, the request will fail.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter NameRequiredTypeDescription

keyIds

Yes

Array of String

Key pair IDs.

You can query up to 100 key pairs in each request.

3. Output Parameters

Parameter NameTypeDescription

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Code Example

Delete one or more key pairs.

POST /api/v2/vm HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DeleteKeyPairs
<Common Request Params>

Request:
{
  "keyIds": [
    "key-zCcHQB9u"
  ]
}

Response:
{
  "requestId": "TD8F9911F-E2FC-46FF-97CC-7C7127350B46",
  "response": {
    "requestId": "TD8F9911F-E2FC-46FF-97CC-7C7127350B46"
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

No error codes related to the API business logic. For other error codes, see Common Error Codes.​

Last updated