Skip to main content

Create a new key pair

POST 

/v1/projects/:projectId/zones/:zoneName/keypairs

Create a Key Pair: if the public key is not provided, generate it together with the private key.

Request

Path Parameters

    projectId stringrequired

    Project Identifier

    zoneName stringrequired

    Zone name

Header Parameters

    X-API-KEY string

    Your SIU token if you use this API through Orange Developer.

    Authorization string

    Bearer access token authentication if you use this API through Orange Developer or Orange Developer Inside.

    X-Requester-Id string

    Your SIU Id if you use this API through Orange Developer Inside.

Bodyrequired

Key pair to create.

    namestringrequired

    Unique resource name. This attribute can not be updated.

    Possible values: <= 40 characters, Value must match regular expression [A-Za-z0-9-]

    descriptionstring

    Resource description

    tags object

    Tags associated with the resource

    property name*string
    publicKeystring

    SSH Public Key to connect to virtual machines. If a public key is provided, it will be used to create the KeyPair resource. Otherwise, a public key and a private key will be automatically generated and their values will be returned as a result of the KeyPair creation request.

    Possible values: >= 512 characters and <= 2000 characters

Responses

Created

Response Headers
    X-Job-Href

    Href of the asynchronous job that will process the request, in order to track its status.

    X-Retry-After

    The number of seconds to wait before checking the status of the job.

Schema
    iduuidrequired

    Resource identifier.

    hRefurirequired

    Hypertext reference of the resource.

    publicKeystring

    SSH Public Key to connect to virtual machines. If a public key is provided, it will be used to create the KeyPair resource. Otherwise, a public key and a private key will be automatically generated and their values will be returned as a result of the KeyPair creation request.

    Possible values: >= 512 characters and <= 1024 characters

    privateKeystring

    Value of the Private Key generated automatically if the Public Key was not provided NB: this value is visible only in the result of the creation. It will not be returned in the result of a GET request.

curl -L '/v1/projects/:projectId/zones/:zoneName/keypairs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"name": "string",
"description": "string",
"tags": {},
"publicKey": "string"
}'
Request Collapse all
Base URL
/v1
Parameters
— pathrequired
— pathrequired
— header
— header
— header
Body required
{
  "name": "string",
  "description": "string",
  "tags": {},
  "publicKey": "string"
}