• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Creating a HANA ECS
  5. Preparing a Key Pair

Preparing a Key Pair

An ECS or HANA ECS can be logged in to using either a password or key pair. If key pair authentication is used, you must create a key pair before provisioning an ECS or HANA ECS.

For detailed API information, see Native OpenStack API Reference.

API Format

Method

URI

Description

POST

/v2/{tenant_id}/os-keypairs

Creates a key pair.

Restrictions

None

Expansion

None

Request Parameters

Parameter

Type

Mandatory or Not

Description

name

String

Yes

Specifies a key pair name, which consists of a maximum of 255 characters. The name can consist of only digits, letters (case sensitive), underscores (_), and hyphens (-).

public_key

String

No

Specifies the public key.

Response Parameters

NOTE:

Make a note of the name of the created key pair (Keypair value), which will be used for configuring the created ECS or HANA ECS. In addition, save the value in the returned private_key in a .pem file by converting \n to Enter.

Parameter

Type

Mandatory or Not

Description

fingerprint

N/A

Yes

Fingerprint, which is used for identification

name

String

Yes

Key pair name

public_key

String

Yes

Public key

private_key

String

No

Private key

user_id

String

Yes

User ID

Request Example

POST /v2/6fbe9263116a4b68818cf1edce16bc4f/os-keypairs
{
    "keypair": {
        "name": "keypair-7d7c3650-dabe-4eb0-b904-5c464453c043",
    }
}

Response Example

{
    "keypair": {
        "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9mC3WZN9UGLxgPBpP7H5jZMc6pKwOoSgre8yun6REFktn/Kz7DUt9jaR1UJyRzHxITfCfAIgSxPdGqB/oF1suMyWgu5i0625vavLB5z5kC8Hq3qZJ9zJO1poE1kyD+htiTtPWJ88e12xuH2XB/CZN9OpEiF98hAagiOE0EnOS5Q== Generated by Nova\n",
        "private_key":"-----BEGINRSAPRIVATEKEY-----\nMIIEpAIBAAKCAQEAyJ+VTG0hwPASi5TZf8O7hA/sSoYj1I65xnF8QxkSna5HGhFD\nSz7u8kIWeKjyGr4s7y/M2RlukSiH4bi40u3wlf87Er4gFxhSWeCkd/7a97fEbJb6\n4jaCpYDmzmJmdk66PyWlVwDpFYPB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58fnGEXT5pyHTx8Tu\n4PJfJTUVUu8tRby+1YQC3zUCgYBNPsRA2Ta3NTtbYnC282YHsLA01oaXM4CIacRi\nRWy4g6VHm/XAqOFVtIdaHYJI7o5GXHDIvrKQ6TnhxtTdlmHP04glrFuv7qVG10oa\n8181V0hgnaKt1ArfEzbUw0gFWfgZeueeHLhXDbAQu4/ZgJsDha+M9oHbT2TXweou\nrS/9fQKBgQDIm91yzhwE6TBVuxid1hJFPMaVk9tqM+AeH7unu/+y2Yh/Imvndd/T\nWpJ8nu3u05QnwVI+xchp10tKJjZLUyv/KeFbM0JUthHynk2yoKOGxUw4lTLnKLqO\nAXLDXTjLH9w6rGTTXC6unStU+kPoGIq4Jsbbhr1Nab2/cNCRn/Tj/Q==\n-----ENDRSAPRIVATEKEY-----\n"
        "user_id": "f882feb345064e7d9392440a0f397c25",
        "name": "keypair-7d7c3650-dabe-4eb0-b904-5c464453c043",
        "fingerprint": "35:9d:d0:c3:4a:80:d3:d8:86:f1:ca:f7:df:c4:f9:d8"
     }
}