import * as API from "@distilled.cloud/core/api"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-hetzner/specs/cloud.spec.json). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import type * as Redacted from "effect/Redacted"; import { UnknownHetznerError } from "../errors.ts"; import { paginatePageNumber } from "../pagination.ts"; import { HetznerProtocol, type HetznerOpError, type HetznerOpContext } from "../protocol.ts"; import * as Retry from "../retry.ts"; import * as T from "../traits.ts"; // Schema table, filled on first reach (see __S at the end). const __s: any[] = []; export type { HetznerOpError, HetznerOpContext }; export interface AddServerToPlacementGroupRequest { /** ID of the Server. */ id: number; /** ID of Placement Group the Server should be added to. */ placement_group: number; } /** Status of the Action. */ export type AddServerToPlacementGroupResponseActionStatus = "running" | "success" | "error"; export interface AddServerToPlacementGroupResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type AddServerToPlacementGroupResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface AddServerToPlacementGroupResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface AddServerToPlacementGroupResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AddServerToPlacementGroupResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: AddServerToPlacementGroupResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface AddServerToPlacementGroupResponse { action: AddServerToPlacementGroupResponseAction; } export interface AttachServerIsoRequest { /** ID of the Server. */ id: number; /** ID or name of ISO to attach to the Server as listed in GET `/isos`. */ iso: string; } /** Status of the Action. */ export type AttachServerIsoResponseActionStatus = "running" | "success" | "error"; export type AttachServerIsoResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type AttachServerIsoResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type AttachServerIsoResponseActionError = AddServerToPlacementGroupResponseActionError; export interface AttachServerIsoResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AttachServerIsoResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: AttachServerIsoResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface AttachServerIsoResponse { action: AttachServerIsoResponseAction; } /** Additional IPs to be assigned to this Server. */ export type AttachServerToNetworkRequestAliasIpsList = Array; export interface AttachServerToNetworkRequest { /** ID of the Server. */ id: number; /** ID of an existing network to attach the Server to. */ network: number; /** IP to request to be assigned to this Server; if you do not provide this then you will be auto assigned an IP address. */ ip?: string; /** Additional IPs to be assigned to this Server. */ alias_ips?: AttachServerToNetworkRequestAliasIpsList; /** IP range in CIDR block notation of the subnet to attach to. This allows for auto assigning an IP address for a specific subnet. Providing `ip` that is not part of `ip_range` will result in an error. */ ip_range?: string; } /** Status of the Action. */ export type AttachServerToNetworkResponseActionStatus = "running" | "success" | "error"; export type AttachServerToNetworkResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type AttachServerToNetworkResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type AttachServerToNetworkResponseActionError = AddServerToPlacementGroupResponseActionError; export interface AttachServerToNetworkResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AttachServerToNetworkResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: AttachServerToNetworkResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface AttachServerToNetworkResponse { action: AttachServerToNetworkResponseAction; } /** New alias IPs to set for this Server. */ export type ChangeServerAliasIpsRequestAliasIpsList = Array; export interface ChangeServerAliasIpsRequest { /** ID of the Server. */ id: number; /** ID of an existing Network already attached to the Server. */ network: number; /** New alias IPs to set for this Server. */ alias_ips: ChangeServerAliasIpsRequestAliasIpsList; } /** Status of the Action. */ export type ChangeServerAliasIpsResponseActionStatus = "running" | "success" | "error"; export type ChangeServerAliasIpsResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeServerAliasIpsResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeServerAliasIpsResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ChangeServerAliasIpsResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeServerAliasIpsResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeServerAliasIpsResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ChangeServerAliasIpsResponse { action: ChangeServerAliasIpsResponseAction; } export interface ChangeServerDnsPtrRequest { /** ID of the Server. */ id: number; /** Single IPv4 or IPv6 address to create pointer for. */ ip: string; /** Domain Name to point to. PTR record content used for reverse DNS. Set to null to reset (IPv4) to the default value or remove (IPv6) the record. */ dns_ptr: string | null; } /** Status of the Action. */ export type ChangeServerDnsPtrResponseActionStatus = "running" | "success" | "error"; export type ChangeServerDnsPtrResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeServerDnsPtrResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeServerDnsPtrResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ChangeServerDnsPtrResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeServerDnsPtrResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeServerDnsPtrResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ChangeServerDnsPtrResponse { action: ChangeServerDnsPtrResponseAction; } export interface ChangeServerProtectionRequest { /** ID of the Server. */ id: number; /** If true, prevents the Server from being deleted (currently delete and rebuild attribute needs to have the same value). */ delete?: boolean; /** If true, prevents the Server from being rebuilt (currently delete and rebuild attribute needs to have the same value). */ rebuild?: boolean; } /** Status of the Action. */ export type ChangeServerProtectionResponseActionStatus = "running" | "success" | "error"; export type ChangeServerProtectionResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeServerProtectionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeServerProtectionResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ChangeServerProtectionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeServerProtectionResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeServerProtectionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ChangeServerProtectionResponse { action: ChangeServerProtectionResponseAction; } export interface ChangeServerTypeRequest { /** ID of the Server. */ id: number; /** If false, do not upgrade the disk (this allows downgrading the Server type later). */ upgrade_disk: boolean; /** ID or name of Server type the Server should migrate to. */ server_type: string; } /** Status of the Action. */ export type ChangeServerTypeResponseActionStatus = "running" | "success" | "error"; export type ChangeServerTypeResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeServerTypeResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeServerTypeResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ChangeServerTypeResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeServerTypeResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeServerTypeResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ChangeServerTypeResponse { action: ChangeServerTypeResponseAction; } /** Type of Image to create. */ export type CreateServerImageRequestType = "snapshot" | "backup"; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreateServerImageRequestLabelsMap = { [key: string]: string | undefined }; export interface CreateServerImageRequest { /** ID of the Server. */ id: number; /** Description of the Image, will be auto-generated if not set. */ description?: string; /** Type of Image to create. */ type?: CreateServerImageRequestType | (string & {}); /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels?: CreateServerImageRequestLabelsMap; } /** Type of the Image. */ export type CreateServerImageResponseImageType = "system" | "app" | "snapshot" | "backup"; /** Status of the Image. */ export type CreateServerImageResponseImageStatus = "available" | "creating" | "unavailable"; /** Information about the Server the Image was created from. */ export interface CreateServerImageResponseImageCreatedFrom { /** ID of the Server the Image was created from. */ id: number; /** Server name at the time the Image was created. */ name: string; } /** Flavor of operating system contained in the Image. */ export type CreateServerImageResponseImageOsFlavor = | "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; /** Protection configuration for the Resource. */ export interface CreateServerImageResponseImageProtection { /** Prevent the Resource from being deleted. */ delete: boolean; } /** Describes if, when and how the resource is deprecated. If this field is set to `null` the resource is not deprecated. If a value is set, it is considered deprecated. */ export interface CreateServerImageResponseImageDeprecation { /** Date of the deprecated resource removal. Once this date is reached, the resource will not be returned by resource type "list" endpoint, and the resource can not be used to create new resources. For example, if this is an image, you can not create new servers with this image after the mentioned date. */ unavailable_after: string; /** Date of the deprecation announcement. */ announced: string; } /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreateServerImageResponseImageLabelsMap = { [key: string]: string | undefined }; /** CPU architecture compatible with the Image. */ export type CreateServerImageResponseImageArchitecture = "x86" | "arm"; export interface CreateServerImageResponseImage { /** ID of the [Image](#tag/images). */ id: number; /** Type of the Image. */ type: CreateServerImageResponseImageType; /** Status of the Image. */ status: CreateServerImageResponseImageStatus; /** Unique identifier of the Image. This value is only set for system Images. */ name: string | null; /** Description of the Image. */ description: string; /** Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. */ image_size: number | null; /** Size of the disk contained in the Image in GB. */ disk_size: number; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; /** Information about the Server the Image was created from. */ created_from: CreateServerImageResponseImageCreatedFrom | null; /** ID of Server the Image is bound to. Only set for Images of type `backup`. */ bound_to: number | null; /** Flavor of operating system contained in the Image. */ os_flavor: CreateServerImageResponseImageOsFlavor; /** Operating system version. */ os_version: string | null; /** Indicates that rapid deploy of the Image is available. */ rapid_deploy?: boolean; /** Protection configuration for the Resource. */ protection: CreateServerImageResponseImageProtection; /** **Deprecated:** This field is deprecated, use the deprecation object instead. Point in time when the Image is considered to be deprecated (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ deprecated: string | null; /** Describes if, when and how the resource is deprecated. If this field is set to `null` the resource is not deprecated. If a value is set, it is considered deprecated. */ deprecation: CreateServerImageResponseImageDeprecation | null; /** Point in time where the Image was deleted (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ deleted: string | null; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: CreateServerImageResponseImageLabelsMap; /** CPU architecture compatible with the Image. */ architecture: CreateServerImageResponseImageArchitecture; } /** Status of the Action. */ export type CreateServerImageResponseActionStatus = "running" | "success" | "error"; export type CreateServerImageResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type CreateServerImageResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type CreateServerImageResponseActionError = AddServerToPlacementGroupResponseActionError; export interface CreateServerImageResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: CreateServerImageResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: CreateServerImageResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface CreateServerImageResponse { image?: CreateServerImageResponseImage; action?: CreateServerImageResponseAction; } export interface DetachServerFromNetworkRequest { /** ID of the Server. */ id: number; /** ID of an existing network to detach the Server from. */ network: number; } /** Status of the Action. */ export type DetachServerFromNetworkResponseActionStatus = "running" | "success" | "error"; export type DetachServerFromNetworkResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type DetachServerFromNetworkResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DetachServerFromNetworkResponseActionError = AddServerToPlacementGroupResponseActionError; export interface DetachServerFromNetworkResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DetachServerFromNetworkResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DetachServerFromNetworkResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface DetachServerFromNetworkResponse { action: DetachServerFromNetworkResponseAction; } export interface DetachServerIsoRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type DetachServerIsoResponseActionStatus = "running" | "success" | "error"; export type DetachServerIsoResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type DetachServerIsoResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DetachServerIsoResponseActionError = AddServerToPlacementGroupResponseActionError; export interface DetachServerIsoResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DetachServerIsoResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DetachServerIsoResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface DetachServerIsoResponse { action: DetachServerIsoResponseAction; } export interface DisableServerBackupRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type DisableServerBackupResponseActionStatus = "running" | "success" | "error"; export type DisableServerBackupResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type DisableServerBackupResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DisableServerBackupResponseActionError = AddServerToPlacementGroupResponseActionError; export interface DisableServerBackupResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DisableServerBackupResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DisableServerBackupResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface DisableServerBackupResponse { action: DisableServerBackupResponseAction; } export interface DisableServerRescueRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type DisableServerRescueResponseActionStatus = "running" | "success" | "error"; export type DisableServerRescueResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type DisableServerRescueResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DisableServerRescueResponseActionError = AddServerToPlacementGroupResponseActionError; export interface DisableServerRescueResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DisableServerRescueResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DisableServerRescueResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface DisableServerRescueResponse { action: DisableServerRescueResponseAction; } export interface EnableServerBackupRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type EnableServerBackupResponseActionStatus = "running" | "success" | "error"; export type EnableServerBackupResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type EnableServerBackupResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type EnableServerBackupResponseActionError = AddServerToPlacementGroupResponseActionError; export interface EnableServerBackupResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: EnableServerBackupResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: EnableServerBackupResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface EnableServerBackupResponse { action: EnableServerBackupResponseAction; } /** Type of rescue system to boot. */ export type EnableServerRescueRequestType = "linux64"; /** Array of SSH key IDs which should be injected into the rescue system. */ export type EnableServerRescueRequestSshKeysList = Array; export interface EnableServerRescueRequest { /** ID of the Server. */ id: number; /** Type of rescue system to boot. */ type?: EnableServerRescueRequestType | (string & {}); /** Array of SSH key IDs which should be injected into the rescue system. */ ssh_keys?: EnableServerRescueRequestSshKeysList; } /** Status of the Action. */ export type EnableServerRescueResponseActionStatus = "running" | "success" | "error"; export type EnableServerRescueResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type EnableServerRescueResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type EnableServerRescueResponseActionError = AddServerToPlacementGroupResponseActionError; export interface EnableServerRescueResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: EnableServerRescueResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: EnableServerRescueResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface EnableServerRescueResponse { /** Password that will be set for this Server once the Action succeeds. */ root_password?: string | Redacted.Redacted; action?: EnableServerRescueResponseAction; } export interface GetServersActionRequest { /** ID of the Action. */ id: number; } /** Status of the Action. */ export type GetServersActionResponseActionStatus = "running" | "success" | "error"; export type GetServersActionResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type GetServersActionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type GetServersActionResponseActionError = AddServerToPlacementGroupResponseActionError; export interface GetServersActionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: GetServersActionResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: GetServersActionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface GetServersActionResponse { action: GetServersActionResponseAction; } export type ListServerActionsRequestSortItem = | "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListServerActionsRequestSortList = Array< ListServerActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListServerActionsRequestStatusItem = "running" | "success" | "error"; export type ListServerActionsRequestStatusList = Array< ListServerActionsRequestStatusItem | (string & {}) >; export interface ListServerActionsRequest { /** ID of the Server. */ id: number; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListServerActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListServerActionsRequestStatusList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Status of the Action. */ export type ListServerActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListServerActionsResponseActionsItemResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListServerActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListServerActionsResponseActionsItemError = AddServerToPlacementGroupResponseActionError; export interface ListServerActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListServerActionsResponseActionsItemStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ListServerActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export type ListServerActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListServerActionsResponseMetaPagination { /** Current page number. */ page: number; /** Maximum number of entries returned per page. */ per_page: number; /** Page number of the previous page. Can be null if the current page is the first one. */ previous_page: number | null; /** Page number of the next page. Can be null if the current page is the last one. */ next_page: number | null; /** Page number of the last page available. Can be null if the current page is the last one. */ last_page: number | null; /** Total number of entries that exist for this query. Can be null if unknown. */ total_entries: number | null; } export interface ListServerActionsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListServerActionsResponseMetaPagination; } export interface ListServerActionsResponse { actions: ListServerActionsResponseActionsList; meta: ListServerActionsResponseMeta; } export type ListServersActionsRequestIdList = Array; export type ListServersActionsRequestSortItem = | "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListServersActionsRequestSortList = Array< ListServersActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListServersActionsRequestStatusItem = "running" | "success" | "error"; export type ListServersActionsRequestStatusList = Array< ListServersActionsRequestStatusItem | (string & {}) >; export interface ListServersActionsRequest { /** Filter the actions by ID. May be used multiple times. The response will only contain actions matching the specified IDs. */ id?: ListServersActionsRequestIdList; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListServersActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListServersActionsRequestStatusList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Status of the Action. */ export type ListServersActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListServersActionsResponseActionsItemResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListServersActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListServersActionsResponseActionsItemError = AddServerToPlacementGroupResponseActionError; export interface ListServersActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListServersActionsResponseActionsItemStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ListServersActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export type ListServersActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export type ListServersActionsResponseMetaPagination = ListServerActionsResponseMetaPagination; export type ListServersActionsResponseMeta = ListServerActionsResponseMeta; export interface ListServersActionsResponse { actions: ListServersActionsResponseActionsList; meta: ListServerActionsResponseMeta; } export interface PoweroffServerRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type PoweroffServerResponseActionStatus = "running" | "success" | "error"; export type PoweroffServerResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type PoweroffServerResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type PoweroffServerResponseActionError = AddServerToPlacementGroupResponseActionError; export interface PoweroffServerResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: PoweroffServerResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: PoweroffServerResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface PoweroffServerResponse { action: PoweroffServerResponseAction; } export interface PoweronServerRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type PoweronServerResponseActionStatus = "running" | "success" | "error"; export type PoweronServerResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type PoweronServerResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type PoweronServerResponseActionError = AddServerToPlacementGroupResponseActionError; export interface PoweronServerResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: PoweronServerResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: PoweronServerResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface PoweronServerResponse { action: PoweronServerResponseAction; } export interface RebootServerRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type RebootServerResponseActionStatus = "running" | "success" | "error"; export type RebootServerResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type RebootServerResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type RebootServerResponseActionError = AddServerToPlacementGroupResponseActionError; export interface RebootServerResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: RebootServerResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: RebootServerResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface RebootServerResponse { action: RebootServerResponseAction; } export interface RebuildServerRequest { /** ID of the Server. */ id: number; /** ID or name of Image to rebuilt from. */ image: string; /** Cloud-Init user data to use during Server rebuild. This field is limited to 32KiB. If not specified, the Server's previous user_data value will be re-used (if any was set). */ user_data?: string; } /** Status of the Action. */ export type RebuildServerResponseActionStatus = "running" | "success" | "error"; export type RebuildServerResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type RebuildServerResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type RebuildServerResponseActionError = AddServerToPlacementGroupResponseActionError; export interface RebuildServerResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: RebuildServerResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: RebuildServerResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface RebuildServerResponse { /** New root password when not using SSH keys. */ root_password?: string | Redacted.Redacted | null; action?: RebuildServerResponseAction; } export interface RemoveServerFromPlacementGroupRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type RemoveServerFromPlacementGroupResponseActionStatus = "running" | "success" | "error"; export type RemoveServerFromPlacementGroupResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type RemoveServerFromPlacementGroupResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type RemoveServerFromPlacementGroupResponseActionError = AddServerToPlacementGroupResponseActionError; export interface RemoveServerFromPlacementGroupResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: RemoveServerFromPlacementGroupResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: RemoveServerFromPlacementGroupResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface RemoveServerFromPlacementGroupResponse { action: RemoveServerFromPlacementGroupResponseAction; } export interface RequestServerConsoleRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type RequestServerConsoleResponseActionStatus = "running" | "success" | "error"; export type RequestServerConsoleResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type RequestServerConsoleResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type RequestServerConsoleResponseActionError = AddServerToPlacementGroupResponseActionError; export interface RequestServerConsoleResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: RequestServerConsoleResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: RequestServerConsoleResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface RequestServerConsoleResponse { /** URL of websocket proxy to use; this includes a token which is valid for a limited time only. */ wss_url: string; /** VNC password to use for this connection (this password only works in combination with a wss_url with valid token). */ password: string | Redacted.Redacted; action: RequestServerConsoleResponseAction; } export interface ResetServerRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type ResetServerResponseActionStatus = "running" | "success" | "error"; export type ResetServerResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ResetServerResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ResetServerResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ResetServerResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ResetServerResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ResetServerResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ResetServerResponse { action: ResetServerResponseAction; } export interface ResetServerPasswordRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type ResetServerPasswordResponseActionStatus = "running" | "success" | "error"; export type ResetServerPasswordResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ResetServerPasswordResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ResetServerPasswordResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ResetServerPasswordResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ResetServerPasswordResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ResetServerPasswordResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ResetServerPasswordResponse { /** Password that will be set for this Server once the Action succeeds. */ root_password?: string | Redacted.Redacted; action?: ResetServerPasswordResponseAction; } export interface ShutdownServerRequest { /** ID of the Server. */ id: number; } /** Status of the Action. */ export type ShutdownServerResponseActionStatus = "running" | "success" | "error"; export type ShutdownServerResponseActionResourcesItem = AddServerToPlacementGroupResponseActionResourcesItem; /** Resources the Action relates to. */ export type ShutdownServerResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ShutdownServerResponseActionError = AddServerToPlacementGroupResponseActionError; export interface ShutdownServerResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ShutdownServerResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ShutdownServerResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddServerToPlacementGroupResponseActionError | null; } export interface ShutdownServerResponse { action: ShutdownServerResponseAction; } export type AddServerToPlacementGroupError = HetznerOpError; /** Add a Server to a Placement Group Adds a Server to a Placement Group. Server must be powered off for this command to succeed. #### Operation specific errors */ export const addServerToPlacementGroup: API.OperationMethod< AddServerToPlacementGroupRequest, AddServerToPlacementGroupResponse, AddServerToPlacementGroupError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(0, __c0, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type AttachServerIsoError = HetznerOpError; /** Attach an ISO to a Server Attaches an ISO to a Server. The Server will immediately see it as a new disk. An already attached ISO will automatically be detached before the new ISO is attached. Servers with attached ISOs have a modified boot order: They will try to boot from the ISO first before falling back to hard disk. */ export const attachServerIso: API.OperationMethod< AttachServerIsoRequest, AttachServerIsoResponse, AttachServerIsoError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c3, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type AttachServerToNetworkError = HetznerOpError; /** Attach a Server to a Network Attaches a Server to a network. This will complement the fixed public Server interface by adding an additional ethernet interface to the Server which is connected to the specified network. The Server will get an IP auto assigned from a subnet of type `server` in the same `network_zone`. Using the `alias_ips` attribute you can also define one or more additional IPs to the Servers. Please note that you will have to configure these IPs by hand on your Server since only the primary IP will be given out by DHCP. #### Operation specific errors */ export const attachServerToNetwork: API.OperationMethod< AttachServerToNetworkRequest, AttachServerToNetworkResponse, AttachServerToNetworkError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(136, __c17, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangeServerAliasIpsError = HetznerOpError; /** Change alias IPs of a Network Changes the alias IPs of an already attached Network. Note that the existing aliases for the specified Network will be replaced with these provided in the request body. So if you want to add an alias IP, you have to provide the existing ones from the Network plus the new alias IP in the request body. */ export const changeServerAliasIps: API.OperationMethod< ChangeServerAliasIpsRequest, ChangeServerAliasIpsResponse, ChangeServerAliasIpsError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(200, __c25, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangeServerDnsPtrError = HetznerOpError; /** Change reverse DNS entry for this Server Changes the hostname that will appear when getting the hostname belonging to the primary IPs (IPv4 and IPv6) of this Server. Floating IPs assigned to the Server are not affected by this. */ export const changeServerDnsPtr: API.OperationMethod< ChangeServerDnsPtrRequest, ChangeServerDnsPtrResponse, ChangeServerDnsPtrError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(208, __c26, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangeServerProtectionError = HetznerOpError; /** Change Server Protection Changes the protection configuration of the Server. */ export const changeServerProtection: API.OperationMethod< ChangeServerProtectionRequest, ChangeServerProtectionResponse, ChangeServerProtectionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(216, __c27, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ChangeServerTypeError = HetznerOpError; /** Change the Type of a Server Changes the type (Cores, RAM and disk sizes) of a Server. Server must be powered off for this command to succeed. This copies the content of its disk, and starts it again. You can only migrate to Server types with the same `storage_type` and equal or bigger disks. Shrinking disks is not possible as it might destroy data. If the disk gets upgraded, the Server type can not be downgraded any more. If you plan to downgrade the Server type, set `upgrade_disk` to `false`. #### Operation specific errors */ export const changeServerType: API.OperationMethod< ChangeServerTypeRequest, ChangeServerTypeResponse, ChangeServerTypeError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(224, __c28, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type CreateServerImageError = HetznerOpError; /** Create Image from a Server 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. To make sure disk content is consistent, we recommend to shut down the Server prior to creating an Image. You 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 a `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. */ export const createServerImage: API.OperationMethod< CreateServerImageRequest, CreateServerImageResponse, CreateServerImageError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(233, __c29, 1) as any as S.Schema, output: __S(238, __c29, 6) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type DetachServerFromNetworkError = HetznerOpError; /** Detach a Server from a Network Detaches a Server from a network. The interface for this network will vanish. */ export const detachServerFromNetwork: API.OperationMethod< DetachServerFromNetworkRequest, DetachServerFromNetworkResponse, DetachServerFromNetworkError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(240, __c30, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type DetachServerIsoError = HetznerOpError; /** Detach an ISO from a Server Detaches an ISO from a Server. In case no ISO Image is attached to the Server, the status of the returned Action is immediately set to `success`. */ export const detachServerIso: API.OperationMethod< DetachServerIsoRequest, DetachServerIsoResponse, DetachServerIsoError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(248, __c31, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type DisableServerBackupError = HetznerOpError; /** Disable Backups for a Server Disables the automatic backup option and deletes all existing Backups for a Server. No more additional charges for backups will be made. Caution: This immediately removes all existing backups for the Server! */ export const disableServerBackup: API.OperationMethod< DisableServerBackupRequest, DisableServerBackupResponse, DisableServerBackupError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c4, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type DisableServerRescueError = HetznerOpError; /** Disable Rescue Mode for a Server Disables the Hetzner Rescue System for a Server. This makes a Server start from its disks on next reboot. Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes. Disabling rescue mode will not reboot your Server -- you will have to do this yourself. */ export const disableServerRescue: API.OperationMethod< DisableServerRescueRequest, DisableServerRescueResponse, DisableServerRescueError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c5, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type EnableServerBackupError = HetznerOpError; /** Enable and Configure Backups for a Server Enables and configures the automatic daily backup option for the Server. Enabling automatic backups will increase the price of the Server by 20%. In return, you will get seven slots where Images of type backup can be stored. Backups are automatically created daily. */ export const enableServerBackup: API.OperationMethod< EnableServerBackupRequest, EnableServerBackupResponse, EnableServerBackupError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c6, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type EnableServerRescueError = HetznerOpError; /** Enable Rescue Mode for a Server Enable the Hetzner Rescue System for this Server. The next time a Server with enabled rescue mode boots it will start a special minimal Linux distribution designed for repair and reinstall. In case a Server cannot boot on its own you can use this to access a Server's disks. Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes. Enabling rescue mode will not [reboot](https://docs.hetzner.cloud/#server-actions-soft-reboot-a-server) your Server -- you will have to do this yourself. */ export const enableServerRescue: API.OperationMethod< EnableServerRescueRequest, EnableServerRescueResponse, EnableServerRescueError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(56, __c7, 0) as any as S.Schema, output: __S(72, __c9, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type GetServersActionError = HetznerOpError; /** Get an Action Returns a specific Action object. */ export const getServersAction: API.OperationMethod< GetServersActionRequest, GetServersActionResponse, GetServersActionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(80, __c10, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ListServerActionsError = HetznerOpError; /** List Actions for a Server Returns all Action objects for a Server. You can `sort` the results by using the sort URI parameter, and filter them with the `status` parameter. */ export const listServerActions: API.PaginatedOperationMethod< ListServerActionsRequest, ListServerActionsResponse, ListServerActionsError, HetznerOpContext, ListServerActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(88, __c11, 0) as any as S.Schema, output: __S(100, __c12, 4) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "actions", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type ListServersActionsError = HetznerOpError; /** List Actions Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter. */ export const listServersActions: API.PaginatedOperationMethod< ListServersActionsRequest, ListServersActionsResponse, ListServersActionsError, HetznerOpContext, ListServersActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(104, __c13, 0) as any as S.Schema, output: __S(100, __c12, 4) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "meta.pagination.next_page", items: "actions", pageSize: "per_page", } as const, }), paginatePageNumber, ) as any; export type PoweroffServerError = HetznerOpError; /** Power off a Server Cuts power to the Server. This forcefully stops it without giving the Server operating system time to gracefully stop. May lead to data loss, equivalent to pulling the power cord. Power off should only be used when shutdown does not work. */ export const poweroffServer: API.OperationMethod< PoweroffServerRequest, PoweroffServerResponse, PoweroffServerError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(112, __c14, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type PoweronServerError = HetznerOpError; /** Power on a Server Starts a Server by turning its power on. */ export const poweronServer: API.OperationMethod< PoweronServerRequest, PoweronServerResponse, PoweronServerError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(120, __c15, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type RebootServerError = HetznerOpError; /** Soft-reboot a Server Reboots a Server gracefully by sending an ACPI request. The Server operating system must support ACPI and react to the request, otherwise the Server will not reboot. */ export const rebootServer: API.OperationMethod< RebootServerRequest, RebootServerResponse, RebootServerError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(128, __c16, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type RebuildServerError = HetznerOpError; /** Rebuild a Server from an Image Rebuilds a Server overwriting its disk with the content of an Image, thereby **destroying all data** on the target Server The Image can either be one you have created earlier (`backup` or `snapshot` Image) or it can be a completely fresh `system` Image provided by us. You can get a list of all available Images with `GET /images`. Your Server will automatically be powered off before the rebuild command executes. */ export const rebuildServer: API.OperationMethod< RebuildServerRequest, RebuildServerResponse, RebuildServerError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(152, __c19, 0) as any as S.Schema, output: __S(153, __c19, 1) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type RemoveServerFromPlacementGroupError = HetznerOpError; /** Remove from Placement Group Removes a Server from a Placement Group. */ export const removeServerFromPlacementGroup: API.OperationMethod< RemoveServerFromPlacementGroupRequest, RemoveServerFromPlacementGroupResponse, RemoveServerFromPlacementGroupError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(160, __c20, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type RequestServerConsoleError = HetznerOpError; /** Request Console for a Server Requests credentials for remote access via VNC over websocket to keyboard, monitor, and mouse for a Server. The provided URL is valid for 1 minute, after this period a new url needs to be created to connect to the Server. How long the connection is open after the initial connect is not subject to this timeout. */ export const requestServerConsole: API.OperationMethod< RequestServerConsoleRequest, RequestServerConsoleResponse, RequestServerConsoleError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(168, __c21, 0) as any as S.Schema, output: __S(169, __c21, 1) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ResetServerError = HetznerOpError; /** Reset a Server Cuts power to a Server and starts it again. This forcefully stops it without giving the Server operating system time to gracefully stop. This may lead to data loss, it's equivalent to pulling the power cord and plugging it in again. Reset should only be used when reboot does not work. */ export const resetServer: API.OperationMethod< ResetServerRequest, ResetServerResponse, ResetServerError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(176, __c22, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ResetServerPasswordError = HetznerOpError; /** Reset root Password of a Server Resets the root password. Only works for Linux systems that are running the qemu guest agent. Server must be powered on (status `running`) in order for this operation to succeed. This will generate a new password for this Server and return it. If this does not succeed you can use the rescue system to netboot the Server and manually change your Server password by hand. */ export const resetServerPassword: API.OperationMethod< ResetServerPasswordRequest, ResetServerPasswordResponse, ResetServerPasswordError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(184, __c23, 0) as any as S.Schema, output: __S(72, __c9, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); export type ShutdownServerError = HetznerOpError; /** Shutdown a Server Shuts down a Server gracefully by sending an ACPI shutdown request. The Server operating system must support ACPI and react to the request, otherwise the Server will not shut down. Please note that the `action` status in this case only reflects whether the action was sent to the server. It does not mean that the server actually shut down successfully. If you need to ensure that the server is off, use the `poweroff` action. */ export const shutdownServer: API.OperationMethod< ShutdownServerRequest, ShutdownServerResponse, ShutdownServerError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(192, __c24, 0) as any as S.Schema, output: __S(16, __c2, 0) as any as S.Schema, errors: [UnknownHetznerError], protocol: HetznerProtocol, retry: Retry.Retry, })); // Schema builders: each runs one schema initializer, on that schema's first use. function __c0(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), placement_group: S.Number, }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/add_to_placement_group", code: 200, }), ), ).annotate({ identifier: "AddServerToPlacementGroupRequest" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, }), ).annotate({ identifier: "AddServerToPlacementGroupResponseActionResourcesItem" }); case 1: return S.Array(__S(8, __c1, 0)); case 2: return S.suspend(() => S.Struct({ code: S.String, message: S.String, }), ).annotate({ identifier: "AddServerToPlacementGroupResponseActionError" }); case 3: return S.suspend(() => S.Struct({ id: S.Number, command: S.String, status: S.String, started: S.String, finished: S.NullOr(S.String), progress: S.Number, resources: __S(9, __c1, 1), error: S.NullOr(__S(10, __c1, 2)), }), ).annotate({ identifier: "AddServerToPlacementGroupResponseAction" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ action: __S(11, __c1, 3), }), ).annotate({ identifier: "AddServerToPlacementGroupResponse" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), iso: S.String, }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/attach_iso", code: 200 })), ).annotate({ identifier: "AttachServerIsoRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/disable_backup", code: 200 })), ).annotate({ identifier: "DisableServerBackupRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/disable_rescue", code: 200 })), ).annotate({ identifier: "DisableServerRescueRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/enable_backup", code: 200 })), ).annotate({ identifier: "EnableServerBackupRequest" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), type: S.optional(S.String), ssh_keys: S.optional(__S(64, __c8, 0)), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/enable_rescue", code: 200 })), ).annotate({ identifier: "EnableServerRescueRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.Array(S.Number); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ root_password: S.optional(S.String.pipe(T.SensitiveValue({}))), action: S.optional(__S(11, __c1, 3)), }), ).annotate({ identifier: "EnableServerRescueResponse" }); } } function __c10(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "GET", uri: "/servers/actions/{id}", code: 200 })), ).annotate({ identifier: "GetServersActionRequest" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), sort: S.optional(__S(96, __c12, 0).pipe(T.Query())), status: S.optional(__S(96, __c12, 0).pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), }).pipe(T.Http({ method: "GET", uri: "/servers/{id}/actions", code: 200 })), ).annotate({ identifier: "ListServerActionsRequest" }); } } function __c12(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.Array(__S(11, __c1, 3)); case 2: return S.suspend(() => S.Struct({ page: S.Number, per_page: S.Number, previous_page: S.NullOr(S.Number), next_page: S.NullOr(S.Number), last_page: S.NullOr(S.Number), total_entries: S.NullOr(S.Number), }), ).annotate({ identifier: "ListServerActionsResponseMetaPagination" }); case 3: return S.suspend(() => S.Struct({ pagination: __S(98, __c12, 2), }), ).annotate({ identifier: "ListServerActionsResponseMeta" }); case 4: return S.suspend(() => S.Struct({ actions: __S(97, __c12, 1), meta: __S(99, __c12, 3), }), ).annotate({ identifier: "ListServerActionsResponse" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.optional(__S(64, __c8, 0).pipe(T.Query())), sort: S.optional(__S(96, __c12, 0).pipe(T.Query())), status: S.optional(__S(96, __c12, 0).pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), per_page: S.optional(S.Number.pipe(T.Query())), }).pipe(T.Http({ method: "GET", uri: "/servers/actions", code: 200 })), ).annotate({ identifier: "ListServersActionsRequest" }); } } function __c14(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/poweroff", code: 200 })), ).annotate({ identifier: "PoweroffServerRequest" }); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/poweron", code: 200 })), ).annotate({ identifier: "PoweronServerRequest" }); } } function __c16(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/reboot", code: 200 })), ).annotate({ identifier: "RebootServerRequest" }); } } function __c17(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), network: S.Number, ip: S.optional(S.String), alias_ips: S.optional(__S(144, __c18, 0)), ip_range: S.optional(S.String), }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/attach_to_network", code: 200 }), ), ).annotate({ identifier: "AttachServerToNetworkRequest" }); } } function __c18(j: number): any { switch (j) { case 0: return S.Array(S.String); } } function __c19(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), image: S.String, user_data: S.optional(S.String), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/rebuild", code: 200 })), ).annotate({ identifier: "RebuildServerRequest" }); case 1: return S.suspend(() => S.Struct({ root_password: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))), action: S.optional(__S(11, __c1, 3)), }), ).annotate({ identifier: "RebuildServerResponse" }); } } function __c20(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/remove_from_placement_group", code: 200, }), ), ).annotate({ identifier: "RemoveServerFromPlacementGroupRequest" }); } } function __c21(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/request_console", code: 200 }), ), ).annotate({ identifier: "RequestServerConsoleRequest" }); case 1: return S.suspend(() => S.Struct({ wss_url: S.String, password: S.String.pipe(T.SensitiveValue({})), action: __S(11, __c1, 3), }), ).annotate({ identifier: "RequestServerConsoleResponse" }); } } function __c22(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/reset", code: 200 })), ).annotate({ identifier: "ResetServerRequest" }); } } function __c23(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/reset_password", code: 200 })), ).annotate({ identifier: "ResetServerPasswordRequest" }); } } function __c24(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/shutdown", code: 200 })), ).annotate({ identifier: "ShutdownServerRequest" }); } } function __c25(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), network: S.Number, alias_ips: __S(144, __c18, 0), }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/change_alias_ips", code: 200 }), ), ).annotate({ identifier: "ChangeServerAliasIpsRequest" }); } } function __c26(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), ip: S.String, dns_ptr: S.NullOr(S.String), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/change_dns_ptr", code: 200 })), ).annotate({ identifier: "ChangeServerDnsPtrRequest" }); } } function __c27(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), delete: S.optional(S.Boolean), rebuild: S.optional(S.Boolean), }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/change_protection", code: 200 }), ), ).annotate({ identifier: "ChangeServerProtectionRequest" }); } } function __c28(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), upgrade_disk: S.Boolean, server_type: S.String, }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/change_type", code: 200 })), ).annotate({ identifier: "ChangeServerTypeRequest" }); } } function __c29(j: number): any { switch (j) { case 0: return S.Record(S.String, S.String); case 1: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), description: S.optional(S.String), type: S.optional(S.String), labels: S.optional(__S(232, __c29, 0)), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/create_image", code: 200 })), ).annotate({ identifier: "CreateServerImageRequest" }); case 2: return S.suspend(() => S.Struct({ id: S.Number, name: S.String, }), ).annotate({ identifier: "CreateServerImageResponseImageCreatedFrom" }); case 3: return S.suspend(() => S.Struct({ delete: S.Boolean, }), ).annotate({ identifier: "CreateServerImageResponseImageProtection" }); case 4: return S.suspend(() => S.Struct({ unavailable_after: S.String, announced: S.String, }), ).annotate({ identifier: "CreateServerImageResponseImageDeprecation" }); case 5: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, status: S.String, name: S.NullOr(S.String), description: S.String, image_size: S.NullOr(S.Number), disk_size: S.Number, created: S.String, created_from: S.NullOr(__S(234, __c29, 2)), bound_to: S.NullOr(S.Number), os_flavor: S.String, os_version: S.NullOr(S.String), rapid_deploy: S.optional(S.Boolean), protection: __S(235, __c29, 3), deprecated: S.NullOr(S.String), deprecation: S.NullOr(__S(236, __c29, 4)), deleted: S.NullOr(S.String), labels: __S(232, __c29, 0), architecture: S.String, }), ).annotate({ identifier: "CreateServerImageResponseImage" }); case 6: return S.suspend(() => S.Struct({ image: S.optional(__S(237, __c29, 5)), action: S.optional(__S(11, __c1, 3)), }), ).annotate({ identifier: "CreateServerImageResponse" }); } } function __c30(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), network: S.Number, }).pipe( T.Http({ method: "POST", uri: "/servers/{id}/actions/detach_from_network", code: 200 }), ), ).annotate({ identifier: "DetachServerFromNetworkRequest" }); } } function __c31(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "POST", uri: "/servers/{id}/actions/detach_iso", code: 200 })), ).annotate({ identifier: "DetachServerIsoRequest" }); } } // Schema table: entry i is schema j of builder f, made on first reach. function __S(i: number, f: (j: number) => unknown, j: number): any { return (__s[i] ??= __L.at(f, j)); }