What's on this page

Infrastructure Keys

The following section details the APIs used to manage Infrastructure Keys.

Associated with each definition are details of the request parameters and responses. These include the name of each field plus a brief description and whether the field is mandatory. Whether a field is required or not is based on the context of the examples. The underlying API definition may mark a field as optional, but in some contexts, the fields must be supplied.

For a 40x, 50x or any other error response please see error response codes.

Note: any infrastructure keys (shared or resource) returned in an API response will not include the private key.

Create Shared Infrastructure Key

Creates a new shared infrastructure key.

Request

AspectValue
Endpoint URL/api/resource-manager/infrastructure-keys/shared
HTTP MethodPOST

Request Headers:

HeaderDescriptionMandatory
Content-TypeBoth JSON and YAML requests are supported. application/json is the default. To send YAML, set this header to application/yaml. Given that private SSH keys contain newline characters, we recommend you use application/yaml for this.Yes

Body

FieldDescriptionMandatory
nameThe name of the infrastructure key (must be unique)Yes
descriptionInfrastructure key descriptionNo
publicKeyPublic key portion of the infrastructure keyNo
privateKeyPrivate key portion of the infrastructure keyNo

Example (YAML)

name: key
description: key
publicKey: ssh-rsa XXAAAAB3NzaC1yc2EAAAADAQABAAABAQDJ1t35uQorDiR8gmXQtbGB6W+NrK4nx+IYj8bTBsQu0gx4jlYNwb2wzaeejLU7QP8FB5G3eclo7emUNK479Eg/UMtPmNzsQhRjlUKonuYLPncLGKtetFgjMnmePvi8mudl9o1alvcdtn41VofNZ4dN8RcgKIJOdS1Xd4vwHEW57PhUNIHs0x2MHfPQ0wsz1vzUrof4B2bxFkXI4f3kTXKV2n3MMfeb736TYfrhBcji4i9OOiQV3jwlrmqeOQyddgrCUB6TEDPJfO6XGqxWSl56CxvbqSSZ3ugplptAoObUHuxJs5P6pMGvC03D5nDq3pSKajAgTix6xjM6Z4LKFHPx accanto@blacktower
privateKey: |
  -----BEGIN RSA PRIVATE KEY-----
  MIIEpAIBAAKCAQEAvdugKkZpDMCrDks78JMQd9KrL7rPkQeUheAob6oUVeLwhyXm
  2q+EQo7oCSc4k2nKXdBTIl2d/ob/jjHQmpeYzjJD3Xk5GHuzRdJy1T+g+j5ZaJMg
  5w8paUqoa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3KlP3FaQ+TLmAx4A33apjINHx993qWrd50FWm
  rYmmwuWAr/K8S0LD/ec+rUECgYEAlkYeFrad5/RsN8Yx0Zpn/T4gl52mf4INLivP
  InJmSV68sDcko0f/dVbX/Mn0uFaoTUhLlgnbomyJv/Hl+V0n83f5lOi4Huc8ZxAe
  u8yezHbRFPB/c81WUoS5RvfnJJYcUnoYamyAwnuYDr4DZFz6ChOL2jjwlvUJk6Wz
  0SSCYqECgYB9DUiP8sLrf5YmzwxzHLXYKJRJKEmhRYgE2ZYBQ+CbhkBcGoJwLk1F
  4WMdzm8hyddPQvE4UU2fVVrbppYtnkkTAaIXdBzQA/hjHnQlpooHr/cMmftE4dPO
  UQ122Zq7AHx3P58o1Q0CVhakGkoa+mc0+VK4O2uYl3sMrKCpVjs2ZQ==
  -----END RSA PRIVATE KEY-----

Note the syntax for the private key; it must use the pipe | symbol and be indented to conform to the PEM format.

Response

AspectValue
Content-Typeapplication/json
Success Status Code201

Response Headers

FieldDescription
locationEndpoint to infrastructure key resource

Response Body

FieldDescription
nameThe name of the infrastructure key
descriptionInfrastructure key description
privateKeyPrivate key portion of the infrastructure key
publicKeyPublic key portion of the infrastructure key

Update Shared Infrastructure Key

Update an existing shared infrastructure key.

Request

AspectValue
Endpoint URL/api/resource-manager/infrastructure-keys/shared/{name}
HTTP MethodPUT

Request Headers:

HeaderDescriptionMandatory
Content-TypeBoth JSON and YAML requests are supported. application/json is the default. To send YAML, set this header to application/yaml. Given that private SSH keys contain newline characters, we recommend you use application/yaml for this.Yes

Path Parameters:

FieldDescriptionMandatory
nameName of the shared infrastructure keyYes

Body

FieldDescriptionMandatory
descriptionInfrastructure key descriptionNo
publicKeyPublic key portion of the infrastructure keyNo
privateKeyPrivate key portion of the infrastructure keyNo

Example (YAML)

description: key
publicKey: ssh-rsa XXAAAAB3NzaC1yc2EAAAADAQABAAABAQDJ1t35uQorDiR8gmXQtbGB6W+NrK4nx+IYj8bTBsQu0gx4jlYNwb2wzaeejLU7QP8FB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7+lM6yo++pKo0tSSe3vSjzlC/1svU
  mbPNp0eX7GAkK6Om2WQtEdlXAk2Cd38hxemH5VMBAB0sV6cUhdMXspvW5E20dJBW
  lWGfjZooH1xzu02z9/RokXvSd5fihpGElo7kUOi7Au/XuA9xq4PJr50CgYEAwE4A
  g5cR2nOAZLTcrtY0HXFvdJYsJQNq5iLymYTI8qS9C/ibLDeKIvj+UEeCZ0K7M8E9
  gtQ5d4FpuwaXyatgyJa0/QwY2g+4+DMYlA8mLkQuL+K/18ERDMl3w1dflUsZuK4h
  WBjjvLLoQ0DW1lt/sBaVexuScoJR0Anf884CpSECgYEAzYkWUKbwL6UiElQg4y9D
  cs2G5RuqQ/CB6QdBtc4CJO5uB+pDGDrKufQu2kqukdvdjl+X4FJHFKzaxVSjNOp+
  XKR9j1DhD2aqGN4XIn14WBfDugY3KlP3FaQ+TLmAx4A33apjINHx993qWrd50FWm
  rYmmwuWAr/K8S0LD/ec+rUECgYEAlkYeFrad5/RsN8Yx0Zpn/T4gl52mf4INLivP
  InJmSV68sDcko0f/dVbX/Mn0uFaoTUhLlgnbomyJv/Hl+V0n83f5lOi4Huc8ZxAe
  u8yezHbRFPB/c81WUoS5RvfnJJYcUnoYamyAwnuYDr4DZFz6ChOL2jjwlvUJk6Wz
  0SSCYqECgYB9DUiP8sLrf5YmzwxzHLXYKJRJKEmhRYgE2ZYBQ+CbhkBcGoJwLk1F
  4WMdzm8hyddPQvE4UU2fVVrbppYtnkkTAaIXdBzQA/hjHnQlpooHr/cMmftE4dPO
  UQ122Zq7AHx3P58o1Q0CVhakGkoa+mc0+VK4O2uYl3sMrKCpVjs2ZQ==
  -----END RSA PRIVATE KEY-----

Note the syntax for the private key; it must use the pipe | symbol and be indented to conform to the PEM format.

Response

AspectValue
Content-Typeapplication/json
Success Status Code204

List Shared Infrastructure Keys

View details of all Shared Infrastructure Keys, sorted by name (ascending).

Request

AspectValue
Endpoint URL/api/resource-manager/infrastructure-keys/shared
HTTP MethodGET

Request Headers:

HeaderDescriptionMandatory
AcceptBoth JSON and YAML requests are supported. JSON is the default. To return YAML, set this header to application/yamlNo

Request Parameters:

FieldDescriptionMandatory
includePrivateKeyWhether to include private keys (true) or not (false)No (default is “false”)

Response

AspectValue
Content-Typeapplication/json
Success Status Code200

Get Shared Infrastructure Key by Name

View details of a shared Infrastructure Key

Request

AspectValue
Endpoint URL/api/resource-manager/infrastructure-keys/{name}
HTTP MethodGET

Request Headers:

HeaderDescriptionMandatory
AcceptBoth JSON and YAML requests are supported. JSON is the default. To return YAML, set this header to application/yamlNo

Path Parameters:

FieldDescriptionMandatory
nameName of the shared infrastructure keyYes

Request Headers:

HeaderDescriptionMandatory
AcceptBoth JSON and YAML requests are supported. JSON is the default. To return YAML, set this header to application/yamlNo

Response

AspectValue
Content-Typeapplication/json
Success Status Code200

Remove Shared Infrastructure Key

Remove a shared Infrastructure Key

Request

AspectValue
Endpoint URL/api/resource-manager/infrastructure-keys/shared/{name}
HTTP MethodDELETE

Path Parameters:

FieldDescriptionMandatory
nameName of the shared infrastructure keyYes

Response

AspectValue
Content-Typeapplication/json
Success Status Code204