Create a new key pair
POST/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
Project Identifier
Zone name
Header Parameters
Your SIU token if you use this API through Orange Developer.
Bearer access token authentication if you use this API through Orange Developer or Orange Developer Inside.
Your SIU Id if you use this API through Orange Developer Inside.
- application/json
Body
required
Key pair to create.
Possible values: <= 40 characters
, Value must match regular expression [A-Za-z0-9-]
Unique resource name. This attribute can not be updated.
Resource description
tags
object
Tags associated with the resource
Possible values: >= 512 characters
and <= 2000 characters
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.
Responses
- 201
- 400
- 401
- 403
- 404
- 405
- 500
- 503
Created
Response Headers
X-Job-Href
string
Href of the asynchronous job that will process the request, in order to track its status.
X-Retry-After
integer
The number of seconds to wait before checking the status of the job.
- application/json
- Schema
- Example (from schema)
- OK
Schema
Resource identifier.
Hypertext reference of the resource.
Possible values: >= 512 characters
and <= 1024 characters
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.
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.
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hRef": "string",
"publicKey": "string",
"privateKey": "string"
}
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "hRef": "/projects/{projectId}/zones/{zoneName}/keypairs/{keyPairId}", "privateKey": "MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQCDiJAec5i4De6UlVI9mabo9KHPPhVIIy4h8EWE+kZ/drdkRWyU+GfygMdTxgztymkJI81H/9TOad6n4j8n+/9TnJ+7RPR0gxuPJQ4UI0amOaM3x+Mo1ukqQCT4oXpVfC0MrZcBGoJ6yJCQB611/fVbsCWs5BMoypkX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orygticUzWo7luEn9g4YOQCvoZtFoUk0wYfs1fyfY5n4pCXC/0E2e+FyVDFqXhooKJkGYoJHnXVNA7fvlaWHJyLqGqrM6IJLGmK6RmXKEwN+4cQQRb2Q+FxQz53tAr0C25Aj0lEbZrQj27tEvIHlfe+FKtF4a4oLVD6xCRBKfWNgofyTm71z5P9Ejfh34TFXIkZJnEZovBPELv8FuS0dgwq/31X6hJpdeCy7ohg13efw2ElXvL/s8nAvtNTbS5f5jIib8LOCLBzmsOHcbxfjqLvi/HVRXwFTjIPlDBTXK+x8vaa16rwtlm0z+ICZTtDmt6lain0m0Kl/3T6MaUna9KHR1qjTd8tsB9w5fe2WEBJgbmrVClTFMLdwVRAAjPlpdmPYNxh4Pje0la]+2m3tS6Z3hMq/eYV+1dy1K4kEyC/qWw2wWSz+KQ=="}
Bad Request
Request is not valid
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}
Unauthorized
Credentials are missing
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}
Forbidden
Valid credentials but not enough privileges to perform the operation
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}
Not Found
Unknown resource or service
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}
Method Not Allowed
Operation is not valid according to the state of the resource
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}
Internal Server Error
Unexpected error, please contact support
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}
Service Unavailable
Service probably in maintenance. Please retry later.
- application/json
- Schema
- Example (from schema)
Schema
An integer coding the error type. This is given to caller so he can translate them if required.
A short localized string that describes the error.
(optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values.
{
"code": 0,
"message": "string",
"description": "string"
}