Register a Template

POST /template
application/json

Body Required

  • Template maintainer

    Minimum length is 1, maximum length is 255.

  • Template description

    Maximum length is 255.

  • ssh-key-enabled boolean Required

    Enable SSH key-based login

  • name string Required

    Template name

    Minimum length is 1, maximum length is 255.

  • Template default user

    Minimum length is 1, maximum length is 255.

  • size integer(int64)

    Template size

    Minimum value is 0.

  • password-enabled boolean Required

    Enable password-based login

  • build string

    Template build

    Minimum length is 1, maximum length is 255.

  • checksum string Required

    Template MD5 checksum

    Minimum length is 1.

  • Boot mode (default: legacy)

    Values are legacy or uefi.

  • url string Required

    Template source URL

    Minimum length is 1.

  • version string

    Template version

    Minimum length is 1, maximum length is 255.

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes operation
    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • Related resource reference

      Hide reference attributes Show reference attributes
      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

POST /template
curl \
 -X POST https://api-ch-gva-2.exoscale.com/v2/template \
 -H "Content-Type: application/json" \
 -d '{"maintainer":"string","description":"string","ssh-key-enabled":true,"name":"string","default-user":"string","size":42,"password-enabled":true,"build":"string","checksum":"string","boot-mode":"legacy","url":"string","version":"string"}'
Request example
{
  "maintainer": "string",
  "description": "string",
  "ssh-key-enabled": true,
  "name": "string",
  "default-user": "string",
  "size": 42,
  "password-enabled": true,
  "build": "string",
  "checksum": "string",
  "boot-mode": "legacy",
  "url": "string",
  "version": "string"
}
Response examples (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}