Create key metadata container (POST /v1/{tenant_id}/containers)

Creates key metadata container.

{tenant_id}: Project ID used to register a key metadata container

Request headers

X-Auth-Token

Specify the authentication token.

Data type Cardinality
String 1..1

Content-Type

Specify the request body type.

Valid values: application/json

Data type Cardinality
String 1..1

Request parameters

None

Request body

name

Name of key metadata container

Data type Cardinality
String 0..1

type

Type of key metadata container

Valid values: certificate, generic

CAUTION:
The following fixed values must be specified for the key information container used when creating an SSL-VPN V2 connection.
  • type: It is necessary to specify "generic".
  • name: It is necessary to specify "ca", "server_certificate", "server_key", and "dh".

When the above is not specified, creation of the SSL-VPN V2 connection will fail.

No error will occur during registration of the key information container, but after creation of the SSL-VPN V2 connection, the status of the SSL-VPN V2 connection will be ERROR.

Data type Cardinality
Enum(certificate, generic) 1..1

secret_refs

Envelope of key metadata list to be registered in the key metadata container

Includes (secret_ref_env)

Data type Cardinality
Element 0..1

(secret_ref_env)

Envelope of key metadata to be registered in the key metadata container

Includes name and secret_ref

Data type Cardinality
Element 0..3

name

Name of key metadata to be registered in the key metadata container

Valid values:

  • If type is certificate

    certificate, intermediates, private_key

  • If type is generic

    Any value

    However,

    • Valid characters: Halfwidth alphanumeric characters and halfwidth symbols
    • Number of characters: 1 to 255
    • If omitted, null will be used
Data type Cardinality
If type is certificate

Enum(certificate, intermediates, private_key)

If type is generic:

String

If type is certificate

1..1

If type is generic

0..1

secret_ref

URI of the key metadata to be registered in the key metadata container

Data type Cardinality
String 1..1

Response headers

Status

The following error codes can be returned for the request.

One of the following values will be returned.

201:
Normal completion
401:
Authentication error (no authentication token, incorrect authentication token, etc.)
400:
Invalid access (invalid parameter, etc.)
403:
Cannot access (no privileges)
404:
No applicable resources
415:
An unsupported Content-Type was specified
500:
Unexpected error
Data type Cardinality
int 1..1

Response elements

container_ref

URI of the registered key metadata container

Data type Cardinality Parent element Child element
String 1..1 None None

Example of request


POST /v1/a759452216fd41cf8ee5aba321cfbd49/containers
X-Auth-Token: "JpZCI6ICJjM2VlNzA4YTZhZTI0ZGRmOTJjMDc4 . . ."
Content-Type: "application/json"
Body:
{
  "name": "container1",
  "type": "certificate",
  "secret_refs": [
    {
       "name": "private_key",
"secret_ref":"http://<host>:9311/v1/a759452216fd41cf8ee5aba321cfbd49/secrets/087cf096-3947-4a54-8968-7b021cfe8196"
    },
    {
       "name": "certificate",
"secret_ref":"http://<host>:9311/v1/a759452216fd41cf8ee5aba321cfbd49/secrets/4bbcf05f-d15d-444c-ae9f-799746349a9f"
    },
    {
       "name": "intermediates",
"secret_ref":"http://<host>:9311/v1/a759452216fd41cf8ee5aba321cfbd49/secrets/8573540e-ad7c-467a-a196-43cf6b5c3468"
    }
  ]
}
     

Example of response


Status Code: 201 Created
Content-Length: 123
Content-Type: application/json; charset=UTF-8
Location: http://<host>:9311/ a759452216fd41cf8ee5aba321cfbd49/containers/a5330b02-ee46-4883-b8ea-4359925ebbf2

{"container_ref": "http://<host>:9311/v1/ a759452216fd41cf8ee5aba321cfbd49/containers/a5330b02-ee46-4883-b8ea-4359925ebbf2"}