action hetzner_post_servers_id_actions_create_image { label: "Create Image from a Server" description: "Creates an Image (snapshot) from a Server by copying the contents of its disks. This creates a snapshot of the current state of the disk and copies it into an Image. If the Server is currently running you must make sure that its disk content is consistent. Otherwise, the created Image may not be readable.\n\nTo make sure disk content is consistent, we recommend to shut down the Server prior to creating an Image.\n\nYou can either create a `backup` Image that is bound to the Server and therefore will be deleted when the Server is deleted, or you can create an `snapshot` Image which is completely independent of the Server it was created from and will survive Server deletion. Backup Images are only available when the backup option is enabled for the Server. Snapshot Images are billed on a per GB basis.\n" provider: hetzner method: POST path: "/servers/{id}/actions/create_image" encoding: json input: { type: "object" properties: { description: { type: "string" description: "Description of the Image, will be auto-generated if not set" } id: { type: "integer" } labels: { type: "object" description: "User-defined labels (key-value pairs)" properties: { labelkey: { type: "string" description: "New label" } } } type: { type: "string" description: "Type of Image to create (default: `snapshot`)" enum: ["snapshot", "backup"] } } required: ["id"] additionalProperties: false } output: { type: "object" properties: { action: { type: "object" required: ["command", "error", "finished", "id", "progress", "resources", "started", "status"] properties: { command: { type: "string" description: "Command executed in the Action" } error: { type: "object" description: "Error message for the Action if error occurred, otherwise null" required: ["code", "message"] properties: { code: { type: "string" description: "Fixed machine readable code" } message: { type: "string" description: "Humanized error message" } } } finished: { type: "string" description: "Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null." } id: { type: "integer" description: "ID of the Resource" } progress: { type: "number" description: "Progress of Action in percent" } resources: { type: "array" description: "Resources the Action relates to" items: { type: "object" required: ["id", "type"] properties: { id: { type: "integer" description: "ID of the Resource" } type: { type: "string" description: "Type of resource referenced" } } } } started: { type: "string" description: "Point in time when the Action was started (in ISO-8601 format)" } status: { type: "string" description: "Status of the Action" enum: ["success", "running", "error"] } } } image: { type: "object" required: ["bound_to", "created", "created_from", "deleted", "deprecated", "description", "disk_size", "id", "image_size", "labels", "name", "os_flavor", "os_version", "protection", "status", "type"] properties: { bound_to: { type: "integer" description: "ID of Server the Image is bound to. Only set for Images of type `backup`." } created: { type: "string" description: "Point in time when the Resource was created (in ISO-8601 format)" } created_from: { type: "object" description: "Information about the Server the Image was created from" required: ["id", "name"] properties: { id: { type: "integer" description: "ID of the Server the Image was created from" } name: { type: "string" description: "Server name at the time the Image was created" } } } deleted: { type: "string" description: "Point in time where the Image was deleted (in ISO-8601 format)" } deprecated: { type: "string" description: "Point in time when the Image is considered to be deprecated (in ISO-8601 format)" } description: { type: "string" description: "Description of the Image" } disk_size: { type: "number" description: "Size of the disk contained in the Image in GB" } id: { type: "integer" description: "ID of the Resource" } image_size: { type: "number" description: "Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image." } labels: { type: "object" description: "User-defined labels (key-value pairs)" } name: { type: "string" description: "Unique identifier of the Image. This value is only set for system Images." } os_flavor: { type: "string" description: "Flavor of operating system contained in the Image" enum: ["ubuntu", "centos", "debian", "fedora", "unknown"] } os_version: { type: "string" description: "Operating system version" } protection: { type: "object" description: "Protection configuration for the Resource" required: ["delete"] properties: { delete: { type: "boolean" description: "If true, prevents the Resource from being deleted" } } } rapid_deploy: { type: "boolean" description: "Indicates that rapid deploy of the Image is available" } status: { type: "string" description: "Whether the Image can be used or if it's still being created or unavailable" enum: ["available", "creating", "unavailable"] } type: { type: "string" description: "Type of the Image" enum: ["system", "app", "snapshot", "backup", "temporary"] } } } } } }