Updated on 2024-08-06 GMT+08:00

Modifying the Description of a Key Pair (V2.1)

Function

This API is used to modify the description of a specified SSH key pair based on the name of the SSH key pair.

URI

  • URI format

    PUT /v2.1/{project_id}/os-keypairs/{keypair_name}

  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    keypair_name

    Yes

    String

    Name of an SSH key pair

Requests

Table 2 Request parameters

Parameter

Mandatory

Type

Description

description

Yes

String

Description of the SSH key pair (The value ranges from 0 to 255 characters.)

Responses

None

Examples

  • Example request
    {
        "keypair": { 
            "description": "keypair test"
        }
    }
  • Example response

    None

Status Codes

For details, see Status Codes.