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 { 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 }; /** Protocol of the Load Balancer. */ export type AddLoadBalancerServiceRequestProtocol = "tcp" | "http" | "https"; /** Type of the health check. */ export type AddLoadBalancerServiceRequestHealthCheckProtocol = "tcp" | "http"; /** List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. */ export type AddLoadBalancerServiceRequestHealthCheckHttpStatusCodesList = Array; /** Additional configuration for protocol http. */ export interface AddLoadBalancerServiceRequestHealthCheckHttp { /** Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent. */ domain?: string | null; /** HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. */ path?: string; /** String that must be contained in HTTP response in order to pass the health check. */ response?: string; /** List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. */ status_codes?: AddLoadBalancerServiceRequestHealthCheckHttpStatusCodesList; /** Use HTTPS for health check. */ tls?: boolean; } export interface AddLoadBalancerServiceRequestHealthCheck { /** Type of the health check. */ protocol: AddLoadBalancerServiceRequestHealthCheckProtocol | (string & {}); /** Port the health check will be performed on. */ port: number; /** Time interval in seconds health checks are performed. */ interval: number; /** Time in seconds after an attempt is considered a timeout. */ timeout: number; /** Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. */ retries: number; /** Additional configuration for protocol http. */ http?: AddLoadBalancerServiceRequestHealthCheckHttp; } /** IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. */ export type AddLoadBalancerServiceRequestHttpCertificatesList = Array; /** Configuration option for protocols http and https. */ export interface AddLoadBalancerServiceRequestHttp { /** Name of the cookie used for sticky sessions. */ cookie_name?: string; /** Lifetime of the cookie used for sticky sessions (in seconds). */ cookie_lifetime?: number; /** Idle timeout in seconds for the client and server side. */ timeout_idle?: number; /** IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. */ certificates?: AddLoadBalancerServiceRequestHttpCertificatesList; /** Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. */ redirect_http?: boolean; /** Use sticky sessions. Only available if `protocol` is `http` or `https`. */ sticky_sessions?: boolean; } export interface AddLoadBalancerServiceRequest { /** ID of the Load Balancer. */ id: number; /** Protocol of the Load Balancer. */ protocol: AddLoadBalancerServiceRequestProtocol | (string & {}); /** Port the Load Balancer listens on. */ listen_port: number; /** Port the Load Balancer will balance to. */ destination_port: number; /** Is Proxyprotocol enabled or not. */ proxyprotocol: boolean; health_check: AddLoadBalancerServiceRequestHealthCheck; /** Configuration option for protocols http and https. */ http?: AddLoadBalancerServiceRequestHttp; } /** Status of the Action. */ export type AddLoadBalancerServiceResponseActionStatus = "running" | "success" | "error"; export interface AddLoadBalancerServiceResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type AddLoadBalancerServiceResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface AddLoadBalancerServiceResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface AddLoadBalancerServiceResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AddLoadBalancerServiceResponseActionStatus; /** 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: AddLoadBalancerServiceResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface AddLoadBalancerServiceResponse { action: AddLoadBalancerServiceResponseAction; } /** Type of the resource. */ export type AddLoadBalancerTargetRequestType = "server" | "label_selector" | "ip"; /** Configuration for type Server, only valid and required if type is `server`. */ export interface AddLoadBalancerTargetRequestServer { /** ID of the Server. */ id: number; /** Optional public IP of the Server to use as target. Must be the Primary IPv4 of the Server, or an IPv6 host address within IPv6 /64 subnet of the Server. If omitted, the Primary IPv4 of the Server is used. Must not be a private IP and is only valid for public targets. */ ip?: string; } /** Configuration for label selector targets, only valid and required if type is `label_selector`. */ export interface AddLoadBalancerTargetRequestLabelSelector { /** Label selector. */ selector: string; } /** Configuration for an IP target. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only valid and required if type is `ip`. */ export interface AddLoadBalancerTargetRequestIp { /** IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. */ ip: string; } export interface AddLoadBalancerTargetRequest { /** ID of the Load Balancer. */ id: number; /** Type of the resource. */ type: AddLoadBalancerTargetRequestType | (string & {}); /** Configuration for type Server, only valid and required if type is `server`. */ server?: AddLoadBalancerTargetRequestServer; /** Configuration for label selector targets, only valid and required if type is `label_selector`. */ label_selector?: AddLoadBalancerTargetRequestLabelSelector; /** Configuration for an IP target. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only valid and required if type is `ip`. */ ip?: AddLoadBalancerTargetRequestIp; /** Use the private network IP instead of the public IP of the Server, requires the Server and Load Balancer to be in the same network. Only valid for target types `server` and `label_selector`. */ use_private_ip?: boolean; } /** Status of the Action. */ export type AddLoadBalancerTargetResponseActionStatus = "running" | "success" | "error"; export type AddLoadBalancerTargetResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type AddLoadBalancerTargetResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type AddLoadBalancerTargetResponseActionError = AddLoadBalancerServiceResponseActionError; export interface AddLoadBalancerTargetResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AddLoadBalancerTargetResponseActionStatus; /** 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: AddLoadBalancerTargetResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface AddLoadBalancerTargetResponse { action: AddLoadBalancerTargetResponseAction; } export interface AttachLoadBalancerToNetworkRequest { /** ID of the Load Balancer. */ id: number; /** ID of an existing network to attach the Load Balancer to. */ network: number; /** IP to request to be assigned to this Load Balancer; if you do not provide this then you will be auto assigned an IP address. */ ip?: string; /** 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 AttachLoadBalancerToNetworkResponseActionStatus = "running" | "success" | "error"; export type AttachLoadBalancerToNetworkResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type AttachLoadBalancerToNetworkResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type AttachLoadBalancerToNetworkResponseActionError = AddLoadBalancerServiceResponseActionError; export interface AttachLoadBalancerToNetworkResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AttachLoadBalancerToNetworkResponseActionStatus; /** 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: AttachLoadBalancerToNetworkResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface AttachLoadBalancerToNetworkResponse { action: AttachLoadBalancerToNetworkResponseAction; } /** Type of the algorithm. */ export type ChangeLoadBalancerAlgorithmRequestType = "round_robin" | "least_connections"; export interface ChangeLoadBalancerAlgorithmRequest { /** ID of the Load Balancer. */ id: number; /** Type of the algorithm. */ type: ChangeLoadBalancerAlgorithmRequestType | (string & {}); } /** Status of the Action. */ export type ChangeLoadBalancerAlgorithmResponseActionStatus = "running" | "success" | "error"; export type ChangeLoadBalancerAlgorithmResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeLoadBalancerAlgorithmResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeLoadBalancerAlgorithmResponseActionError = AddLoadBalancerServiceResponseActionError; export interface ChangeLoadBalancerAlgorithmResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeLoadBalancerAlgorithmResponseActionStatus; /** 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: ChangeLoadBalancerAlgorithmResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface ChangeLoadBalancerAlgorithmResponse { action: ChangeLoadBalancerAlgorithmResponseAction; } export interface ChangeLoadBalancerDnsPtrRequest { /** ID of the Load Balancer. */ 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 ChangeLoadBalancerDnsPtrResponseActionStatus = "running" | "success" | "error"; export type ChangeLoadBalancerDnsPtrResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeLoadBalancerDnsPtrResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeLoadBalancerDnsPtrResponseActionError = AddLoadBalancerServiceResponseActionError; export interface ChangeLoadBalancerDnsPtrResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeLoadBalancerDnsPtrResponseActionStatus; /** 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: ChangeLoadBalancerDnsPtrResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface ChangeLoadBalancerDnsPtrResponse { action: ChangeLoadBalancerDnsPtrResponseAction; } export interface ChangeLoadBalancerProtectionRequest { /** ID of the Load Balancer. */ id: number; /** If true, prevents the Load Balancer from being deleted. */ delete?: boolean; } /** Status of the Action. */ export type ChangeLoadBalancerProtectionResponseActionStatus = "running" | "success" | "error"; export type ChangeLoadBalancerProtectionResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeLoadBalancerProtectionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeLoadBalancerProtectionResponseActionError = AddLoadBalancerServiceResponseActionError; export interface ChangeLoadBalancerProtectionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeLoadBalancerProtectionResponseActionStatus; /** 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: ChangeLoadBalancerProtectionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface ChangeLoadBalancerProtectionResponse { action: ChangeLoadBalancerProtectionResponseAction; } export interface ChangeLoadBalancerTypeRequest { /** ID of the Load Balancer. */ id: number; /** ID or name of Load Balancer type the Load Balancer should migrate to. */ load_balancer_type: string; } /** Status of the Action. */ export type ChangeLoadBalancerTypeResponseActionStatus = "running" | "success" | "error"; export type ChangeLoadBalancerTypeResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeLoadBalancerTypeResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeLoadBalancerTypeResponseActionError = AddLoadBalancerServiceResponseActionError; export interface ChangeLoadBalancerTypeResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeLoadBalancerTypeResponseActionStatus; /** 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: ChangeLoadBalancerTypeResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface ChangeLoadBalancerTypeResponse { action: ChangeLoadBalancerTypeResponseAction; } export interface DeleteLoadBalancerServiceRequest { /** ID of the Load Balancer. */ id: number; /** The listen port of the service you want to delete. */ listen_port: number; } /** Status of the Action. */ export type DeleteLoadBalancerServiceResponseActionStatus = "running" | "success" | "error"; export type DeleteLoadBalancerServiceResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type DeleteLoadBalancerServiceResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DeleteLoadBalancerServiceResponseActionError = AddLoadBalancerServiceResponseActionError; export interface DeleteLoadBalancerServiceResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DeleteLoadBalancerServiceResponseActionStatus; /** 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: DeleteLoadBalancerServiceResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface DeleteLoadBalancerServiceResponse { action: DeleteLoadBalancerServiceResponseAction; } export interface DetachLoadBalancerFromNetworkRequest { /** ID of the Load Balancer. */ id: number; /** ID of an existing network to detach the Load Balancer from. */ network: number; } /** Status of the Action. */ export type DetachLoadBalancerFromNetworkResponseActionStatus = "running" | "success" | "error"; export type DetachLoadBalancerFromNetworkResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type DetachLoadBalancerFromNetworkResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DetachLoadBalancerFromNetworkResponseActionError = AddLoadBalancerServiceResponseActionError; export interface DetachLoadBalancerFromNetworkResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DetachLoadBalancerFromNetworkResponseActionStatus; /** 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: DetachLoadBalancerFromNetworkResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface DetachLoadBalancerFromNetworkResponse { action: DetachLoadBalancerFromNetworkResponseAction; } export interface DisableLoadBalancerPublicInterfaceRequest { /** ID of the Load Balancer. */ id: number; } /** Status of the Action. */ export type DisableLoadBalancerPublicInterfaceResponseActionStatus = | "running" | "success" | "error"; export type DisableLoadBalancerPublicInterfaceResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type DisableLoadBalancerPublicInterfaceResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DisableLoadBalancerPublicInterfaceResponseActionError = AddLoadBalancerServiceResponseActionError; export interface DisableLoadBalancerPublicInterfaceResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DisableLoadBalancerPublicInterfaceResponseActionStatus; /** 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: DisableLoadBalancerPublicInterfaceResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface DisableLoadBalancerPublicInterfaceResponse { action: DisableLoadBalancerPublicInterfaceResponseAction; } export interface EnableLoadBalancerPublicInterfaceRequest { /** ID of the Load Balancer. */ id: number; } /** Status of the Action. */ export type EnableLoadBalancerPublicInterfaceResponseActionStatus = "running" | "success" | "error"; export type EnableLoadBalancerPublicInterfaceResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type EnableLoadBalancerPublicInterfaceResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type EnableLoadBalancerPublicInterfaceResponseActionError = AddLoadBalancerServiceResponseActionError; export interface EnableLoadBalancerPublicInterfaceResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: EnableLoadBalancerPublicInterfaceResponseActionStatus; /** 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: EnableLoadBalancerPublicInterfaceResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface EnableLoadBalancerPublicInterfaceResponse { action: EnableLoadBalancerPublicInterfaceResponseAction; } export interface GetLoadBalancersActionRequest { /** ID of the Action. */ id: number; } /** Status of the Action. */ export type GetLoadBalancersActionResponseActionStatus = "running" | "success" | "error"; export type GetLoadBalancersActionResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type GetLoadBalancersActionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type GetLoadBalancersActionResponseActionError = AddLoadBalancerServiceResponseActionError; export interface GetLoadBalancersActionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: GetLoadBalancersActionResponseActionStatus; /** 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: GetLoadBalancersActionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface GetLoadBalancersActionResponse { action: GetLoadBalancersActionResponseAction; } export type ListLoadBalancerActionsRequestSortItem = | "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 ListLoadBalancerActionsRequestSortList = Array< ListLoadBalancerActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListLoadBalancerActionsRequestStatusItem = "running" | "success" | "error"; export type ListLoadBalancerActionsRequestStatusList = Array< ListLoadBalancerActionsRequestStatusItem | (string & {}) >; export interface ListLoadBalancerActionsRequest { /** ID of the Load Balancer. */ id: number; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListLoadBalancerActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListLoadBalancerActionsRequestStatusList; /** 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 ListLoadBalancerActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListLoadBalancerActionsResponseActionsItemResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListLoadBalancerActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListLoadBalancerActionsResponseActionsItemError = AddLoadBalancerServiceResponseActionError; export interface ListLoadBalancerActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListLoadBalancerActionsResponseActionsItemStatus; /** 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: ListLoadBalancerActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export type ListLoadBalancerActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListLoadBalancerActionsResponseMetaPagination { /** 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 ListLoadBalancerActionsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListLoadBalancerActionsResponseMetaPagination; } export interface ListLoadBalancerActionsResponse { actions: ListLoadBalancerActionsResponseActionsList; meta: ListLoadBalancerActionsResponseMeta; } export type ListLoadBalancersActionsRequestIdList = Array; export type ListLoadBalancersActionsRequestSortItem = | "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 ListLoadBalancersActionsRequestSortList = Array< ListLoadBalancersActionsRequestSortItem | (string & {}) >; /** Status of the Action. */ export type ListLoadBalancersActionsRequestStatusItem = "running" | "success" | "error"; export type ListLoadBalancersActionsRequestStatusList = Array< ListLoadBalancersActionsRequestStatusItem | (string & {}) >; export interface ListLoadBalancersActionsRequest { /** Filter the actions by ID. May be used multiple times. The response will only contain actions matching the specified IDs. */ id?: ListLoadBalancersActionsRequestIdList; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListLoadBalancersActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListLoadBalancersActionsRequestStatusList; /** 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 ListLoadBalancersActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListLoadBalancersActionsResponseActionsItemResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListLoadBalancersActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListLoadBalancersActionsResponseActionsItemError = AddLoadBalancerServiceResponseActionError; export interface ListLoadBalancersActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListLoadBalancersActionsResponseActionsItemStatus; /** 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: ListLoadBalancersActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export type ListLoadBalancersActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export type ListLoadBalancersActionsResponseMetaPagination = ListLoadBalancerActionsResponseMetaPagination; export type ListLoadBalancersActionsResponseMeta = ListLoadBalancerActionsResponseMeta; export interface ListLoadBalancersActionsResponse { actions: ListLoadBalancersActionsResponseActionsList; meta: ListLoadBalancerActionsResponseMeta; } /** Type of the resource. */ export type RemoveLoadBalancerTargetRequestType = "server" | "label_selector" | "ip"; /** Configuration for type Server, only valid and required if type is `server`. */ export type RemoveLoadBalancerTargetRequestServer = AddLoadBalancerTargetRequestServer; /** Configuration for label selector targets, only valid and required if type is `label_selector`. */ export type RemoveLoadBalancerTargetRequestLabelSelector = AddLoadBalancerTargetRequestLabelSelector; /** Configuration for an IP target. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only valid and required if type is `ip`. */ export type RemoveLoadBalancerTargetRequestIp = AddLoadBalancerTargetRequestIp; export interface RemoveLoadBalancerTargetRequest { /** ID of the Load Balancer. */ id: number; /** Type of the resource. */ type: RemoveLoadBalancerTargetRequestType | (string & {}); /** Configuration for type Server, only valid and required if type is `server`. */ server?: AddLoadBalancerTargetRequestServer; /** Configuration for label selector targets, only valid and required if type is `label_selector`. */ label_selector?: AddLoadBalancerTargetRequestLabelSelector; /** Configuration for an IP target. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well. Only valid and required if type is `ip`. */ ip?: AddLoadBalancerTargetRequestIp; } /** Status of the Action. */ export type RemoveLoadBalancerTargetResponseActionStatus = "running" | "success" | "error"; export type RemoveLoadBalancerTargetResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type RemoveLoadBalancerTargetResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type RemoveLoadBalancerTargetResponseActionError = AddLoadBalancerServiceResponseActionError; export interface RemoveLoadBalancerTargetResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: RemoveLoadBalancerTargetResponseActionStatus; /** 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: RemoveLoadBalancerTargetResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface RemoveLoadBalancerTargetResponse { action: RemoveLoadBalancerTargetResponseAction; } /** Protocol of the Load Balancer. */ export type UpdateLoadBalancerServiceRequestProtocol = "tcp" | "http" | "https"; /** Type of the health check. */ export type UpdateLoadBalancerServiceRequestHealthCheckProtocol = "tcp" | "http"; /** List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. */ export type UpdateLoadBalancerServiceRequestHealthCheckHttpStatusCodesList = Array; /** Additional configuration for protocol http. */ export interface UpdateLoadBalancerServiceRequestHealthCheckHttp { /** Host header to send in the HTTP request. May not contain spaces, percent or backslash symbols. Can be null, in that case no host header is sent. */ domain?: string | null; /** HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. */ path?: string; /** String that must be contained in HTTP response in order to pass the health check. */ response?: string; /** List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. */ status_codes?: UpdateLoadBalancerServiceRequestHealthCheckHttpStatusCodesList; /** Use HTTPS for health check. */ tls?: boolean; } export interface UpdateLoadBalancerServiceRequestHealthCheck { /** Type of the health check. */ protocol: UpdateLoadBalancerServiceRequestHealthCheckProtocol | (string & {}); /** Port the health check will be performed on. */ port: number; /** Time interval in seconds health checks are performed. */ interval: number; /** Time in seconds after an attempt is considered a timeout. */ timeout: number; /** Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. */ retries: number; /** Additional configuration for protocol http. */ http?: UpdateLoadBalancerServiceRequestHealthCheckHttp; } /** IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. */ export type UpdateLoadBalancerServiceRequestHttpCertificatesList = Array; /** Configuration option for protocols http and https. */ export interface UpdateLoadBalancerServiceRequestHttp { /** Name of the cookie used for sticky sessions. */ cookie_name?: string; /** Lifetime of the cookie used for sticky sessions (in seconds). */ cookie_lifetime?: number; /** Idle timeout in seconds for the client and server side. */ timeout_idle?: number; /** IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. */ certificates?: UpdateLoadBalancerServiceRequestHttpCertificatesList; /** Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. */ redirect_http?: boolean; /** Use sticky sessions. Only available if `protocol` is `http` or `https`. */ sticky_sessions?: boolean; } export interface UpdateLoadBalancerServiceRequest { /** ID of the Load Balancer. */ id: number; /** Protocol of the Load Balancer. */ protocol?: UpdateLoadBalancerServiceRequestProtocol | (string & {}); /** Port the Load Balancer listens on. */ listen_port: number; /** Port the Load Balancer will balance to. */ destination_port?: number; /** Is Proxyprotocol enabled or not. */ proxyprotocol?: boolean; health_check?: UpdateLoadBalancerServiceRequestHealthCheck; /** Configuration option for protocols http and https. */ http?: UpdateLoadBalancerServiceRequestHttp; } /** Status of the Action. */ export type UpdateLoadBalancerServiceResponseActionStatus = "running" | "success" | "error"; export type UpdateLoadBalancerServiceResponseActionResourcesItem = AddLoadBalancerServiceResponseActionResourcesItem; /** Resources the Action relates to. */ export type UpdateLoadBalancerServiceResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type UpdateLoadBalancerServiceResponseActionError = AddLoadBalancerServiceResponseActionError; export interface UpdateLoadBalancerServiceResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: UpdateLoadBalancerServiceResponseActionStatus; /** 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: UpdateLoadBalancerServiceResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddLoadBalancerServiceResponseActionError | null; } export interface UpdateLoadBalancerServiceResponse { action: UpdateLoadBalancerServiceResponseAction; } export type AddLoadBalancerServiceError = HetznerOpError; /** Add Service Adds a service to a Load Balancer. #### Operation specific errors */ export const addLoadBalancerService: API.OperationMethod< AddLoadBalancerServiceRequest, AddLoadBalancerServiceResponse, AddLoadBalancerServiceError, 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 AddLoadBalancerTargetError = HetznerOpError; /** Add Target Adds a target to a Load Balancer. #### Operation specific errors */ export const addLoadBalancerTarget: API.OperationMethod< AddLoadBalancerTargetRequest, AddLoadBalancerTargetResponse, AddLoadBalancerTargetError, 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 AttachLoadBalancerToNetworkError = HetznerOpError; /** Attach a Load Balancer to a Network Attach a Load Balancer to a Network. #### Operation specific errors */ export const attachLoadBalancerToNetwork: API.OperationMethod< AttachLoadBalancerToNetworkRequest, AttachLoadBalancerToNetworkResponse, AttachLoadBalancerToNetworkError, 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 ChangeLoadBalancerAlgorithmError = HetznerOpError; /** Change Algorithm Change the algorithm that determines to which target new requests are sent. */ export const changeLoadBalancerAlgorithm: API.OperationMethod< ChangeLoadBalancerAlgorithmRequest, ChangeLoadBalancerAlgorithmResponse, ChangeLoadBalancerAlgorithmError, 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 ChangeLoadBalancerDnsPtrError = HetznerOpError; /** Change reverse DNS entry for this Load Balancer Changes the hostname that will appear when getting the hostname belonging to the public IPs (IPv4 and IPv6) of this Load Balancer. Floating IPs assigned to the Server are not affected by this. */ export const changeLoadBalancerDnsPtr: API.OperationMethod< ChangeLoadBalancerDnsPtrRequest, ChangeLoadBalancerDnsPtrResponse, ChangeLoadBalancerDnsPtrError, 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 ChangeLoadBalancerProtectionError = HetznerOpError; /** Change Load Balancer Protection Changes the protection configuration of a Load Balancer. */ export const changeLoadBalancerProtection: API.OperationMethod< ChangeLoadBalancerProtectionRequest, ChangeLoadBalancerProtectionResponse, ChangeLoadBalancerProtectionError, 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 ChangeLoadBalancerTypeError = HetznerOpError; /** Change the Type of a Load Balancer Changes the type (Max Services, Max Targets and Max Connections) of a Load Balancer. #### Operation specific errors */ export const changeLoadBalancerType: API.OperationMethod< ChangeLoadBalancerTypeRequest, ChangeLoadBalancerTypeResponse, ChangeLoadBalancerTypeError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(144, __c18, 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 DeleteLoadBalancerServiceError = HetznerOpError; /** Delete Service Delete a service of a Load Balancer. */ export const deleteLoadBalancerService: API.OperationMethod< DeleteLoadBalancerServiceRequest, DeleteLoadBalancerServiceResponse, DeleteLoadBalancerServiceError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(152, __c19, 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 DetachLoadBalancerFromNetworkError = HetznerOpError; /** Detach a Load Balancer from a Network Detaches a Load Balancer from a network. */ export const detachLoadBalancerFromNetwork: API.OperationMethod< DetachLoadBalancerFromNetworkRequest, DetachLoadBalancerFromNetworkResponse, DetachLoadBalancerFromNetworkError, 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 DisableLoadBalancerPublicInterfaceError = HetznerOpError; /** Disable the public interface of a Load Balancer Disable the public interface of a Load Balancer. The Load Balancer will be not accessible from the internet via its public IPs. #### Operation specific errors */ export const disableLoadBalancerPublicInterface: API.OperationMethod< DisableLoadBalancerPublicInterfaceRequest, DisableLoadBalancerPublicInterfaceResponse, DisableLoadBalancerPublicInterfaceError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(168, __c21, 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 EnableLoadBalancerPublicInterfaceError = HetznerOpError; /** Enable the public interface of a Load Balancer Enable the public interface of a Load Balancer. The Load Balancer will be accessible from the internet via its public IPs. */ export const enableLoadBalancerPublicInterface: API.OperationMethod< EnableLoadBalancerPublicInterfaceRequest, EnableLoadBalancerPublicInterfaceResponse, EnableLoadBalancerPublicInterfaceError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(56, __c7, 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 GetLoadBalancersActionError = HetznerOpError; /** Get an Action Returns a specific Action object. */ export const getLoadBalancersAction: API.OperationMethod< GetLoadBalancersActionRequest, GetLoadBalancersActionResponse, GetLoadBalancersActionError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(64, __c8, 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 ListLoadBalancerActionsError = HetznerOpError; /** List Actions for a Load Balancer Returns all Action objects for a Load Balancer. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter. */ export const listLoadBalancerActions: API.PaginatedOperationMethod< ListLoadBalancerActionsRequest, ListLoadBalancerActionsResponse, ListLoadBalancerActionsError, HetznerOpContext, ListLoadBalancerActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(72, __c9, 0) as any as S.Schema, output: __S(84, __c10, 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 ListLoadBalancersActionsError = 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 listLoadBalancersActions: API.PaginatedOperationMethod< ListLoadBalancersActionsRequest, ListLoadBalancersActionsResponse, ListLoadBalancersActionsError, HetznerOpContext, ListLoadBalancersActionsResponseActionsItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: __S(88, __c11, 0) as any as S.Schema, output: __S(84, __c10, 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 RemoveLoadBalancerTargetError = HetznerOpError; /** Remove Target Removes a target from a Load Balancer. */ export const removeLoadBalancerTarget: API.OperationMethod< RemoveLoadBalancerTargetRequest, RemoveLoadBalancerTargetResponse, RemoveLoadBalancerTargetError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(96, __c12, 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 UpdateLoadBalancerServiceError = HetznerOpError; /** Update Service Updates a Load Balancer Service. #### Operation specific errors */ export const updateLoadBalancerService: API.OperationMethod< UpdateLoadBalancerServiceRequest, UpdateLoadBalancerServiceResponse, UpdateLoadBalancerServiceError, HetznerOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(104, __c13, 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()), protocol: S.String, listen_port: S.Number, destination_port: S.Number, proxyprotocol: S.Boolean, health_check: __S(34, __c4, 2), http: S.optional(__S(35, __c4, 3)), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/add_service", code: 200 }), ), ).annotate({ identifier: "AddLoadBalancerServiceRequest" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number, type: S.String, }), ).annotate({ identifier: "AddLoadBalancerServiceResponseActionResourcesItem" }); case 1: return S.Array(__S(8, __c1, 0)); case 2: return S.suspend(() => S.Struct({ code: S.String, message: S.String, }), ).annotate({ identifier: "AddLoadBalancerServiceResponseActionError" }); 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: "AddLoadBalancerServiceResponseAction" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ action: __S(11, __c1, 3), }), ).annotate({ identifier: "AddLoadBalancerServiceResponse" }); } } function __c3(j: number): any { switch (j) { case 0: return S.Array(S.Number); } } function __c4(j: number): any { switch (j) { case 0: return S.Array(S.String); case 1: return S.suspend(() => S.Struct({ domain: S.optional(S.NullOr(S.String)), path: S.optional(S.String), response: S.optional(S.String), status_codes: S.optional(__S(32, __c4, 0)), tls: S.optional(S.Boolean), }), ).annotate({ identifier: "AddLoadBalancerServiceRequestHealthCheckHttp" }); case 2: return S.suspend(() => S.Struct({ protocol: S.String, port: S.Number, interval: S.Number, timeout: S.Number, retries: S.Number, http: S.optional(__S(33, __c4, 1)), }), ).annotate({ identifier: "AddLoadBalancerServiceRequestHealthCheck" }); case 3: return S.suspend(() => S.Struct({ cookie_name: S.optional(S.String), cookie_lifetime: S.optional(S.Number), timeout_idle: S.optional(S.Number), certificates: S.optional(__S(24, __c3, 0)), redirect_http: S.optional(S.Boolean), sticky_sessions: S.optional(S.Boolean), }), ).annotate({ identifier: "AddLoadBalancerServiceRequestHttp" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), type: S.String, server: S.optional(__S(48, __c6, 0)), label_selector: S.optional(__S(49, __c6, 1)), ip: S.optional(__S(50, __c6, 2)), use_private_ip: S.optional(S.Boolean), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/add_target", code: 200 }), ), ).annotate({ identifier: "AddLoadBalancerTargetRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number, ip: S.optional(S.String), }), ).annotate({ identifier: "AddLoadBalancerTargetRequestServer" }); case 1: return S.suspend(() => S.Struct({ selector: S.String, }), ).annotate({ identifier: "AddLoadBalancerTargetRequestLabelSelector" }); case 2: return S.suspend(() => S.Struct({ ip: S.String, }), ).annotate({ identifier: "AddLoadBalancerTargetRequestIp" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/enable_public_interface", code: 200, }), ), ).annotate({ identifier: "EnableLoadBalancerPublicInterfaceRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), }).pipe(T.Http({ method: "GET", uri: "/load_balancers/actions/{id}", code: 200 })), ).annotate({ identifier: "GetLoadBalancersActionRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), sort: S.optional(__S(80, __c10, 0).pipe(T.Query())), status: S.optional(__S(80, __c10, 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: "/load_balancers/{id}/actions", code: 200 })), ).annotate({ identifier: "ListLoadBalancerActionsRequest" }); } } function __c10(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: "ListLoadBalancerActionsResponseMetaPagination" }); case 3: return S.suspend(() => S.Struct({ pagination: __S(82, __c10, 2), }), ).annotate({ identifier: "ListLoadBalancerActionsResponseMeta" }); case 4: return S.suspend(() => S.Struct({ actions: __S(81, __c10, 1), meta: __S(83, __c10, 3), }), ).annotate({ identifier: "ListLoadBalancerActionsResponse" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.optional(__S(24, __c3, 0).pipe(T.Query())), sort: S.optional(__S(80, __c10, 0).pipe(T.Query())), status: S.optional(__S(80, __c10, 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: "/load_balancers/actions", code: 200 })), ).annotate({ identifier: "ListLoadBalancersActionsRequest" }); } } function __c12(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), type: S.String, server: S.optional(__S(48, __c6, 0)), label_selector: S.optional(__S(49, __c6, 1)), ip: S.optional(__S(50, __c6, 2)), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/remove_target", code: 200 }), ), ).annotate({ identifier: "RemoveLoadBalancerTargetRequest" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), protocol: S.optional(S.String), listen_port: S.Number, destination_port: S.optional(S.Number), proxyprotocol: S.optional(S.Boolean), health_check: S.optional(__S(34, __c4, 2)), http: S.optional(__S(35, __c4, 3)), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/update_service", code: 200 }), ), ).annotate({ identifier: "UpdateLoadBalancerServiceRequest" }); } } function __c14(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), ip_range: S.optional(S.String), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/attach_to_network", code: 200, }), ), ).annotate({ identifier: "AttachLoadBalancerToNetworkRequest" }); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), type: S.String, }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/change_algorithm", code: 200, }), ), ).annotate({ identifier: "ChangeLoadBalancerAlgorithmRequest" }); } } function __c16(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: "/load_balancers/{id}/actions/change_dns_ptr", code: 200 }), ), ).annotate({ identifier: "ChangeLoadBalancerDnsPtrRequest" }); } } function __c17(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), delete: S.optional(S.Boolean), }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/change_protection", code: 200, }), ), ).annotate({ identifier: "ChangeLoadBalancerProtectionRequest" }); } } function __c18(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), load_balancer_type: S.String, }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/change_type", code: 200 }), ), ).annotate({ identifier: "ChangeLoadBalancerTypeRequest" }); } } function __c19(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ id: S.Number.pipe(T.Label()), listen_port: S.Number, }).pipe( T.Http({ method: "POST", uri: "/load_balancers/{id}/actions/delete_service", code: 200 }), ), ).annotate({ identifier: "DeleteLoadBalancerServiceRequest" }); } } function __c20(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: "/load_balancers/{id}/actions/detach_from_network", code: 200, }), ), ).annotate({ identifier: "DetachLoadBalancerFromNetworkRequest" }); } } 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: "/load_balancers/{id}/actions/disable_public_interface", code: 200, }), ), ).annotate({ identifier: "DisableLoadBalancerPublicInterfaceRequest" }); } } // 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)); }