diff --git a/apps/dokploy/components/dashboard/settings/billing/show-hostinger-servers.tsx b/apps/dokploy/components/dashboard/settings/billing/show-hostinger-servers.tsx index c29d1f1ed..00039ee5f 100644 --- a/apps/dokploy/components/dashboard/settings/billing/show-hostinger-servers.tsx +++ b/apps/dokploy/components/dashboard/settings/billing/show-hostinger-servers.tsx @@ -71,11 +71,11 @@ export const ShowHostingerServers = () => { ?.sort((a, b) => { // Sort by monthly promotional price (first_period_price) const monthlyPriceA = - a.prices.find( + a.prices?.find( (p) => p.period === 1 && p.period_unit === "month", )?.first_period_price || 0; const monthlyPriceB = - b.prices.find( + b.prices?.find( (p) => p.period === 1 && p.period_unit === "month", )?.first_period_price || 0; return monthlyPriceA - monthlyPriceB; @@ -108,19 +108,19 @@ export const ShowHostingerServers = () => {
- {plan.metadata.cpus} vCPU + {plan.metadata?.cpus} vCPU
- {plan.metadata.memory}GB RAM + {plan.metadata?.memory}GB RAM
- {plan.metadata.disk_space}GB NVMe + {plan.metadata?.disk_space}GB NVMe
- {plan.metadata.bandwidth}TB + {plan.metadata?.bandwidth}TB
@@ -148,7 +148,7 @@ export const ShowHostingerServers = () => { {/* Monthly prices */} - {plan.prices + {plan.prices?. .filter( (p) => p.period === 1 && p.period_unit === "month", @@ -187,20 +187,20 @@ export const ShowHostingerServers = () => { {/* Yearly prices */} - {plan.prices + {plan.prices?. .filter( (p) => p.period === 1 && p.period_unit === "year", ) .map((price) => { - const monthlyEquivalent = plan.prices.find( + const monthlyEquivalent = plan.prices?.find( (p) => p.period === 1 && p.period_unit === "month", ); const savings = monthlyEquivalent ? calculateSavings( - monthlyEquivalent.price / 100, + monthlyEquivalent?.price / 100, price.first_period_price / 100, ) : 0; @@ -247,20 +247,20 @@ export const ShowHostingerServers = () => { {/* Biennial prices */} - {plan.prices + {plan.prices?. .filter( (p) => p.period === 2 && p.period_unit === "year", ) .map((price) => { - const monthlyEquivalent = plan.prices.find( + const monthlyEquivalent = plan.prices?.find( (p) => p.period === 1 && p.period_unit === "month", ); const savings = monthlyEquivalent ? calculateSavings( - (monthlyEquivalent.price / 100) * 24, + (monthlyEquivalent?.price / 100) * 24, price.first_period_price / 100, ) : 0; diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index ec1219500..9727b22a3 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -182,7 +182,8 @@ "tsx": "^4.16.2", "typescript": "^5.8.3", "vite-tsconfig-paths": "4.3.2", - "vitest": "^1.6.1" + "vitest": "^1.6.1", + "openapi-typescript": "7.8.0" }, "ct3aMetadata": { "initVersion": "7.25.2" diff --git a/apps/dokploy/server/api/routers/hetzner.ts b/apps/dokploy/server/api/routers/hetzner.ts index 41615064f..a4005bd47 100644 --- a/apps/dokploy/server/api/routers/hetzner.ts +++ b/apps/dokploy/server/api/routers/hetzner.ts @@ -7,26 +7,16 @@ import { createTRPCRouter, protectedProcedure } from "../trpc"; export const hetznerRouter = createTRPCRouter({ locations: protectedProcedure.query(async () => { - const apiKey = process.env.HETZNER_API_KEY; - if (!apiKey) { - throw new Error("Hetzner API key not configured"); - } - return await fetchHetznerLocations(apiKey); + const locations = await fetchHetznerLocations(); + console.log(locations); + return locations; }), serverTypes: protectedProcedure.query(async () => { - const apiKey = process.env.HETZNER_API_KEY; - if (!apiKey) { - throw new Error("Hetzner API key not configured"); - } - return await fetchHetznerServerTypes(apiKey); + return await fetchHetznerServerTypes(); }), servers: protectedProcedure.query(async () => { - const apiKey = process.env.HETZNER_API_KEY; - if (!apiKey) { - throw new Error("Hetzner API key not configured"); - } - return await fetchHetznerServers(apiKey); + return await fetchHetznerServers(); }), }); diff --git a/apps/dokploy/server/api/routers/hostinger.ts b/apps/dokploy/server/api/routers/hostinger.ts index ca6b4fa96..62e010f61 100644 --- a/apps/dokploy/server/api/routers/hostinger.ts +++ b/apps/dokploy/server/api/routers/hostinger.ts @@ -1,34 +1,16 @@ import { fetchHostingerCatalog, fetchHostingerDataCenters, - fetchHostingerServers, } from "@dokploy/server/index"; import { createTRPCRouter, protectedProcedure } from "../trpc"; export const hostingerRouter = createTRPCRouter({ vpsPlans: protectedProcedure.query(async () => { - const apiKey = process.env.HOSTINGER_API_KEY; - if (!apiKey) { - throw new Error("Hostinger API key not configured"); - } - - const catalogItems = await fetchHostingerCatalog(apiKey); - return catalogItems.filter((item) => item.name.startsWith("KVM")); - }), - - servers: protectedProcedure.query(async () => { - const apiKey = process.env.HOSTINGER_API_KEY; - if (!apiKey) { - return []; - } - return await fetchHostingerServers(apiKey); + const catalogItems = await fetchHostingerCatalog(); + return catalogItems.filter((item) => item?.name?.startsWith("KVM")); }), dataCenters: protectedProcedure.query(async () => { - const apiKey = process.env.HOSTINGER_API_KEY; - if (!apiKey) { - throw new Error("Hostinger API key not configured"); - } - return await fetchHostingerDataCenters(apiKey); + return await fetchHostingerDataCenters(); }), }); diff --git a/packages/server/package.json b/packages/server/package.json index eeee8f831..5224e21dd 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -28,6 +28,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { + "openapi-fetch": "0.14.0", "@ai-sdk/anthropic": "^1.2.12", "@ai-sdk/azure": "^1.3.23", "@ai-sdk/cohere": "^1.2.10", diff --git a/packages/server/src/services/hetzner.ts b/packages/server/src/services/hetzner.ts index cb55738a5..99f66a1e5 100644 --- a/packages/server/src/services/hetzner.ts +++ b/packages/server/src/services/hetzner.ts @@ -1,118 +1,49 @@ +import createClient from "openapi-fetch"; +import type { paths } from "../types/hetzner-types"; + const HETZNER_API_URL = "https://api.hetzner.cloud/v1"; -interface HetznerLocation { - id: number; - name: string; - description: string; - country: string; - city: string; - latitude: number; - longitude: number; - network_zone: string; -} +const hetznerApiKey = process.env.HETZNER_API_KEY; -interface HetznerServerType { - id: number; - name: string; - description: string; - cores: number; - memory: number; - disk: number; - prices: { - location: string; - price_hourly: { - net: string; - gross: string; - }; - price_monthly: { - net: string; - gross: string; - }; - }[]; - storage_type: string; - cpu_type: string; - architecture: string; -} +const client = createClient({ baseUrl: HETZNER_API_URL }); -interface HetznerServer { - id: number; - name: string; - status: string; - created: string; - server_type: { - id: number; - name: string; - description: string; - cores: number; - memory: number; - disk: number; - }; - public_net: { - ipv4: { - ip: string; - }; - ipv6: { - ip: string; - }; - }; -} - -export const fetchHetznerLocations = async ( - apiKey: string, -): Promise => { - const response = await fetch(`${HETZNER_API_URL}/locations`, { +export const fetchHetznerLocations = async () => { + const { data, error } = await client.GET("/locations", { headers: { - Authorization: `Bearer ${apiKey}`, - "Content-Type": "application/json", + Authorization: `Bearer ${hetznerApiKey}`, }, }); - if (!response.ok) { - throw new Error( - `Failed to fetch Hetzner locations: ${response.statusText}`, - ); + if (error) { + throw new Error(`Failed to fetch Hetzner locations: ${error}`); } - - const data = (await response.json()) as { locations?: HetznerLocation[] }; - return data.locations || []; + return data; }; -export const fetchHetznerServerTypes = async ( - apiKey: string, -): Promise => { - const response = await fetch(`${HETZNER_API_URL}/server_types`, { +export const fetchHetznerServerTypes = async () => { + const { data, error } = await client.GET("/server_types", { headers: { - Authorization: `Bearer ${apiKey}`, - "Content-Type": "application/json", + Authorization: `Bearer ${hetznerApiKey}`, }, }); - if (!response.ok) { - throw new Error( - `Failed to fetch Hetzner server types: ${response.statusText}`, - ); + if (error) { + throw new Error(`Failed to fetch Hetzner server types: ${error}`); } - const data = (await response.json()) as { - server_types?: HetznerServerType[]; - }; - return data.server_types || []; + return data; }; -export const fetchHetznerServers = async ( - apiKey: string, -): Promise => { - const response = await fetch(`${HETZNER_API_URL}/servers`, { +export const fetchHetznerServers = async () => { + const { data, error } = await client.GET("/servers", { headers: { - Authorization: `Bearer ${apiKey}`, - "Content-Type": "application/json", + Authorization: `Bearer ${hetznerApiKey}`, }, }); - if (!response.ok) { - throw new Error(`Failed to fetch Hetzner servers: ${response.statusText}`); + if (error) { + throw new Error(`Failed to fetch Hetzner servers: ${error}`); } - const data = (await response.json()) as { servers?: HetznerServer[] }; - return data.servers || []; + return data; }; diff --git a/packages/server/src/services/hostinger.ts b/packages/server/src/services/hostinger.ts index 14c98b899..0f1df7ea6 100644 --- a/packages/server/src/services/hostinger.ts +++ b/packages/server/src/services/hostinger.ts @@ -1,113 +1,35 @@ +import createClient from "openapi-fetch"; +import type { paths } from "../types/hostinger-types"; + const HOSTINGER_API_URL = "https://developers.hostinger.com"; +const hostingerApiKey = process.env.HOSTINGER_API_KEY; -interface HostingerCatalogItem { - id: string; - name: string; - category: string; - prices: Array<{ - id: string; - name: string; - currency: string; - price: number; // en centavos - first_period_price: number; // precio promocional en centavos - period: number; - period_unit: string; - }>; - metadata: { - cpus: string; - memory: string; - bandwidth: string; - disk_space: string; - network: string; - }; -} +const client = createClient({ baseUrl: HOSTINGER_API_URL }); -interface HostingerServer { - id: string; - name: string; - status: string; - created_at: string; - ip_address: string; - plan: { - name: string; - cpu: number; - ram: number; - storage: number; - }; - location: string; -} - -interface HostingerDataCenter { - id: number; - name: string; - location: string; - country: string; -} - -// Obtener catalog items (productos VPS con precios reales) -export const fetchHostingerCatalog = async ( - apiKey: string, -): Promise => { - const response = await fetch( - `${HOSTINGER_API_URL}/api/billing/v1/catalog?category=VPS`, - { - headers: { - Authorization: `Bearer ${apiKey}`, - "Content-Type": "application/json", - }, - }, - ); - - if (!response.ok) { - throw new Error( - `Failed to fetch Hostinger catalog: ${response.statusText}`, - ); - } - - const data = (await response.json()) as HostingerCatalogItem[]; - return data || []; -}; - -// Obtener VPS existentes -export const fetchHostingerServers = async ( - apiKey: string, -): Promise => { - const response = await fetch( - `${HOSTINGER_API_URL}/api/vps/v1/virtual-machines`, - { - headers: { - Authorization: `Bearer ${apiKey}`, - "Content-Type": "application/json", - }, - }, - ); - - if (!response.ok) { - // Si no hay servidores o falla, retornamos array vacío - return []; - } - - const data = (await response.json()) as { data?: HostingerServer[] }; - return data.data || []; -}; - -// Obtener data centers disponibles -export async function fetchHostingerDataCenters( - apiKey: string, -): Promise { - const response = await fetch(`${HOSTINGER_API_URL}/api/vps/v1/data-centers`, { +export const fetchHostingerCatalog = async () => { + const { data, error } = await client.GET("/api/billing/v1/catalog", { headers: { - Authorization: `Bearer ${apiKey}`, - "Content-Type": "application/json", + Authorization: `Bearer ${hostingerApiKey}`, }, }); - if (!response.ok) { - throw new Error( - `Failed to fetch Hostinger data centers: ${response.statusText}`, - ); + if (error) { + throw new Error(`Failed to fetch Hostinger catalog: ${error}`); } - const data = (await response.json()) as { data?: HostingerDataCenter[] }; - return data.data || []; -} + return data; +}; + +export const fetchHostingerDataCenters = async () => { + const { data, error } = await client.GET("/api/vps/v1/data-centers", { + headers: { + Authorization: `Bearer ${hostingerApiKey}`, + }, + }); + + if (error) { + throw new Error(`Failed to fetch Hostinger data centers: ${error}`); + } + + return data; +}; diff --git a/packages/server/src/types/hetzner-types.ts b/packages/server/src/types/hetzner-types.ts new file mode 100644 index 000000000..27249b147 --- /dev/null +++ b/packages/server/src/types/hetzner-types.ts @@ -0,0 +1,31177 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get multiple Actions + * @description Returns multiple Action objects specified by the `id` parameter. + * + * **Note**: This endpoint previously allowed listing all actions in the project. This functionality was deprecated in July 2023 and removed on 30 January 2025. + * + * - Announcement: https://docs.hetzner.cloud/changelog#2023-07-20-actions-list-endpoint-is-deprecated + * - Removal: https://docs.hetzner.cloud/changelog#2025-01-30-listing-arbitrary-actions-in-the-actions-list-endpoint-is-removed + * + */ + get: operations["get_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a specific Action object. + */ + get: operations["get_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Certificates + * @description Returns all Certificate objects. + */ + get: operations["list_certificates"]; + put?: never; + /** + * Create a Certificate + * @description Creates a new Certificate. + * + * The default type **uploaded** allows for uploading your existing `certificate` and `private_key` in PEM format. You have to monitor its expiration date and handle renewal yourself. + * + * In contrast, type **managed** requests a new Certificate from *Let's Encrypt* for the specified `domain_names`. Only domains managed by *Hetzner DNS* are supported. We handle renewal and timely alert the project owner via email if problems occur. + * + * For type `managed` Certificates the `action` key of the response contains the Action that allows for tracking the issuance process. For type `uploaded` Certificates the `action` is always null. + * + */ + post: operations["create_certificate"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter. + */ + get: operations["list_certificates_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a specific Action object. + */ + get: operations["get_certificates_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Certificate + * @description Gets a specific Certificate object. + */ + get: operations["get_certificate"]; + /** + * Update a Certificate + * @description Updates the Certificate properties. + * + * Note: if the Certificate object changes during the request, the response will be a “conflict” error. + * + */ + put: operations["update_certificate"]; + post?: never; + /** + * Delete a Certificate + * @description Deletes a Certificate. + */ + delete: operations["delete_certificate"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Certificate + * @description Returns all Action objects for a Certificate. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter. + * + * Only type `managed` Certificates can have Actions. For type `uploaded` Certificates the `actions` key will always contain an empty array. + * + */ + get: operations["list_certificate_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates/{id}/actions/retry": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Retry Issuance or Renewal + * @description Retry a failed Certificate issuance or renewal. + * + * Only applicable if the type of the Certificate is `managed` and the issuance or renewal status is `failed`. + * + * #### Call specific error codes + * + * | Code | Description | + * |---------------------------------------------------------|---------------------------------------------------------------------------| + * | `caa_record_does_not_allow_ca` | CAA record does not allow certificate authority | + * | `ca_dns_validation_failed` | Certificate Authority: DNS validation failed | + * | `ca_too_many_authorizations_failed_recently` | Certificate Authority: Too many authorizations failed recently | + * | `ca_too_many_certificates_issued_for_registered_domain` | Certificate Authority: Too many certificates issued for registered domain | + * | `ca_too_many_duplicate_certificates` | Certificate Authority: Too many duplicate certificates | + * | `could_not_verify_domain_delegated_to_zone` | Could not verify domain delegated to zone | + * | `dns_zone_not_found` | DNS zone not found | + * | `dns_zone_is_secondary_zone` | DNS zone is a secondary zone | + * + */ + post: operations["retry_certificate"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/certificates/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Certificate + * @description Returns a specific Action for a Certificate. Only type `managed` Certificates have Actions. + */ + get: operations["get_certificate_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/datacenters": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Datacenters + * @description Returns all [Datacenters](#datacenters). + */ + get: operations["list_datacenters"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/datacenters/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Datacenter + * @description Returns a single [Datacenter](#datacenters). + */ + get: operations["get_datacenter"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Firewalls + * @description Returns all [Firewalls](#firewalls). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_firewalls"]; + put?: never; + /** + * Create a Firewall + * @description Create a [Firewall](#firewalls). + * + * #### Error Codes specific to this Call + * + * | Code | Description | + * |------------------------------ |-----------------------------------------------------------------------------| + * | `server_already_added` | [Server](#servers) applied more than once | + * | `incompatible_network_type` | The resources network type is not supported by [Firewalls](#firewalls) | + * | `firewall_resource_not_found` | The resource the [Firewall](#firewalls) should be attached to was not found | + * + */ + post: operations["create_firewall"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Returns all [Actions](#actions) for [Firewalls](#firewalls). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_firewalls_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns the specific [Action](#actions). + */ + get: operations["get_firewalls_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Firewall + * @description Returns a single [Firewall](#firewalls). + */ + get: operations["get_firewall"]; + /** + * Update a Firewall + * @description Update a [Firewall](#firewalls). + * + * In case of a parallel running change on the [Firewall](#firewalls) a `conflict` error will be returned. + * + */ + put: operations["update_firewall"]; + post?: never; + /** + * Delete a Firewall + * @description Deletes the [Firewall](#firewalls). + * + * #### Error Codes specific to this Call + * + * | Code | Description | + * |--------------------- |----------------------------------------------------| + * | `resource_in_use` | [Firewall](#firewalls) still applied to a resource | + * + */ + delete: operations["delete_firewall"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Firewall + * @description Returns all [Actions](#actions) for the [Firewall](#firewalls). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_firewall_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/{id}/actions/apply_to_resources": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Apply to Resources + * @description Applies a [Firewall](#firewalls) to multiple resources. + * + * Supported resources: + * - [Servers](#servers) (with a public network interface) + * - [Label Selectors](#label-selector) + * + * A server can be applied to [a maximum of 5 Firewalls](https://docs.hetzner.com/cloud/firewalls/overview#limits). + * + * #### Error Codes specific to this Call + * + * | Code | Description | + * |-------------------------------|-------------------------------------------------------------------------------------------------| + * | `firewall_already_applied` | [Firewall](#firewalls) is already applied to resource | + * | `incompatible_network_type` | The network type of the resource is not supported by [Firewalls](#firewalls) | + * | `firewall_resource_not_found` | The resource the [Firewall](#firewalls) should be applied to was not found | + * | `private_net_only_server` | The [Server](#servers) the [Firewall](#firewalls) should be applied to has no public interface | + * + */ + post: operations["apply_firewall_to_resources"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/{id}/actions/remove_from_resources": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Remove from Resources + * @description Removes a [Firewall](#firewalls) from multiple resources. + * + * Supported resources: + * - [Servers](#servers) (with a public network interface) + * + * #### Error Codes specific to this Call + * + * | Code | Description | + * |---------------------------------------|---------------------------------------------------------------------------------------------------------| + * | `firewall_already_removed` | [Firewall](#firewalls) is already removed from the resource | + * | `firewall_resource_not_found` | The resource the [Firewall](#firewalls) should be removed from was not found | + * | `firewall_managed_by_label_selector` | [Firewall](#firewall) is applied via a [Label Selector](#label-selector) and cannot be removed manually | + * + */ + post: operations["remove_firewall_from_resources"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/{id}/actions/set_rules": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Set Rules + * @description Set the rules of a [Firewall](#firewalls). + * + * Overwrites the existing rules with the given ones. Pass an empty array to remove all rules. + * + * Rules are limited to 50 entries per [Firewall](#firewalls) and [500 effective rules](https://docs.hetzner.com/cloud/firewalls/overview#limits). + * + */ + post: operations["set_firewall_rules"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/firewalls/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Firewall + * @description Returns a specific [Action](#actions) for a [Firewall](#firewalls). + */ + get: operations["get_firewall_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Floating IPs + * @description List multiple [Floating IPs](#floating-ips). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_floating_ips"]; + put?: never; + /** + * Create a Floating IP + * @description Create a [Floating IP](#floating-ips). + * + * Provide the `server` attribute to assign the [Floating IP](#floating-ips) to that server or provide a `home_location` to locate the [Floating IP](#floating-ips) at. Note that the [Floating IP](#floating-ips) can be assigned to a [Server](#servers) in any [Location](#locations) later on. For optimal routing it is advised to use the [Floating IP](#floating-ips) in the same [Location](#locations) it was created in. + * + */ + post: operations["create_floating_ip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Lists multiple [Actions](#actions). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_floating_ips_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a single [Action](#actions). + */ + get: operations["get_floating_ips_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Floating IP + * @description Returns a single [Floating IP](#floating-ips). + */ + get: operations["get_floating_ip"]; + /** + * Update a Floating IP + * @description Update a [Floating IP](#floating-ips). + * + */ + put: operations["update_floating_ip"]; + post?: never; + /** + * Delete a Floating IP + * @description Deletes a [Floating IP](#floating-ips). + * + * If the IP is assigned to a resource it will be unassigned. + * + */ + delete: operations["delete_floating_ip"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Floating IP + * @description Lists [Actions](#actions) for a [Floating IP](#floating-ips). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_floating_ip_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}/actions/assign": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Assign a Floating IP to a Server + * @description Assigns a [Floating IP](#floating-ips) to a [Server](#servers). + */ + post: operations["assign_floating_ip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}/actions/change_dns_ptr": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change reverse DNS records for a Floating IP + * @description Change the reverse DNS records for this [Floating IP](#floating-ips). + * + * Allows to modify the PTR records set for the IP address. + * + */ + post: operations["change_floating_ip_dns_ptr"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Floating IP Protection + * @description Changes the protection settings configured for the [Floating IP](#floating-ips). + */ + post: operations["change_floating_ip_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}/actions/unassign": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unassign a Floating IP + * @description Unassigns a [Floating IP](#floating-ips). + * + * Results in the IP being unreachable. Can be assigned to another resource again. + * + */ + post: operations["unassign_floating_ip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/floating_ips/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Floating IP + * @description Returns a specific [Action](#actions) for a [Floating IP](#floating-ips). + */ + get: operations["get_floating_ip_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Images + * @description Returns all Image objects. You can select specific Image types only and sort the results by using URI parameters. + */ + get: operations["list_images"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter. + */ + get: operations["list_images_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a specific Action object. + */ + get: operations["get_images_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Image + * @description Returns a specific Image object. + */ + get: operations["get_image"]; + /** + * Update an Image + * @description Updates the Image. You may change the description, convert a Backup Image to a Snapshot Image or change the Image labels. Only Images of type `snapshot` and `backup` can be updated. + * + */ + put: operations["update_image"]; + post?: never; + /** + * Delete an Image + * @description Deletes an Image. Only Images of type `snapshot` and `backup` can be deleted. + */ + delete: operations["delete_image"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for an Image + * @description Returns all Action objects for an Image. You can sort the results by using the `sort` URI parameter, and filter them with the `status` parameter. + */ + get: operations["list_image_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Image Protection + * @description Changes the protection configuration of the Image. Can only be used on snapshots. + */ + post: operations["change_image_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/images/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for an Image + * @description Returns a specific Action for an Image. + */ + get: operations["get_image_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/isos": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List ISOs + * @description Returns all available ISO objects. + */ + get: operations["list_isos"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/isos/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an ISO + * @description Returns a specific ISO object. + */ + get: operations["get_iso"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancer_types": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Load Balancer Types + * @description Gets all Load Balancer type objects. + */ + get: operations["list_load_balancer_types"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancer_types/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Load Balancer Type + * @description Gets a specific Load Balancer type object. + */ + get: operations["get_load_balancer_type"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Load Balancers + * @description Gets all existing Load Balancers that you have available. + */ + get: operations["list_load_balancers"]; + put?: never; + /** + * Create a Load Balancer + * @description Creates a Load Balancer. + * + * #### Call specific error codes + * + * | Code | Description | + * |-----------------------------------------|-------------------------------------------------------------------------------------------------------| + * | `cloud_resource_ip_not_allowed` | The IP you are trying to add as a target belongs to a Hetzner Cloud resource | + * | `ip_not_owned` | The IP is not owned by the owner of the project of the Load Balancer | + * | `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network | + * | `robot_unavailable` | Robot was not available. The caller may retry the operation after a short delay. | + * | `server_not_attached_to_network` | The server you are trying to add as a target is not attached to the same network as the Load Balancer | + * | `source_port_already_used` | The source port you are trying to add is already in use | + * | `missing_ipv4` | The server that you are trying to add as a public target does not have a public IPv4 address | + * | `target_already_defined` | The Load Balancer target you are trying to define is already defined | + * + */ + post: operations["create_load_balancer"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter. + */ + get: operations["list_load_balancers_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a specific Action object. + */ + get: operations["get_load_balancers_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Load Balancer + * @description Gets a specific Load Balancer object. + */ + get: operations["get_load_balancer"]; + /** + * Update a Load Balancer + * @description Updates a Load Balancer. You can update a Load Balancer’s name and a Load Balancer’s labels. + * + * Note: if the Load Balancer object changes during the request, the response will be a “conflict” error. + * + */ + put: operations["update_load_balancer"]; + post?: never; + /** + * Delete a Load Balancer + * @description Deletes a Load Balancer. + */ + delete: operations["delete_load_balancer"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Load Balancer + * @description 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. + */ + get: operations["list_load_balancer_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/add_service": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add Service + * @description Adds a service to a Load Balancer. + * + * #### Call specific error codes + * + * | Code | Description | + * |----------------------------|---------------------------------------------------------| + * | `source_port_already_used` | The source port you are trying to add is already in use | + * + */ + post: operations["add_load_balancer_service"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/add_target": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add Target + * @description Adds a target to a Load Balancer. + * + * #### Call specific error codes + * + * | Code | Description | + * |-------------------------------------------|-------------------------------------------------------------------------------------------------------| + * | `cloud_resource_ip_not_allowed` | The IP you are trying to add as a target belongs to a Hetzner Cloud resource | + * | `ip_not_owned` | The IP you are trying to add as a target is not owned by the Project owner | + * | `load_balancer_public_interface_disabled` | The Load Balancer's public network interface is disabled | + * | `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network | + * | `robot_unavailable` | Robot was not available. The caller may retry the operation after a short delay. | + * | `server_not_attached_to_network` | The server you are trying to add as a target is not attached to the same network as the Load Balancer | + * | `missing_ipv4` | The server that you are trying to add as a public target does not have a public IPv4 address | + * | `target_already_defined` | The Load Balancer target you are trying to define is already defined | + * + */ + post: operations["add_load_balancer_target"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/attach_to_network": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach a Load Balancer to a Network + * @description Attach a Load Balancer to a Network. + * + * **Call specific error codes** + * + * | Code | Description | + * |----------------------------------|-----------------------------------------------------------------------| + * | `load_balancer_already_attached` | The Load Balancer is already attached to a network | + * | `ip_not_available` | The provided Network IP is not available | + * | `no_subnet_available` | No Subnet or IP is available for the Load Balancer within the network | + * + */ + post: operations["attach_load_balancer_to_network"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/change_algorithm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Algorithm + * @description Change the algorithm that determines to which target new requests are sent. + */ + post: operations["change_load_balancer_algorithm"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/change_dns_ptr": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change reverse DNS entry for this Load Balancer + * @description 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. + * + */ + post: operations["change_load_balancer_dns_ptr"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Load Balancer Protection + * @description Changes the protection configuration of a Load Balancer. + */ + post: operations["change_load_balancer_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/change_type": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change the Type of a Load Balancer + * @description Changes the type (Max Services, Max Targets and Max Connections) of a Load Balancer. + * + * **Call specific error codes** + * + * | Code | Description | + * |------------------------------|-----------------------------------------------------------------| + * | `invalid_load_balancer_type` | The Load Balancer type does not fit for the given Load Balancer | + * + */ + post: operations["change_load_balancer_type"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/delete_service": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Delete Service + * @description Delete a service of a Load Balancer. + */ + post: operations["delete_load_balancer_service"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/detach_from_network": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Detach a Load Balancer from a Network + * @description Detaches a Load Balancer from a network. + */ + post: operations["detach_load_balancer_from_network"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/disable_public_interface": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Disable the public interface of a Load Balancer + * @description Disable the public interface of a Load Balancer. The Load Balancer will be not accessible from the internet via its public IPs. + * + * #### Call specific error codes + * + * | Code | Description | + * |-------------------------------------------|--------------------------------------------------------------------------------| + * | `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network | + * | `targets_without_use_private_ip` | The Load Balancer has targets that use the public IP instead of the private IP | + * + */ + post: operations["disable_load_balancer_public_interface"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/enable_public_interface": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Enable the public interface of a Load Balancer + * @description Enable the public interface of a Load Balancer. The Load Balancer will be accessible from the internet via its public IPs. + */ + post: operations["enable_load_balancer_public_interface"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/remove_target": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Remove Target + * @description Removes a target from a Load Balancer. + */ + post: operations["remove_load_balancer_target"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/update_service": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Update Service + * @description Updates a Load Balancer Service. + * + * #### Call specific error codes + * + * | Code | Description | + * |----------------------------|---------------------------------------------------------| + * | `source_port_already_used` | The source port you are trying to add is already in use | + * + */ + post: operations["update_load_balancer_service"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Load Balancer + * @description Returns a specific Action for a Load Balancer. + */ + get: operations["get_load_balancer_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/load_balancers/{id}/metrics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Metrics for a LoadBalancer + * @description You must specify the type of metric to get: `open_connections`, `connections_per_second`, `requests_per_second` or `bandwidth`. You can also specify more than one type by comma separation, e.g. `requests_per_second,bandwidth`. + * + * Depending on the type you will get different time series data: + * + * |Type | Timeseries | Unit | Description | + * |---- |------------|------|-------------| + * | open_connections | open_connections | number | Open connections | + * | connections_per_second | connections_per_second | connections/s | Connections per second | + * | requests_per_second | requests_per_second | requests/s | Requests per second | + * | bandwidth | bandwidth.in | bytes/s | Ingress bandwidth | + * || bandwidth.out | bytes/s | Egress bandwidth | + * + * Metrics are available for the last 30 days only. + * + * If you do not provide the step argument we will automatically adjust it so that 200 samples are returned. + * + * We limit the number of samples to a maximum of 500 and will adjust the step parameter accordingly. + * + */ + get: operations["get_load_balancer_metrics"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/locations": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Locations + * @description Returns all [Locations](#locations). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_locations"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/locations/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Location + * @description Returns a [Location](#locations). + */ + get: operations["get_location"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Networks + * @description List multiple [Networks](#networks). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_networks"]; + put?: never; + /** + * Create a Network + * @description Creates a [Network](#networks). + * + * The provided `ip_range` can only be extended later on, but not reduced. + * + * Subnets can be added now or later on using the [add subnet action](#network-actions-add-a-subnet-to-a-network). If you do not specify an `ip_range` for the subnet the first available /24 range will be used. + * + * Routes can be added now or later by using the [add route action](#network-actions-add-a-route-to-a-network). + * + */ + post: operations["create_network"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Lists multiple [Actions](#actions). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_networks_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a single [Action](#actions). + */ + get: operations["get_networks_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Network + * @description Get a specific [Network](#networks). + */ + get: operations["get_network"]; + /** + * Update a Network + * @description Update a [Network](#networks). + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + put: operations["update_network"]; + post?: never; + /** + * Delete a Network + * @description Deletes a [Network](#networks). + * + * Attached resources will be detached automatically. + * + */ + delete: operations["delete_network"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Network + * @description Lists [Actions](#actions) for a [Network](#networks). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_network_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/add_route": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add a route to a Network + * @description Adds a route entry to a [Network](#networks). + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + post: operations["add_network_route"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/add_subnet": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add a subnet to a Network + * @description Adds a new subnet to the [Network](#networks). + * + * If the subnet `ip_range` is not provided, the first available `/24` IP range will be used. + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + post: operations["add_network_subnet"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/change_ip_range": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change IP range of a Network + * @description Changes the IP range of a [Network](#networks). + * + * The following restrictions apply to changing the IP range: + * - IP ranges can only be extended and never shrunk. + * - IPs can only be added to the end of the existing range, therefore only the netmask is allowed to be changed. + * + * To update the routes on the connected [Servers](#servers), they need to be rebooted or the routes to be updated manually. + * + * For example if the [Network](#networks) has a range of `10.0.0.0/16` to extend it the new range has to start with the IP `10.0.0.0` as well. The netmask `/16` can be changed to a smaller one then `16` therefore increasing the IP range. A valid entry would be `10.0.0.0/15`, `10.0.0.0/14` or `10.0.0.0/13` and so on. + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + post: operations["change_network_ip_range"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Network Protection + * @description Changes the protection settings of a [Network](#networks). + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + post: operations["change_network_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/delete_route": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Delete a route from a Network + * @description Delete a route entry from a [Network](#networks). + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + post: operations["delete_network_route"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/delete_subnet": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Delete a subnet from a Network + * @description Deletes a single subnet entry from a [Network](#networks). + * + * Subnets containing attached resources can not be deleted, they must be detached beforehand. + * + * If a change is currently being performed on this [Network](#networks), a error response with code `conflict` will be returned. + * + */ + post: operations["delete_network_subnet"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/networks/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Network + * @description Returns a specific [Action](#actions) for a [Network](#networks). + */ + get: operations["get_network_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/placement_groups": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Placement Groups + * @description Returns all Placement Group objects. + */ + get: operations["list_placement_groups"]; + put?: never; + /** + * Create a PlacementGroup + * @description Creates a new Placement Group. + * + */ + post: operations["create_placement_group"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/placement_groups/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a PlacementGroup + * @description Gets a specific Placement Group object. + */ + get: operations["get_placement_group"]; + /** + * Update a PlacementGroup + * @description Updates the Placement Group properties. + * + * Note: if the Placement Group object changes during the request, the response will be a “conflict” error. + * + */ + put: operations["update_placement_group"]; + post?: never; + /** + * Delete a PlacementGroup + * @description Deletes a Placement Group. + */ + delete: operations["delete_placement_group"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/pricing": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get all prices + * @description Returns prices for all resources available on the platform. VAT and currency of the Project owner are used for calculations. + * + * Both net and gross prices are included in the response. + * + */ + get: operations["get_pricing"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Primary IPs + * @description List multiple [Primary IPs](#primary-ips). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_primary_ips"]; + put?: never; + /** + * Create a Primary IP + * @description Create a new [Primary IP](#primary-ips). + * + * Can optionally be assigned to a resource by providing an `assignee_id` and `assignee_type`. + * + * If not assigned to a resource the `datacenter` key needs to be provided. This can be either the ID or the name of the [Datacenter](#datacenters) this [Primary IP](#primary-ips) shall be created in. + * + * A [Primary IP](#primary-ips) can only be assigned to resource in the same [Datacenter](#datacenters) later on. + * + * #### Call specific error codes + * + * | Code | Description | + * |------------------------------ |------------------------------------------------------------------------- | + * | `server_not_stopped` | The specified [Server](#servers) is running, but needs to be powered off | + * | `server_has_ipv4` | The [Server](#servers) already has an ipv4 address | + * | `server_has_ipv6` | The [Server](#servers) already has an ipv6 address | + * + */ + post: operations["create_primary_ip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Lists multiple [Actions](#actions). + * + * Use the provided URI parameters to modify the result. + * + */ + get: operations["list_primary_ips_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a single [Action](#actions). + */ + get: operations["get_primary_ips_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Primary IP + * @description Returns a [Primary IP](#primary-ips). + */ + get: operations["get_primary_ip"]; + /** + * Update a Primary IP + * @description Update a [Primary IP](#primary-ips). + * + * If another change is concurrently performed on this [Primary IP](#primary-ips), a error response with code `conflict` will be returned. + * + */ + put: operations["update_primary_ip"]; + post?: never; + /** + * Delete a Primary IP + * @description Deletes a [Primary IP](#primary-ips). + * + * If assigned to a [Server](#servers) the [Primary IP](#primary-ips) will be unassigned automatically. The [Server](#servers) must be powered off (status `off`) in order for this operation to succeed. + * + */ + delete: operations["delete_primary_ip"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/{id}/actions/assign": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Assign a Primary IP to a resource + * @description Assign a [Primary IP](#primary-ips) to a resource. + * + * A [Server](#servers) can only have one [Primary IP](#primary-ips) of type `ipv4` and one of type `ipv6` assigned. If you need more IPs use [Floating IPs](#floating-ips). + * + * A [Server](#servers) must be powered off (status `off`) in order for this operation to succeed. + * + * #### Error Codes specific to this Call + * + * | Code | Description | + * |------------------------------ |--------------------------------------------------------------------------------- | + * | `server_not_stopped` | The [Server](#servers) is running, but needs to be powered off | + * | `primary_ip_already_assigned` | [Primary IP](#primary-ips) is already assigned to a different [Server](#servers) | + * | `server_has_ipv4` | The [Server](#servers) already has an IPv4 address | + * | `server_has_ipv6` | The [Server](#servers) already has an IPv6 address | + * + */ + post: operations["assign_primary_ip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/{id}/actions/change_dns_ptr": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change reverse DNS records for a Primary IP + * @description Change the reverse DNS records for this [Primary IP](#primary-ips). + * + * Allows to modify the PTR records set for the IP address. + * + */ + post: operations["change_primary_ip_dns_ptr"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Primary IP Protection + * @description Changes the protection configuration of a [Primary IP](#primary-ips). + * + * A [Primary IPs](#primary-ips) deletion protection can only be enabled if its `auto_delete` property is set to `false`. + * + */ + post: operations["change_primary_ip_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/primary_ips/{id}/actions/unassign": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unassign a Primary IP from a resource + * @description Unassign a [Primary IP](#primary-ips) from a resource. + * + * A [Server](#servers) must be powered off (status `off`) in order for this operation to succeed. + * + * A [Server](#server) requires at least one network interface (public or private) to be powered on. + * + * #### Error Codes specific to this Call + * + * | Code | Description | + * |---------------------------------- |-------------------------------------------------------------- | + * | `server_not_stopped` | The [Server](#server) is running, but needs to be powered off | + * | `server_is_load_balancer_target` | The [Server](#server) IPv4 address is a loadbalancer target | + * + */ + post: operations["unassign_primary_ip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/server_types": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Server Types + * @description Gets all Server type objects. + */ + get: operations["list_server_types"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/server_types/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Server Type + * @description Gets a specific Server type object. + */ + get: operations["get_server_type"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Servers + * @description Returns all existing Server objects. + */ + get: operations["list_servers"]; + put?: never; + /** + * Create a Server + * @description Creates a new Server. Returns preliminary information about the Server as well as an Action that covers progress of creation. + */ + post: operations["create_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter. + */ + get: operations["list_servers_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a specific Action object. + */ + get: operations["get_servers_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Server + * @description Returns a specific Server object. The Server must exist inside the Project. + */ + get: operations["get_server"]; + /** + * Update a Server + * @description Updates a Server. You can update a Server’s name and a Server’s labels. + * + * Please note that Server names must be unique per Project and valid hostnames as per RFC 1123 (i.e. may only contain letters, digits, periods, and dashes). + * + */ + put: operations["update_server"]; + post?: never; + /** + * Delete a Server + * @description Deletes a Server. + * + * This immediately removes the Server from your account, and it is no longer + * accessible. Any resources attached to the server (like Volumes, Primary IPs, + * Floating IPs, Firewalls, Placement Groups) are detached while the server is deleted. + * + */ + delete: operations["delete_server"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Server + * @description 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. + */ + get: operations["list_server_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/add_to_placement_group": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add a Server to a Placement Group + * @description Adds a Server to a Placement Group. + * + * Server must be powered off for this command to succeed. + * + * #### Call specific error codes + * + * | Code | Description | + * |-------------------------------|----------------------------------------------------------------------| + * | `server_not_stopped` | The action requires a stopped server | + * + */ + post: operations["add_server_to_placement_group"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/attach_iso": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach an ISO to a Server + * @description 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. + * + */ + post: operations["attach_server_iso"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/attach_to_network": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach a Server to a Network + * @description 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. + * + * **Call specific error codes** + * + * | Code | Description | + * |----------------------------------|-----------------------------------------------------------------------| + * | `server_already_attached` | The server is already attached to the network | + * | `ip_not_available` | The provided Network IP is not available | + * | `no_subnet_available` | No Subnet or IP is available for the Server within the network | + * | `networks_overlap` | The network IP range overlaps with one of the server networks | + * + */ + post: operations["attach_server_to_network"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/change_alias_ips": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change alias IPs of a Network + * @description 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. + */ + post: operations["change_server_alias_ips"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/change_dns_ptr": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change reverse DNS entry for this Server + * @description 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. + * + */ + post: operations["change_server_dns_ptr"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Server Protection + * @description Changes the protection configuration of the Server. + */ + post: operations["change_server_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/change_type": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change the Type of a Server + * @description 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`. + * + * #### Call specific error codes + * + * | Code | Description | + * |-------------------------------|----------------------------------------------------------------------| + * | `invalid_server_type` | The server type does not fit for the given server or is deprecated | + * | `server_not_stopped` | The action requires a stopped server | + * + */ + post: operations["change_server_type"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/create_image": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Image from a Server + * @description Creates an Image (snapshot) from a Server by copying the contents of its disks. This creates a snapshot of the current state of the disk and copies it into an Image. If the Server is currently running you must make sure that its disk content is consistent. Otherwise, the created Image may not be readable. + * + * 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. + * + */ + post: operations["create_server_image"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/detach_from_network": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Detach a Server from a Network + * @description Detaches a Server from a network. The interface for this network will vanish. + */ + post: operations["detach_server_from_network"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/detach_iso": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Detach an ISO from a Server + * @description 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`. + */ + post: operations["detach_server_iso"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/disable_backup": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Disable Backups for a Server + * @description 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! + * + */ + post: operations["disable_server_backup"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/disable_rescue": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Disable Rescue Mode for a Server + * @description 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. + * + */ + post: operations["disable_server_rescue"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/enable_backup": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Enable and Configure Backups for a Server + * @description 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. + * + */ + post: operations["enable_server_backup"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/enable_rescue": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Enable Rescue Mode for a Server + * @description 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. + * + */ + post: operations["enable_server_rescue"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/poweroff": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Power off a Server + * @description 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. + */ + post: operations["poweroff_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/poweron": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Power on a Server + * @description Starts a Server by turning its power on. + */ + post: operations["poweron_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/reboot": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Soft-reboot a Server + * @description 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. + */ + post: operations["reboot_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/rebuild": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Rebuild a Server from an Image + * @description 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. + * + */ + post: operations["rebuild_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/remove_from_placement_group": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Remove from Placement Group + * @description Removes a Server from a Placement Group. + * + */ + post: operations["remove_server_from_placement_group"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/request_console": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Request Console for a Server + * @description 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. + */ + post: operations["request_server_console"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/reset": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Reset a Server + * @description 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. + */ + post: operations["reset_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/reset_password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Reset root Password of a Server + * @description 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. + * + */ + post: operations["reset_server_password"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/shutdown": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Shutdown a Server + * @description 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. + * + */ + post: operations["shutdown_server"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Server + * @description Returns a specific Action object for a Server. + */ + get: operations["get_server_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/servers/{id}/metrics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Metrics for a Server + * @description Get Metrics for specified Server. + * + * You must specify the type of metric to get: cpu, disk or network. You can also specify more than one type by comma separation, e.g. cpu,disk. + * + * Depending on the type you will get different time series data + * + * | Type | Timeseries | Unit | Description | + * |---------|-------------------------|-----------|------------------------------------------------------| + * | cpu | cpu | percent | Percent CPU usage | + * | disk | disk.0.iops.read | iop/s | Number of read IO operations per second | + * | | disk.0.iops.write | iop/s | Number of write IO operations per second | + * | | disk.0.bandwidth.read | bytes/s | Bytes read per second | + * | | disk.0.bandwidth.write | bytes/s | Bytes written per second | + * | network | network.0.pps.in | packets/s | Public Network interface packets per second received | + * | | network.0.pps.out | packets/s | Public Network interface packets per second sent | + * | | network.0.bandwidth.in | bytes/s | Public Network interface bytes/s received | + * | | network.0.bandwidth.out | bytes/s | Public Network interface bytes/s sent | + * + * Metrics are available for the last 30 days only. + * + * If you do not provide the step argument we will automatically adjust it so that a maximum of 200 samples are returned. + * + * We limit the number of samples returned to a maximum of 500 and will adjust the step parameter accordingly. + * + */ + get: operations["get_server_metrics"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ssh_keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List SSH keys + * @description Returns all SSH key objects. + */ + get: operations["list_ssh_keys"]; + put?: never; + /** + * Create an SSH key + * @description Creates a new SSH key with the given `name` and `public_key`. Once an SSH key is created, it can be used in other calls such as creating Servers. + */ + post: operations["create_ssh_key"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/ssh_keys/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a SSH key + * @description Returns a specific SSH key object. + */ + get: operations["get_ssh_key"]; + /** + * Update an SSH key + * @description Updates an SSH key. You can update an SSH key name and an SSH key labels. + * + */ + put: operations["update_ssh_key"]; + post?: never; + /** + * Delete an SSH key + * @description Deletes an SSH key. It cannot be used anymore. + */ + delete: operations["delete_ssh_key"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Volumes + * @description Gets all existing Volumes that you have available. + */ + get: operations["list_volumes"]; + put?: never; + /** + * Create a Volume + * @description Creates a new Volume attached to a Server. If you want to create a Volume that is not attached to a Server, you need to provide the `location` key instead of `server`. This can be either the ID or the name of the Location this Volume will be created in. Note that a Volume can be attached to a Server only in the same Location as the Volume itself. + * + * Specifying the Server during Volume creation will automatically attach the Volume to that Server after it has been initialized. In that case, the `next_actions` key in the response is an array which contains a single `attach_volume` action. + * + * The minimum Volume size is 10GB and the maximum size is 10TB (10240GB). + * + * A volume’s name can consist of alphanumeric characters, dashes, underscores, and dots, but has to start and end with an alphanumeric character. The total length is limited to 64 characters. Volume names must be unique per Project. + * + * #### Call specific error codes + * + * | Code | Description | + * |-------------------------------------|-----------------------------------------------------| + * | `no_space_left_in_location` | There is no volume space left in the given location | + * + */ + post: operations["create_volume"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions + * @description Returns all Action objects. You can `sort` the results by using the sort URI parameter, and filter them with the `status` and `id` parameter. + */ + get: operations["list_volumes_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/actions/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action + * @description Returns a specific Action object. + */ + get: operations["get_volumes_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get a Volume + * @description Gets a specific Volume object. + */ + get: operations["get_volume"]; + /** + * Update a Volume + * @description Updates the Volume properties. + * + */ + put: operations["update_volume"]; + post?: never; + /** + * Delete a Volume + * @description Deletes a volume. All Volume data is irreversibly destroyed. The Volume must not be attached to a Server and it must not have delete protection enabled. + */ + delete: operations["delete_volume"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Actions for a Volume + * @description Returns all Action objects for a Volume. You can `sort` the results by using the sort URI parameter, and filter them with the `status` parameter. + */ + get: operations["list_volume_actions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}/actions/attach": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach Volume to a Server + * @description Attaches a Volume to a Server. Works only if the Server is in the same Location as the Volume. + */ + post: operations["attach_volume"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}/actions/change_protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Change Volume Protection + * @description Changes the protection configuration of a Volume. + */ + post: operations["change_volume_protection"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}/actions/detach": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Detach Volume + * @description Detaches a Volume from the Server it’s attached to. You may attach it to a Server again at a later time. + */ + post: operations["detach_volume"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}/actions/resize": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Resize Volume + * @description Changes the size of a Volume. Note that downsizing a Volume is not possible. + */ + post: operations["resize_volume"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/volumes/{id}/actions/{action_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get an Action for a Volume + * @description Returns a specific Action for a Volume. + */ + get: operations["get_volume_action"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: never; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + get_actions: { + parameters: { + query: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + }; + }; + }; + }; + }; + get_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting an [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_certificates: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Filter resources by type. Can be used multiple times. The response will only + * contain the resources with the specified type. + * */ + type?: "uploaded" | "managed"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `certificates` key contains an array of Certificate objects. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "certificates": [ + * { + * "id": 897, + * "name": "my website cert", + * "labels": { + * "key": "value" + * }, + * "type": "uploaded", + * "certificate": "-----BEGIN CERTIFICATE-----\n...", + * "created": "2019-01-08T12:10:00+00:00", + * "not_valid_before": "2019-01-08T10:00:00+00:00", + * "not_valid_after": "2019-07-08T09:59:59+00:00", + * "domain_names": [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ], + * "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", + * "status": null, + * "used_by": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ] + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + certificates: { + /** + * Format: int64 + * @description ID of the Certificate. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of the Certificate. + * @example uploaded + * @enum {string} + */ + type?: "uploaded" | "managed"; + /** + * @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. + * @example -----BEGIN CERTIFICATE----- + * ... + */ + certificate: string | null; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Point in time when the Certificate becomes valid (in ISO-8601 format). + * @example 2019-01-08T10:00:00+00:00 + */ + not_valid_before: string | null; + /** + * @description Point in time when the Certificate stops being valid (in ISO-8601 format). + * + * @example 2019-07-08T09:59:59+00:00 + */ + not_valid_after: string | null; + /** + * @description Domains and subdomains covered by the Certificate. + * @example [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ] + */ + domain_names: string[]; + /** + * @description SHA256 fingerprint of the Certificate. + * @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f + */ + fingerprint: string | null; + /** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates. */ + status?: { + /** + * @description Status of the issuance process of the Certificate. + * @example completed + * @enum {string} + */ + issuance?: "pending" | "completed" | "failed"; + /** + * @description Status of the renewal process of the Certificate. + * @example scheduled + * @enum {string} + */ + renewal?: "scheduled" | "pending" | "failed" | "unavailable"; + /** + * @description If issuance or renewal reports `failed`, this property contains information about what happened. + * @example null + */ + error?: { + code?: string; + message?: string; + } | null; + } | null; + /** @description Resources currently using the Certificate. */ + used_by: { + /** + * Format: int64 + * @description ID of resource referenced. + * @example 4711 + */ + id: number; + /** + * @description Type of resource referenced. + * @example load_balancer + */ + type: string; + }[]; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_certificate: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the Certificate. + * @example my website cert + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Choose between uploading a Certificate in PEM format or requesting a managed *Let's Encrypt* Certificate. + * @default uploaded + * @example uploaded + * @enum {string} + */ + type?: "uploaded" | "managed"; + /** + * @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. Required for type `uploaded` Certificates. + * @example -----BEGIN CERTIFICATE----- + * ... + */ + certificate?: string; + /** + * @description Certificate key in PEM format. Required for type `uploaded` Certificates. + * @example -----BEGIN PRIVATE KEY----- + * ... + */ + private_key?: string; + /** + * @description Domains and subdomains that should be contained in the Certificate issued by *Let's Encrypt*. Required for type `managed` Certificates. + * @example null + */ + domain_names?: string[]; + }; + }; + }; + responses: { + /** @description The `certificate` key contains the Certificate that was just created. For type `managed` Certificates the `action` key contains the Action that allows for tracking the issuance process. For type `uploaded` Certificates the `action` is always null. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Certificate */ + certificate: { + /** + * Format: int64 + * @description ID of the Certificate. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of the Certificate. + * @example uploaded + * @enum {string} + */ + type?: "uploaded" | "managed"; + /** + * @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. + * @example -----BEGIN CERTIFICATE----- + * ... + */ + certificate: string | null; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Point in time when the Certificate becomes valid (in ISO-8601 format). + * @example 2019-01-08T10:00:00+00:00 + */ + not_valid_before: string | null; + /** + * @description Point in time when the Certificate stops being valid (in ISO-8601 format). + * + * @example 2019-07-08T09:59:59+00:00 + */ + not_valid_after: string | null; + /** + * @description Domains and subdomains covered by the Certificate. + * @example [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ] + */ + domain_names: string[]; + /** + * @description SHA256 fingerprint of the Certificate. + * @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f + */ + fingerprint: string | null; + /** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates. */ + status?: { + /** + * @description Status of the issuance process of the Certificate. + * @example completed + * @enum {string} + */ + issuance?: "pending" | "completed" | "failed"; + /** + * @description Status of the renewal process of the Certificate. + * @example scheduled + * @enum {string} + */ + renewal?: "scheduled" | "pending" | "failed" | "unavailable"; + /** + * @description If issuance or renewal reports `failed`, this property contains information about what happened. + * @example null + */ + error?: { + code?: string; + message?: string; + } | null; + } | null; + /** @description Resources currently using the Certificate. */ + used_by: { + /** + * Format: int64 + * @description ID of resource referenced. + * @example 4711 + */ + id: number; + /** + * @description Type of resource referenced. + * @example load_balancer + */ + type: string; + }[]; + }; + /** ActionNullable */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + } | null; + }; + }; + }; + }; + }; + list_certificates_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_certificates_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply has this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_certificate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Certificate. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `certificate` key contains a Certificate object. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "certificate": { + * "id": 897, + * "name": "my website cert", + * "labels": { + * "key": "value" + * }, + * "type": "uploaded", + * "certificate": "-----BEGIN CERTIFICATE-----\n...", + * "created": "2019-01-08T12:10:00+00:00", + * "not_valid_before": "2019-01-08T10:00:00+00:00", + * "not_valid_after": "2019-07-08T09:59:59+00:00", + * "domain_names": [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ], + * "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", + * "status": null, + * "used_by": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ] + * } + * } */ + "application/json": { + /** Certificate */ + certificate: { + /** + * Format: int64 + * @description ID of the Certificate. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of the Certificate. + * @example uploaded + * @enum {string} + */ + type?: "uploaded" | "managed"; + /** + * @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. + * @example -----BEGIN CERTIFICATE----- + * ... + */ + certificate: string | null; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Point in time when the Certificate becomes valid (in ISO-8601 format). + * @example 2019-01-08T10:00:00+00:00 + */ + not_valid_before: string | null; + /** + * @description Point in time when the Certificate stops being valid (in ISO-8601 format). + * + * @example 2019-07-08T09:59:59+00:00 + */ + not_valid_after: string | null; + /** + * @description Domains and subdomains covered by the Certificate. + * @example [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ] + */ + domain_names: string[]; + /** + * @description SHA256 fingerprint of the Certificate. + * @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f + */ + fingerprint: string | null; + /** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates. */ + status?: { + /** + * @description Status of the issuance process of the Certificate. + * @example completed + * @enum {string} + */ + issuance?: "pending" | "completed" | "failed"; + /** + * @description Status of the renewal process of the Certificate. + * @example scheduled + * @enum {string} + */ + renewal?: "scheduled" | "pending" | "failed" | "unavailable"; + /** + * @description If issuance or renewal reports `failed`, this property contains information about what happened. + * @example null + */ + error?: { + code?: string; + message?: string; + } | null; + } | null; + /** @description Resources currently using the Certificate. */ + used_by: { + /** + * Format: int64 + * @description ID of resource referenced. + * @example 4711 + */ + id: number; + /** + * @description Type of resource referenced. + * @example load_balancer + */ + type: string; + }[]; + }; + }; + }; + }; + }; + }; + update_certificate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Certificate. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New Certificate name. + * @example my website cert + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `certificate` key contains the Certificate that was just updated. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "certificate": { + * "id": 897, + * "name": "my website cert", + * "labels": { + * "key": "value" + * }, + * "type": "uploaded", + * "certificate": "-----BEGIN CERTIFICATE-----\n...", + * "created": "2019-01-08T12:10:00+00:00", + * "not_valid_before": "2019-01-08T10:00:00+00:00", + * "not_valid_after": "2019-07-08T09:59:59+00:00", + * "domain_names": [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ], + * "fingerprint": "03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f", + * "status": null, + * "used_by": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ] + * } + * } */ + "application/json": { + /** Certificate */ + certificate: { + /** + * Format: int64 + * @description ID of the Certificate. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of the Certificate. + * @example uploaded + * @enum {string} + */ + type?: "uploaded" | "managed"; + /** + * @description Certificate and chain in PEM format, in order so that each record directly certifies the one preceding. + * @example -----BEGIN CERTIFICATE----- + * ... + */ + certificate: string | null; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Point in time when the Certificate becomes valid (in ISO-8601 format). + * @example 2019-01-08T10:00:00+00:00 + */ + not_valid_before: string | null; + /** + * @description Point in time when the Certificate stops being valid (in ISO-8601 format). + * + * @example 2019-07-08T09:59:59+00:00 + */ + not_valid_after: string | null; + /** + * @description Domains and subdomains covered by the Certificate. + * @example [ + * "example.com", + * "webmail.example.com", + * "www.example.com" + * ] + */ + domain_names: string[]; + /** + * @description SHA256 fingerprint of the Certificate. + * @example 03:c7:55:9b:2a:d1:04:17:09:f6:d0:7f:18:34:63:d4:3e:5f + */ + fingerprint: string | null; + /** @description Current status of a type `managed` Certificate, always *null* for type `uploaded` Certificates. */ + status?: { + /** + * @description Status of the issuance process of the Certificate. + * @example completed + * @enum {string} + */ + issuance?: "pending" | "completed" | "failed"; + /** + * @description Status of the renewal process of the Certificate. + * @example scheduled + * @enum {string} + */ + renewal?: "scheduled" | "pending" | "failed" | "unavailable"; + /** + * @description If issuance or renewal reports `failed`, this property contains information about what happened. + * @example null + */ + error?: { + code?: string; + message?: string; + } | null; + } | null; + /** @description Resources currently using the Certificate. */ + used_by: { + /** + * Format: int64 + * @description ID of resource referenced. + * @example 4711 + */ + id: number; + /** + * @description Type of resource referenced. + * @example load_balancer + */ + type: string; + }[]; + }; + }; + }; + }; + }; + }; + delete_certificate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Certificate. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Certificate deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_certificate_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Certificate. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 14, + * "command": "issue_certificate", + * "status": "success", + * "progress": 100, + * "started": "2021-01-30T23:55:00+00:00", + * "finished": "2021-01-30T23:57:00+00:00", + * "resources": [ + * { + * "id": 896, + * "type": "certificate" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + retry_certificate: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Certificate. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the resulting Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 14, + * "command": "issue_certificate", + * "status": "success", + * "progress": 100, + * "started": "2021-01-30T23:55:00+00:00", + * "finished": "2021-01-30T23:57:00+00:00", + * "resources": [ + * { + * "id": 896, + * "type": "certificate" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_certificate_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Certificate. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the Certificate Action. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 14, + * "command": "issue_certificate", + * "status": "success", + * "progress": 100, + * "started": "2021-01-30T23:55:00+00:00", + * "finished": "2021-01-30T23:57:00+00:00", + * "resources": [ + * { + * "id": 896, + * "type": "certificate" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_datacenters: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Contains the queried [Datacenters](#datacenters). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @description List of [Datacenters](#datacenters). */ + datacenters: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }[]; + /** + * Format: int64 + * @description Recommended [Datacenter](#datacenters) for creating new resources. + * @example 1 + */ + recommendation: number; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_datacenter: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Datacenter. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Contains the queried [Datacenter](#datacenters). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + }; + }; + }; + }; + }; + list_firewalls: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `firewalls` key contains the [Firewalls](#firewalls). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + firewalls: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id: number; + /** + * @description Name of the [Firewall](#firewalls). + * + * Limited to a maximum of 128 characters. + * + * Must be unique per Project. + * + * @example new-name + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + rules: { + /** @description Description of the rule. */ + description?: string | null; + /** + * @description Traffic direction in which the rule should be applied to. + * + * Use `source_ips` for direction `in` and `destination_ips` for direction `out` to specify IPs. + * + * @example in + * @enum {string} + */ + direction: "in" | "out"; + /** + * @description List of permitted IPv4/IPv6 addresses for incoming traffic. + * + * The `direction` must be set to `in`. + * + * IPs must be provided in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ] + */ + source_ips: string[]; + /** + * @description List of permitted IPv4/IPv6 addresses for outgoing traffic. + * + * The `direction` must be set to `out`. + * + * IPs must be in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [] + */ + destination_ips: string[]; + /** + * @description Network protocol to apply the rule for. + * @enum {string} + */ + protocol: "tcp" | "udp" | "icmp" | "esp" | "gre"; + /** + * @description Port or port range to apply the rule for. + * + * Only applicable for protocols `tcp` and `udp`. + * + * A port range can be specified by separating lower and upper bounds with a dash. `1024-5000` will include + * all ports starting from 1024 up to port 5000. + * + * @example 80 + */ + port: string | null; + }[]; + applied_to: { + /** + * @description The type of resource to apply. + * @example server + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + /** @description Resources applied to via this [Label Selector](#label-selector). + * */ + applied_to_resources?: { + /** + * @description Type of resource. + * @example server + * @enum {string} + */ + type?: "server"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + }[]; + }[]; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_firewall: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "name": "Corporate Intranet Protection", + * "labels": { + * "key": "value" + * }, + * "rules": [ + * { + * "description": "Allow port 80", + * "direction": "in", + * "source_ips": [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ], + * "protocol": "tcp", + * "port": "80" + * } + * ], + * "apply_to": [ + * { + * "type": "server", + * "server": { + * "id": 42 + * } + * } + * ] + * } */ + "application/json": { + /** + * @description Name of the [Firewall](#firewalls). + * + * Limited to a maximum of 128 characters. + * + * Must be unique per Project. + * + * @example new-name + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Array of rules. + * + * Rules are limited to 50 entries per [Firewall](#firewalls) and [500 effective rules](https://docs.hetzner.com/cloud/firewalls/overview#limits). + * + * @example [ + * { + * "direction": "in", + * "source_ips": [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ], + * "protocol": "tcp", + * "port": "80" + * } + * ] + */ + rules?: { + /** @description Description of the rule. */ + description?: string | null; + /** + * @description Traffic direction in which the rule should be applied to. + * + * Use `source_ips` for direction `in` and `destination_ips` for direction `out` to specify IPs. + * + * @example in + * @enum {string} + */ + direction: "in" | "out"; + /** + * @description List of permitted IPv4/IPv6 addresses for incoming traffic. + * + * The `direction` must be set to `in`. + * + * IPs must be provided in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ] + */ + source_ips?: string[]; + /** + * @description List of permitted IPv4/IPv6 addresses for outgoing traffic. + * + * The `direction` must be set to `out`. + * + * IPs must be in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [] + */ + destination_ips?: string[]; + /** + * @description Network protocol to apply the rule for. + * @enum {string} + */ + protocol: "tcp" | "udp" | "icmp" | "esp" | "gre"; + /** + * @description Port or port range to apply the rule for. + * + * Only applicable for protocols `tcp` and `udp`. + * + * A port range can be specified by separating lower and upper bounds with a dash. `1024-5000` will include + * all ports starting from 1024 up to port 5000. + * + * @example 80 + */ + port?: string; + }[]; + /** @description Resources to apply the [Firewall](#firewalls) to. + * + * Resources added directly are taking precedence over those added via a [Label Selector](#label-selector). + * */ + apply_to?: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the [Server](#servers). + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + }[]; + }; + }; + }; + responses: { + /** @description The `firewall` key contains the created [Firewall](#firewalls). */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** FirewallResponse */ + firewall?: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id: number; + /** + * @description Name of the [Firewall](#firewalls). + * + * Limited to a maximum of 128 characters. + * + * Must be unique per Project. + * + * @example new-name + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + rules: { + /** @description Description of the rule. */ + description?: string | null; + /** + * @description Traffic direction in which the rule should be applied to. + * + * Use `source_ips` for direction `in` and `destination_ips` for direction `out` to specify IPs. + * + * @example in + * @enum {string} + */ + direction: "in" | "out"; + /** + * @description List of permitted IPv4/IPv6 addresses for incoming traffic. + * + * The `direction` must be set to `in`. + * + * IPs must be provided in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ] + */ + source_ips: string[]; + /** + * @description List of permitted IPv4/IPv6 addresses for outgoing traffic. + * + * The `direction` must be set to `out`. + * + * IPs must be in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [] + */ + destination_ips: string[]; + /** + * @description Network protocol to apply the rule for. + * @enum {string} + */ + protocol: "tcp" | "udp" | "icmp" | "esp" | "gre"; + /** + * @description Port or port range to apply the rule for. + * + * Only applicable for protocols `tcp` and `udp`. + * + * A port range can be specified by separating lower and upper bounds with a dash. `1024-5000` will include + * all ports starting from 1024 up to port 5000. + * + * @example 80 + */ + port: string | null; + }[]; + applied_to: { + /** + * @description The type of resource to apply. + * @example server + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + /** @description Resources applied to via this [Label Selector](#label-selector). + * */ + applied_to_resources?: { + /** + * @description Type of resource. + * @example server + * @enum {string} + */ + type?: "server"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + }[]; + }[]; + }; + /** @example [ + * { + * "id": 13, + * "command": "set_firewall_rules", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * }, + * { + * "id": 14, + * "command": "apply_firewall", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ] */ + actions?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + }; + }; + }; + }; + }; + list_firewalls_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_firewalls_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_firewall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `firewall` key contains the [Firewall](#firewalls). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** FirewallResponse */ + firewall: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id: number; + /** + * @description Name of the [Firewall](#firewalls). + * + * Limited to a maximum of 128 characters. + * + * Must be unique per Project. + * + * @example new-name + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + rules: { + /** @description Description of the rule. */ + description?: string | null; + /** + * @description Traffic direction in which the rule should be applied to. + * + * Use `source_ips` for direction `in` and `destination_ips` for direction `out` to specify IPs. + * + * @example in + * @enum {string} + */ + direction: "in" | "out"; + /** + * @description List of permitted IPv4/IPv6 addresses for incoming traffic. + * + * The `direction` must be set to `in`. + * + * IPs must be provided in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ] + */ + source_ips: string[]; + /** + * @description List of permitted IPv4/IPv6 addresses for outgoing traffic. + * + * The `direction` must be set to `out`. + * + * IPs must be in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [] + */ + destination_ips: string[]; + /** + * @description Network protocol to apply the rule for. + * @enum {string} + */ + protocol: "tcp" | "udp" | "icmp" | "esp" | "gre"; + /** + * @description Port or port range to apply the rule for. + * + * Only applicable for protocols `tcp` and `udp`. + * + * A port range can be specified by separating lower and upper bounds with a dash. `1024-5000` will include + * all ports starting from 1024 up to port 5000. + * + * @example 80 + */ + port: string | null; + }[]; + applied_to: { + /** + * @description The type of resource to apply. + * @example server + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + /** @description Resources applied to via this [Label Selector](#label-selector). + * */ + applied_to_resources?: { + /** + * @description Type of resource. + * @example server + * @enum {string} + */ + type?: "server"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + }[]; + }[]; + }; + }; + }; + }; + }; + }; + update_firewall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the [Firewall](#firewalls). + * + * Limited to a maximum of 128 characters. + * + * Must be unique per Project. + * + * @example new-name + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `firewall` key contains the updated [Firewall](#firewalls). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** FirewallResponse */ + firewall: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id: number; + /** + * @description Name of the [Firewall](#firewalls). + * + * Limited to a maximum of 128 characters. + * + * Must be unique per Project. + * + * @example new-name + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + rules: { + /** @description Description of the rule. */ + description?: string | null; + /** + * @description Traffic direction in which the rule should be applied to. + * + * Use `source_ips` for direction `in` and `destination_ips` for direction `out` to specify IPs. + * + * @example in + * @enum {string} + */ + direction: "in" | "out"; + /** + * @description List of permitted IPv4/IPv6 addresses for incoming traffic. + * + * The `direction` must be set to `in`. + * + * IPs must be provided in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ] + */ + source_ips: string[]; + /** + * @description List of permitted IPv4/IPv6 addresses for outgoing traffic. + * + * The `direction` must be set to `out`. + * + * IPs must be in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [] + */ + destination_ips: string[]; + /** + * @description Network protocol to apply the rule for. + * @enum {string} + */ + protocol: "tcp" | "udp" | "icmp" | "esp" | "gre"; + /** + * @description Port or port range to apply the rule for. + * + * Only applicable for protocols `tcp` and `udp`. + * + * A port range can be specified by separating lower and upper bounds with a dash. `1024-5000` will include + * all ports starting from 1024 up to port 5000. + * + * @example 80 + */ + port: string | null; + }[]; + applied_to: { + /** + * @description The type of resource to apply. + * @example server + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + /** @description Resources applied to via this [Label Selector](#label-selector). + * */ + applied_to_resources?: { + /** + * @description Type of resource. + * @example server + * @enum {string} + */ + type?: "server"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + }; + }[]; + }[]; + }; + }; + }; + }; + }; + }; + delete_firewall: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Firewall deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_firewall_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "set_firewall_rules", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + apply_firewall_to_resources: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "apply_to": [ + * { + * "type": "server", + * "server": { + * "id": 42 + * } + * } + * ] + * } */ + "application/json": { + /** @description Resources to apply the [Firewall](#firewalls) to. + * + * Extends existing resources. + * */ + apply_to: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the [Server](#servers). + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + }[]; + }; + }; + }; + responses: { + /** @description The `actions` key contains multiple [Actions](#actions) with the `apply_firewall` command. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 14, + * "command": "apply_firewall", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ] + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + }; + }; + }; + }; + }; + remove_firewall_from_resources: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "remove_from": [ + * { + * "type": "server", + * "server": { + * "id": 42 + * } + * } + * ] + * } */ + "application/json": { + /** @description Resources to remove the [Firewall](#firewalls) from. */ + remove_from: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector"; + /** @description [Server](#servers) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `server`, otherwise `null`. + * */ + server?: { + /** + * Format: int64 + * @description ID of the [Server](#servers). + */ + id: number; + }; + /** @description [Label Selector](#label-selector) the [Firewall](#firewalls) is applied to. + * + * Only set for `type` `label_selector`, otherwise `null`. + * */ + label_selector?: { + /** + * @description The selector. + * @example env=prod + */ + selector: string; + }; + }[]; + }; + }; + }; + responses: { + /** @description The `actions` key contains multiple [Actions](#actions) with the `remove_firewall` command. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 14, + * "command": "remove_firewall", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ] + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + }; + }; + }; + }; + }; + set_firewall_rules: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "rules": [ + * { + * "description": "Allow port 80", + * "direction": "in", + * "source_ips": [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ], + * "protocol": "tcp", + * "port": "80" + * } + * ] + * } */ + "application/json": { + /** @description Array of rules. + * + * Rules are limited to 50 entries per [Firewall](#firewalls) and [500 effective rules](https://docs.hetzner.com/cloud/firewalls/overview#limits). + * + * Existing rules will be replaced. + * */ + rules: { + /** @description Description of the rule. */ + description?: string | null; + /** + * @description Traffic direction in which the rule should be applied to. + * + * Use `source_ips` for direction `in` and `destination_ips` for direction `out` to specify IPs. + * + * @example in + * @enum {string} + */ + direction: "in" | "out"; + /** + * @description List of permitted IPv4/IPv6 addresses for incoming traffic. + * + * The `direction` must be set to `in`. + * + * IPs must be provided in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [ + * "28.239.13.1/32", + * "28.239.14.0/24", + * "ff21:1eac:9a3b:ee58:5ca:990c:8bc9:c03b/128" + * ] + */ + source_ips?: string[]; + /** + * @description List of permitted IPv4/IPv6 addresses for outgoing traffic. + * + * The `direction` must be set to `out`. + * + * IPs must be in [CIDR block notation](https://wikipedia.org/wiki/CIDR). You can specify 100 CIDR + * blocks at most. + * + * The CIDR blocks may refer to networks (with empty host bits) or single hosts. + * For example, a network could be defined with `10.0.1.0/24` or `2001:db8:ff00:42::/64`, + * and a single host with `10.0.1.1/32` or `2001:db8:ff00:42::8329/128`. + * + * Use `0.0.0.0/0` to allow any IPv4 addresses and `::/0` to allow any IPv6 addresses. + * + * @example [] + */ + destination_ips?: string[]; + /** + * @description Network protocol to apply the rule for. + * @enum {string} + */ + protocol: "tcp" | "udp" | "icmp" | "esp" | "gre"; + /** + * @description Port or port range to apply the rule for. + * + * Only applicable for protocols `tcp` and `udp`. + * + * A port range can be specified by separating lower and upper bounds with a dash. `1024-5000` will include + * all ports starting from 1024 up to port 5000. + * + * @example 80 + */ + port?: string; + }[]; + }; + }; + }; + responses: { + /** @description The `action` key contains an [Action](#actions) with the `set_firewall_rules` command and additionally one with the `apply_firewall` command per resource of the [Firewall](#firewalls). */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "set_firewall_rules", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * }, + * { + * "id": 14, + * "command": "apply_firewall", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 38, + * "type": "firewall" + * }, + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ] + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + }; + }; + }; + }; + }; + get_firewall_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Firewall. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the [Firewall](#firewalls) [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "set_firewall_rules", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 38, + * "type": "firewall" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_floating_ips: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "created" | "created:asc" | "created:desc"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Floating IPs](#floating-ips). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + floating_ips: { + /** + * Format: int64 + * @description ID of the Floating IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description Description of the Resource. + * @example This describes my resource + */ + description: string | null; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description The Floating IP type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * Format: int64 + * @description [Server](#servers) the [Floating IP](#floating-ips) is assigned to. + * + * `null` if not assigned. + * + * @example 42 + */ + server: number | null; + /** @description List of reverse DNS entries for the [Floating IP](#floating-ips). + * */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + home_location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Indicates whether the [Floating IP](#floating-ips) is blocked. + * @example false + */ + blocked: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_floating_ip: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description The `type` argument is required while `home_location` and `server` are mutually exclusive. */ + requestBody?: { + content: { + "application/json": { + /** + * @description The Floating IP type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * Format: int64 + * @description [Server](#servers) the [Floating IP](#floating-ips) is assigned to. + * + * `null` if not assigned. + * + * @example 42 + */ + server?: number | null; + /** + * @description Home [Location](#locations) for the [Floating IP](#floating-ips). + * + * Either the ID or the name of the [Location](#locations). + * + * Only optional if no [Server](#servers) is provided. Routing is optimized for this [Locations](#locations). + * + * @example fsn1 + */ + home_location?: string; + /** + * @description Description of the Resource. + * @example This describes my resource + */ + description?: string | null; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description Response for creating a [Floating IP](#floating-ips). + * + * Contains the created IP. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "floating_ip": { + * "id": 4711, + * "name": "Web Frontend", + * "description": "Web Frontend", + * "ip": "2001:db8::/64", + * "type": "ipv6", + * "server": 42, + * "dns_ptr": [ + * { + * "ip": "2001:db8::1", + * "dns_ptr": "server.example.com" + * } + * ], + * "home_location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "blocked": false, + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00" + * }, + * "action": { + * "id": 13, + * "command": "create_floating_ip", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + floating_ip: { + /** + * Format: int64 + * @description ID of the Floating IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description Description of the Resource. + * @example This describes my resource + */ + description: string | null; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description The Floating IP type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * Format: int64 + * @description [Server](#servers) the [Floating IP](#floating-ips) is assigned to. + * + * `null` if not assigned. + * + * @example 42 + */ + server: number | null; + /** @description List of reverse DNS entries for the [Floating IP](#floating-ips). + * */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + home_location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Indicates whether the [Floating IP](#floating-ips) is blocked. + * @example false + */ + blocked: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }; + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_floating_ips_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_floating_ips_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting a single [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_floating_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting a single [Floating IP](#floating-ips). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + floating_ip: { + /** + * Format: int64 + * @description ID of the Floating IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description Description of the Resource. + * @example This describes my resource + */ + description: string | null; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description The Floating IP type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * Format: int64 + * @description [Server](#servers) the [Floating IP](#floating-ips) is assigned to. + * + * `null` if not assigned. + * + * @example 42 + */ + server: number | null; + /** @description List of reverse DNS entries for the [Floating IP](#floating-ips). + * */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + home_location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Indicates whether the [Floating IP](#floating-ips) is blocked. + * @example false + */ + blocked: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }; + }; + }; + }; + }; + }; + update_floating_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Description of the Resource. + * @example This describes my resource + */ + description?: string | null; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description Response for updating a [Floating IP](#floating-ips). + * + * Contains the updated [Floating IP](#floating-ips). + * */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "floating_ip": { + * "id": 4711, + * "name": "Web Frontend", + * "description": "Web Frontend", + * "ip": "2001:db8::/64", + * "type": "ipv6", + * "server": 42, + * "dns_ptr": [ + * { + * "ip": "2001:db8::1", + * "dns_ptr": "server.example.com" + * } + * ], + * "home_location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "blocked": false, + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00" + * } + * } */ + "application/json": { + floating_ip: { + /** + * Format: int64 + * @description ID of the Floating IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description Description of the Resource. + * @example This describes my resource + */ + description: string | null; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description The Floating IP type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * Format: int64 + * @description [Server](#servers) the [Floating IP](#floating-ips) is assigned to. + * + * `null` if not assigned. + * + * @example 42 + */ + server: number | null; + /** @description List of reverse DNS entries for the [Floating IP](#floating-ips). + * */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + home_location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Indicates whether the [Floating IP](#floating-ips) is blocked. + * @example false + */ + blocked: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }; + }; + }; + }; + }; + }; + delete_floating_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Floating IP deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_floating_ip_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "assign_floating_ip", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "server" + * }, + * { + * "id": 4712, + * "type": "floating_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + assign_floating_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description [Server](#servers) the [Floating IP](#floating-ips) is assigned to. + * + * `null` if not assigned. + * + * @example 42 + */ + server: number | null; + }; + }; + }; + responses: { + /** @description Response for assigning a [Floating IP](#floating-ips). + * + * Contains an [Action](#actions) of type `assign_floating_ip`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "assign_floating_ip", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "floating_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_floating_ip_dns_ptr: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + /** @description The `ip` attributes specifies for which IP address the record is set. For IPv4 addresses this must be the exact address of the [Floating IP](#floating-ips). For IPv6 addresses this must be a single address within the `/64` subnet of the [Floating IP](#floating-ips). + * + * The `dns_ptr` attribute specifies the hostname used for the IP address. + * + * For IPv6 [Floating IPs](#floating-ips) up to 100 entries can be created. + * */ + requestBody?: { + content: { + "application/json": { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }; + }; + }; + responses: { + /** @description Response for changing a [Floating IPs](#floating-ips) DNS pointer. + * + * Contains an [Action](#actions) of type `change_dns_ptr`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_dns_ptr", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "floating_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_floating_ip_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + }; + }; + responses: { + /** @description Response for changing a [Floating IPs](#floating-ips) protection settings. + * + * Contains an [Action](#actions) of type `change_protection`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "floating_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + unassign_floating_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for unassigning a [Floating IP](#floating-ips). + * + * Contains an [Action](#actions) of type `unassign_floating_ip`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "unassign_floating_ip", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "floating_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_floating_ip_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Floating IP. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting an [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "assign_floating_ip", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "floating_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_images: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by type. Can be used multiple times. The response will only + * contain the resources with the specified type. + * */ + type?: "system" | "app" | "snapshot" | "backup"; + /** @description Filter resources by status. Can be used multiple times. The response will only + * contain the resources with the specified status. + * */ + status?: "available" | "creating" | "unavailable"; + /** @description Can be used multiple times. Server ID linked to the Image. Only available for Images of type `backup`. */ + bound_to?: string; + /** @description Can be used multiple times. */ + include_deprecated?: boolean; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Filter resources by cpu architecture. The response will only contain the resources + * with the specified cpu architecture. + * */ + architecture?: "x86" | "arm"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `images` key in the reply contains an array of Image objects with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + images: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + list_images_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_images_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply has this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_image: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Image. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `image` key in the reply contains an Image object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + image?: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + }; + }; + }; + }; + }; + }; + update_image: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Image. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New description of Image. + * @example My new Image description + */ + description?: string; + /** + * @description Destination Image type to convert to. + * @enum {string} + */ + type?: "snapshot"; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The image key in the reply contains the modified Image object. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "image": { + * "id": 4711, + * "type": "snapshot", + * "status": "available", + * "name": null, + * "description": "My new Image description", + * "image_size": 2.3, + * "disk_size": 10, + * "created": "2016-01-30T23:50:00+00:00", + * "created_from": { + * "id": 1, + * "name": "Server" + * }, + * "bound_to": null, + * "os_flavor": "ubuntu", + * "os_version": "20.04", + * "rapid_deploy": false, + * "protection": { + * "delete": false + * }, + * "deprecated": "2018-02-28T00:00:00+00:00", + * "deleted": null, + * "labels": { + * "key": "value" + * }, + * "architecture": "x86" + * } + * } */ + "application/json": { + image?: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + }; + }; + }; + }; + }; + }; + delete_image: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Image. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Image deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_image_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Image. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "image" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + change_image_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Image. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description If true, prevents the snapshot from being deleted. + * @example true + */ + delete?: boolean; + }; + }; + }; + responses: { + /** @description The `action` key contains the `change_protection` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "image" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_image_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Image. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the Image Action. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "image" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_isos: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by cpu architecture. The response will only contain the resources + * with the specified cpu architecture. + * */ + architecture?: "x86" | "arm"; + /** @description Include Images with wildcard architecture (architecture is null). Works only if architecture filter is specified. */ + include_architecture_wildcard?: boolean; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `isos` key in the reply contains an array of iso objects with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + isos: { + /** + * Format: int64 + * @description ID of the ISO. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the ISO. Only set for public ISOs. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + name: string | null; + /** + * @description Description of the ISO. + * @example FreeBSD 11.0 x64 + */ + description: string; + /** + * @description Type of the ISO. + * @enum {string|null} + */ + type: "public" | "private" | null; + /** + * DeprecationInfo + * @description 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: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + /** + * @description CPU architecture compatible with the ISO. + * + * Null indicates no restriction on the architecture (wildcard). + * + * @example x86 + * @enum {string|null} + */ + architecture: "x86" | "arm" | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_iso: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the ISO. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `iso` key in the reply contains an array of ISO objects with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + iso: { + /** + * Format: int64 + * @description ID of the ISO. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the ISO. Only set for public ISOs. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + name: string | null; + /** + * @description Description of the ISO. + * @example FreeBSD 11.0 x64 + */ + description: string; + /** + * @description Type of the ISO. + * @enum {string|null} + */ + type: "public" | "private" | null; + /** + * DeprecationInfo + * @description 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: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + /** + * @description CPU architecture compatible with the ISO. + * + * Null indicates no restriction on the architecture (wildcard). + * + * @example x86 + * @enum {string|null} + */ + architecture: "x86" | "arm" | null; + }; + }; + }; + }; + }; + }; + list_load_balancer_types: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `load_balancer_types` key in the reply contains an array of Load Balancer type objects with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + load_balancer_types: { + /** + * Format: int64 + * @description ID of the Load Balancer type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Load Balancer type. + * @example lb11 + */ + name: string; + /** + * @description Description of the Load Balancer type. + * @example LB11 + */ + description: string; + /** + * Format: int64 + * @description Number of maximum simultaneous open connections. + * @example 20000 + */ + max_connections: number; + /** + * Format: int64 + * @description Number of services a Load Balancer of this type can have. + * @example 5 + */ + max_services: number; + /** + * Format: int64 + * @description Number of targets a single Load Balancer can have. + * @example 25 + */ + max_targets: number; + /** + * Format: int64 + * @description Number of SSL Certificates that can be assigned to a single Load Balancer. + * @example 10 + */ + max_assigned_certificates: number; + /** + * @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format). + * @example 2016-01-30T23:50:00+00:00 + */ + deprecated: string | null; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_load_balancer_type: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer Type. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `load_balancer_type` key in the reply contains a Load Balancer type object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + load_balancer_type?: { + /** + * Format: int64 + * @description ID of the Load Balancer type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Load Balancer type. + * @example lb11 + */ + name: string; + /** + * @description Description of the Load Balancer type. + * @example LB11 + */ + description: string; + /** + * Format: int64 + * @description Number of maximum simultaneous open connections. + * @example 20000 + */ + max_connections: number; + /** + * Format: int64 + * @description Number of services a Load Balancer of this type can have. + * @example 5 + */ + max_services: number; + /** + * Format: int64 + * @description Number of targets a single Load Balancer can have. + * @example 25 + */ + max_targets: number; + /** + * Format: int64 + * @description Number of SSL Certificates that can be assigned to a single Load Balancer. + * @example 10 + */ + max_assigned_certificates: number; + /** + * @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format). + * @example 2016-01-30T23:50:00+00:00 + */ + deprecated: string | null; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }; + }; + }; + }; + }; + }; + list_load_balancers: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `load_balancers` key contains a list of Load Balancers. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + load_balancers: { + /** + * Format: int64 + * @description ID of the Load Balancer. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** @description Public network information. */ + public_net: { + /** @description Public Interface enabled or not. */ + enabled: boolean; + /** @description IP address (v4). */ + ipv4: { + /** + * @description IP address (v4) of this Load Balancer. + * @example 1.2.3.4 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + /** @description IP address (v6). */ + ipv6: { + /** + * @description IP address (v6) of this Load Balancer. + * @example 2001:db8::1 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description ID of the Network. + * @example 4711 + */ + network?: number; + /** + * @description IP address (v4) of this Load Balancer in this Network. + * @example 10.0.0.2 + */ + ip?: string; + }[]; + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + load_balancer_type: { + /** + * Format: int64 + * @description ID of the Load Balancer type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Load Balancer type. + * @example lb11 + */ + name: string; + /** + * @description Description of the Load Balancer type. + * @example LB11 + */ + description: string; + /** + * Format: int64 + * @description Number of maximum simultaneous open connections. + * @example 20000 + */ + max_connections: number; + /** + * Format: int64 + * @description Number of services a Load Balancer of this type can have. + * @example 5 + */ + max_services: number; + /** + * Format: int64 + * @description Number of targets a single Load Balancer can have. + * @example 25 + */ + max_targets: number; + /** + * Format: int64 + * @description Number of SSL Certificates that can be assigned to a single Load Balancer. + * @example 10 + */ + max_assigned_certificates: number; + /** + * @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format). + * @example 2016-01-30T23:50:00+00:00 + */ + deprecated: string | null; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description List of services that belong to this Load Balancer. */ + services: { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol: boolean; + /** + * LoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @default HCLBSTICKY + * @example HCLBSTICKY + */ + cookie_name: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @default 300 + * @example 300 + */ + cookie_lifetime: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. + * @default false + * @example true + */ + redirect_http: boolean; + /** + * @description Use sticky sessions. Only available if `protocol` is `http` or `https`. + * @default false + * @example true + */ + sticky_sessions: boolean; + }; + }[]; + /** @description List of targets that belong to this Load Balancer. */ + targets: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetLabelSelector + * @description Label selector used to determine targets. Only present for target type "label_selector". + */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description IP target where the traffic should be routed to. 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 present for target type `ip`. + */ + ip?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + /** @description List of resolved label selector target Servers. Only present for type "label_selector". */ + targets?: { + /** + * @description Type of the resource. Here always "server". + * @example server + */ + type?: string; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + }[]; + }[]; + /** @description Algorithm of the Load Balancer. */ + algorithm: { + /** + * @description Type of the algorithm. + * @enum {string} + */ + type: "round_robin" | "least_connections"; + }; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 10000 + */ + included_traffic: number; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_load_balancer: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the Load Balancer. + * @example Web Frontend + */ + name: string; + /** + * @description ID or name of the Load Balancer type this Load Balancer should be created with. + * @example lb11 + */ + load_balancer_type: string; + /** + * LoadBalancerAlgorithm + * @description Algorithm of the Load Balancer. + * @default { + * "type": "round_robin" + * } + */ + algorithm?: { + /** + * @description Type of the algorithm. + * @default round_robin + * @enum {string} + */ + type: "round_robin" | "least_connections"; + }; + /** @description Array of services. */ + services?: { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol: boolean; + /** + * LoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes?: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @default HCLBSTICKY + * @example HCLBSTICKY + */ + cookie_name?: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @default 300 + * @example 300 + */ + cookie_lifetime?: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. + * @default false + * @example true + */ + redirect_http?: boolean; + /** + * @description Use sticky sessions. Only available if `protocol` is `http` or `https`. + * @default false + * @example true + */ + sticky_sessions?: boolean; + }; + }[]; + /** @description Array of targets. */ + targets?: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** + * LoadBalancerTargetServer + * @description Configuration for type Server, only valid and required if type is `server`. + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * @description 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. + * @default false + * @example true + */ + use_private_ip?: boolean; + /** + * LoadBalancerTargetLabelSelector + * @description Configuration for label selector targets, only valid and required if type is `label_selector`. + */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description 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?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + }[]; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Enable or disable the public interface of the Load Balancer. + * @example true + */ + public_interface?: boolean; + /** + * Format: int64 + * @description ID of the network the Load Balancer should be attached to on creation. + * @example 123 + */ + network?: number; + /** + * @description Name of network zone. + * @example eu-central + */ + network_zone?: string; + /** + * @description ID or name of Location to create Load Balancer in. + * @example fsn1 + */ + location?: string; + }; + }; + }; + responses: { + /** @description The `load_balancer` key contains the Load Balancer that was just created. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "load_balancer": { + * "id": 4711, + * "name": "Web Frontend", + * "public_net": { + * "enabled": false, + * "ipv4": { + * "ip": "1.2.3.4" + * }, + * "ipv6": { + * "ip": "2001:db8::1" + * } + * }, + * "private_net": [ + * { + * "network": 4711, + * "ip": "10.0.0.2" + * } + * ], + * "location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "load_balancer_type": { + * "id": 1, + * "name": "lb11", + * "description": "LB11", + * "max_connections": 20000, + * "max_services": 5, + * "max_targets": 25, + * "max_assigned_certificates": 10, + * "deprecated": "2016-01-30T23:50:00+00:00", + * "prices": [ + * { + * "location": "fsn1", + * "price_hourly": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * }, + * "price_monthly": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * }, + * "included_traffic": 654321, + * "price_per_tb_traffic": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * } + * } + * ] + * }, + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00", + * "services": [ + * { + * "protocol": "http", + * "listen_port": 443, + * "destination_port": 80, + * "proxyprotocol": false, + * "health_check": { + * "protocol": "http", + * "port": 4711, + * "interval": 15, + * "timeout": 10, + * "retries": 3, + * "http": { + * "domain": "example.com", + * "path": "/", + * "response": "{\"status\": \"ok\"}", + * "status_codes": [ + * "2??,3??" + * ], + * "tls": false + * } + * }, + * "http": { + * "cookie_name": "HCLBSTICKY", + * "cookie_lifetime": 300, + * "certificates": [ + * 897 + * ], + * "redirect_http": true, + * "sticky_sessions": true + * } + * } + * ], + * "targets": [ + * { + * "type": "server", + * "server": { + * "id": 80 + * }, + * "health_status": [ + * { + * "listen_port": 443, + * "status": "healthy" + * } + * ], + * "use_private_ip": true, + * "targets": [ + * { + * "type": "server", + * "server": { + * "id": 80 + * }, + * "health_status": [ + * { + * "listen_port": 443, + * "status": "healthy" + * } + * ], + * "use_private_ip": true + * } + * ] + * } + * ], + * "algorithm": { + * "type": "round_robin" + * }, + * "outgoing_traffic": 123456, + * "ingoing_traffic": 123456, + * "included_traffic": 654321 + * }, + * "action": { + * "id": 13, + * "command": "create_load_balancer", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + load_balancer: { + /** + * Format: int64 + * @description ID of the Load Balancer. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** @description Public network information. */ + public_net: { + /** @description Public Interface enabled or not. */ + enabled: boolean; + /** @description IP address (v4). */ + ipv4: { + /** + * @description IP address (v4) of this Load Balancer. + * @example 1.2.3.4 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + /** @description IP address (v6). */ + ipv6: { + /** + * @description IP address (v6) of this Load Balancer. + * @example 2001:db8::1 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description ID of the Network. + * @example 4711 + */ + network?: number; + /** + * @description IP address (v4) of this Load Balancer in this Network. + * @example 10.0.0.2 + */ + ip?: string; + }[]; + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + load_balancer_type: { + /** + * Format: int64 + * @description ID of the Load Balancer type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Load Balancer type. + * @example lb11 + */ + name: string; + /** + * @description Description of the Load Balancer type. + * @example LB11 + */ + description: string; + /** + * Format: int64 + * @description Number of maximum simultaneous open connections. + * @example 20000 + */ + max_connections: number; + /** + * Format: int64 + * @description Number of services a Load Balancer of this type can have. + * @example 5 + */ + max_services: number; + /** + * Format: int64 + * @description Number of targets a single Load Balancer can have. + * @example 25 + */ + max_targets: number; + /** + * Format: int64 + * @description Number of SSL Certificates that can be assigned to a single Load Balancer. + * @example 10 + */ + max_assigned_certificates: number; + /** + * @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format). + * @example 2016-01-30T23:50:00+00:00 + */ + deprecated: string | null; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description List of services that belong to this Load Balancer. */ + services: { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol: boolean; + /** + * LoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @default HCLBSTICKY + * @example HCLBSTICKY + */ + cookie_name: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @default 300 + * @example 300 + */ + cookie_lifetime: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. + * @default false + * @example true + */ + redirect_http: boolean; + /** + * @description Use sticky sessions. Only available if `protocol` is `http` or `https`. + * @default false + * @example true + */ + sticky_sessions: boolean; + }; + }[]; + /** @description List of targets that belong to this Load Balancer. */ + targets: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetLabelSelector + * @description Label selector used to determine targets. Only present for target type "label_selector". + */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description IP target where the traffic should be routed to. 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 present for target type `ip`. + */ + ip?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + /** @description List of resolved label selector target Servers. Only present for type "label_selector". */ + targets?: { + /** + * @description Type of the resource. Here always "server". + * @example server + */ + type?: string; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + }[]; + }[]; + /** @description Algorithm of the Load Balancer. */ + algorithm: { + /** + * @description Type of the algorithm. + * @enum {string} + */ + type: "round_robin" | "least_connections"; + }; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 10000 + */ + included_traffic: number; + }; + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_load_balancers_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_load_balancers_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply has this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_load_balancer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `load_balancer` key contains the Load Balancer. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + load_balancer: { + /** + * Format: int64 + * @description ID of the Load Balancer. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** @description Public network information. */ + public_net: { + /** @description Public Interface enabled or not. */ + enabled: boolean; + /** @description IP address (v4). */ + ipv4: { + /** + * @description IP address (v4) of this Load Balancer. + * @example 1.2.3.4 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + /** @description IP address (v6). */ + ipv6: { + /** + * @description IP address (v6) of this Load Balancer. + * @example 2001:db8::1 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description ID of the Network. + * @example 4711 + */ + network?: number; + /** + * @description IP address (v4) of this Load Balancer in this Network. + * @example 10.0.0.2 + */ + ip?: string; + }[]; + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + load_balancer_type: { + /** + * Format: int64 + * @description ID of the Load Balancer type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Load Balancer type. + * @example lb11 + */ + name: string; + /** + * @description Description of the Load Balancer type. + * @example LB11 + */ + description: string; + /** + * Format: int64 + * @description Number of maximum simultaneous open connections. + * @example 20000 + */ + max_connections: number; + /** + * Format: int64 + * @description Number of services a Load Balancer of this type can have. + * @example 5 + */ + max_services: number; + /** + * Format: int64 + * @description Number of targets a single Load Balancer can have. + * @example 25 + */ + max_targets: number; + /** + * Format: int64 + * @description Number of SSL Certificates that can be assigned to a single Load Balancer. + * @example 10 + */ + max_assigned_certificates: number; + /** + * @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format). + * @example 2016-01-30T23:50:00+00:00 + */ + deprecated: string | null; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description List of services that belong to this Load Balancer. */ + services: { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol: boolean; + /** + * LoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @default HCLBSTICKY + * @example HCLBSTICKY + */ + cookie_name: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @default 300 + * @example 300 + */ + cookie_lifetime: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. + * @default false + * @example true + */ + redirect_http: boolean; + /** + * @description Use sticky sessions. Only available if `protocol` is `http` or `https`. + * @default false + * @example true + */ + sticky_sessions: boolean; + }; + }[]; + /** @description List of targets that belong to this Load Balancer. */ + targets: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetLabelSelector + * @description Label selector used to determine targets. Only present for target type "label_selector". + */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description IP target where the traffic should be routed to. 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 present for target type `ip`. + */ + ip?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + /** @description List of resolved label selector target Servers. Only present for type "label_selector". */ + targets?: { + /** + * @description Type of the resource. Here always "server". + * @example server + */ + type?: string; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + }[]; + }[]; + /** @description Algorithm of the Load Balancer. */ + algorithm: { + /** + * @description Type of the algorithm. + * @enum {string} + */ + type: "round_robin" | "least_connections"; + }; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 10000 + */ + included_traffic: number; + }; + }; + }; + }; + }; + }; + update_load_balancer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New Load Balancer name. + * @example new-name + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `load_balancer` key contains the updated Load Balancer. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "load_balancer": { + * "id": 4711, + * "name": "new-name", + * "public_net": { + * "enabled": false, + * "ipv4": { + * "ip": "1.2.3.4" + * }, + * "ipv6": { + * "ip": "2001:db8::1" + * } + * }, + * "private_net": [ + * { + * "network": 4711, + * "ip": "10.0.0.2" + * } + * ], + * "location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "load_balancer_type": { + * "id": 1, + * "name": "lb11", + * "description": "LB11", + * "max_connections": 20000, + * "max_services": 5, + * "max_targets": 25, + * "max_assigned_certificates": 10, + * "deprecated": "2016-01-30T23:50:00+00:00", + * "prices": [ + * { + * "location": "fsn1", + * "price_hourly": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * }, + * "price_monthly": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * }, + * "included_traffic": 654321, + * "price_per_tb_traffic": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * } + * } + * ] + * }, + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00", + * "services": [ + * { + * "protocol": "http", + * "listen_port": 443, + * "destination_port": 80, + * "proxyprotocol": false, + * "health_check": { + * "protocol": "http", + * "port": 4711, + * "interval": 15, + * "timeout": 10, + * "retries": 3, + * "http": { + * "domain": "example.com", + * "path": "/", + * "response": "{\"status\": \"ok\"}", + * "status_codes": [ + * "2??,3??" + * ], + * "tls": false + * } + * }, + * "http": { + * "cookie_name": "HCLBSTICKY", + * "cookie_lifetime": 300, + * "certificates": [ + * 897 + * ], + * "redirect_http": true, + * "sticky_sessions": true + * } + * } + * ], + * "targets": [ + * { + * "type": "server", + * "server": { + * "id": 80 + * }, + * "health_status": [ + * { + * "listen_port": 443, + * "status": "healthy" + * } + * ], + * "use_private_ip": true, + * "label_selector": { + * "selector": "env=prod" + * }, + * "ip": { + * "ip": "203.0.113.1" + * }, + * "targets": [ + * { + * "type": "server", + * "server": { + * "id": 80 + * }, + * "health_status": [ + * { + * "listen_port": 443, + * "status": "healthy" + * } + * ], + * "use_private_ip": true + * } + * ] + * } + * ], + * "algorithm": { + * "type": "round_robin" + * }, + * "outgoing_traffic": 123456, + * "ingoing_traffic": 123456, + * "included_traffic": 654321 + * } + * } */ + "application/json": { + load_balancer: { + /** + * Format: int64 + * @description ID of the Load Balancer. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** @description Public network information. */ + public_net: { + /** @description Public Interface enabled or not. */ + enabled: boolean; + /** @description IP address (v4). */ + ipv4: { + /** + * @description IP address (v4) of this Load Balancer. + * @example 1.2.3.4 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv4 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + /** @description IP address (v6). */ + ipv6: { + /** + * @description IP address (v6) of this Load Balancer. + * @example 2001:db8::1 + */ + ip?: string | null; + /** + * @description Reverse DNS PTR entry for the IPv6 address of this Load Balancer. + * @example lb1.example.com + */ + dns_ptr?: string | null; + }; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description ID of the Network. + * @example 4711 + */ + network?: number; + /** + * @description IP address (v4) of this Load Balancer in this Network. + * @example 10.0.0.2 + */ + ip?: string; + }[]; + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + load_balancer_type: { + /** + * Format: int64 + * @description ID of the Load Balancer type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Load Balancer type. + * @example lb11 + */ + name: string; + /** + * @description Description of the Load Balancer type. + * @example LB11 + */ + description: string; + /** + * Format: int64 + * @description Number of maximum simultaneous open connections. + * @example 20000 + */ + max_connections: number; + /** + * Format: int64 + * @description Number of services a Load Balancer of this type can have. + * @example 5 + */ + max_services: number; + /** + * Format: int64 + * @description Number of targets a single Load Balancer can have. + * @example 25 + */ + max_targets: number; + /** + * Format: int64 + * @description Number of SSL Certificates that can be assigned to a single Load Balancer. + * @example 10 + */ + max_assigned_certificates: number; + /** + * @description Point in time when the Load Balancer type is deprecated (in ISO-8601 format). + * @example 2016-01-30T23:50:00+00:00 + */ + deprecated: string | null; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description List of services that belong to this Load Balancer. */ + services: { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol: boolean; + /** + * LoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @default HCLBSTICKY + * @example HCLBSTICKY + */ + cookie_name: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @default 300 + * @example 300 + */ + cookie_lifetime: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. + * @default false + * @example true + */ + redirect_http: boolean; + /** + * @description Use sticky sessions. Only available if `protocol` is `http` or `https`. + * @default false + * @example true + */ + sticky_sessions: boolean; + }; + }[]; + /** @description List of targets that belong to this Load Balancer. */ + targets: { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetLabelSelector + * @description Label selector used to determine targets. Only present for target type "label_selector". + */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description IP target where the traffic should be routed to. 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 present for target type `ip`. + */ + ip?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + /** @description List of resolved label selector target Servers. Only present for type "label_selector". */ + targets?: { + /** + * @description Type of the resource. Here always "server". + * @example server + */ + type?: string; + /** + * LoadBalancerTargetServer + * @description Server where the traffic should be routed to. Only present for target type "server". + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * LoadBalancerTargetHealthStatus + * @description List of health statuses of the services on this target. Only present for target types "server" and "ip". + */ + health_status?: { + /** @example 443 */ + listen_port?: number; + /** + * @example healthy + * @enum {string} + */ + status?: "healthy" | "unhealthy" | "unknown"; + }[]; + /** + * LoadBalancerTargetUsePrivateIP + * @description Use the private network IP instead of the public IP. Only present for target types "server" and "label_selector". + * @default false + */ + use_private_ip: boolean; + }[]; + }[]; + /** @description Algorithm of the Load Balancer. */ + algorithm: { + /** + * @description Type of the algorithm. + * @enum {string} + */ + type: "round_robin" | "least_connections"; + }; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 10000 + */ + included_traffic: number; + }; + }; + }; + }; + }; + }; + delete_load_balancer: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Load Balancer deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_load_balancer_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "add_service", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + add_load_balancer_service: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol: boolean; + /** + * LoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes?: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @default HCLBSTICKY + * @example HCLBSTICKY + */ + cookie_name?: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @default 300 + * @example 300 + */ + cookie_lifetime?: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is `http`. + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if `protocol` is `https`. + * @default false + * @example true + */ + redirect_http?: boolean; + /** + * @description Use sticky sessions. Only available if `protocol` is `http` or `https`. + * @default false + * @example true + */ + sticky_sessions?: boolean; + }; + }; + }; + }; + responses: { + /** @description The `action` key contains the `add_service` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "add_service", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + add_load_balancer_target: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** + * LoadBalancerTargetServer + * @description Configuration for type Server, only valid and required if type is `server`. + */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** + * @description 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. + * @default false + * @example true + */ + use_private_ip?: boolean; + /** + * LoadBalancerTargetLabelSelector + * @description Configuration for label selector targets, only valid and required if type is `label_selector`. + */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description 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?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + }; + }; + }; + responses: { + /** @description The `action` key contains the `add_target` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "add_target", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + attach_load_balancer_to_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of an existing network to attach the Load Balancer to. + * @example 4711 + */ + network: number; + /** + * @description 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. + * @example 10.0.1.1 + */ + ip?: string; + }; + }; + }; + responses: { + /** @description The `action` key contains the `attach_to_network` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "attach_to_network", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_load_balancer_algorithm: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Algorithm of the Load Balancer. + * @enum {string} + */ + type: "round_robin" | "least_connections"; + }; + }; + }; + responses: { + /** @description The `action` key contains the `change_algorithm` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_algorithm", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_load_balancer_dns_ptr: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + /** @description Select the IP address for which to change the DNS entry by passing `ip`. It can be either IPv4 or IPv6. The target hostname is set by passing `dns_ptr`. */ + requestBody?: { + content: { + "application/json": { + /** + * @description Public IP address for which the reverse DNS entry should be set. + * @example 1.2.3.4 + */ + ip: string; + /** + * @description Hostname to set as a reverse DNS PTR entry. + * @example lb1.example.com + */ + dns_ptr: string | null; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_dns_ptr", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_load_balancer_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description If true, prevents the Load Balancer from being deleted. + * @example true + */ + delete?: boolean; + }; + }; + }; + responses: { + /** @description The `action` key contains the `change_protection` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_load_balancer_type: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description ID or name of Load Balancer type the Load Balancer should migrate to. + * @example lb21 + */ + load_balancer_type: string; + }; + }; + }; + responses: { + /** @description The `action` key contains the `change_load_balancer_type` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_load_balancer_type", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + delete_load_balancer_service: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The listen port of the service you want to delete. + * @example 443 + */ + listen_port: number; + }; + }; + }; + responses: { + /** @description The `action` key contains the `delete_service` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "delete_service", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + detach_load_balancer_from_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of an existing network to detach the Load Balancer from. + * @example 4711 + */ + network: number; + }; + }; + }; + responses: { + /** @description The `action` key contains the `detach_from_network` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "detach_from_network", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + disable_load_balancer_public_interface: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the `disable_public_interface` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "disable_public_interface", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + enable_load_balancer_public_interface: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the `enable_public_interface` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "enable_public_interface", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + remove_load_balancer_target: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Type of the resource. + * @enum {string} + */ + type: "server" | "label_selector" | "ip"; + /** @description Configuration for type Server, required if type is `server`. */ + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 80 + */ + id: number; + }; + /** @description Configuration for label selector targets, required if type is `label_selector`. */ + label_selector?: { + /** + * @description Label selector. + * @example env=prod + */ + selector: string; + }; + /** + * LoadBalancerTargetIP + * @description IP target where the traffic should be routed to. 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 present for target type `ip`. + */ + ip?: { + /** + * @description IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a subnet type vswitch. + * @example 203.0.113.1 + */ + ip: string; + }; + }; + }; + }; + responses: { + /** @description The `action` key contains the `remove_target` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "remove_target", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + update_load_balancer_service: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Protocol of the Load Balancer. + * @example https + * @enum {string} + */ + protocol?: "tcp" | "http" | "https"; + /** + * @description Port the Load Balancer listens on. + * @example 443 + */ + listen_port: number; + /** + * @description Port the Load Balancer will balance to. + * @example 80 + */ + destination_port?: number; + /** + * @description Is Proxyprotocol enabled or not. + * @example false + */ + proxyprotocol?: boolean; + /** + * UpdateLoadBalancerServiceHealthCheck + * @description Service health check. + */ + health_check?: { + /** + * @description Type of the health check. + * @example http + * @enum {string} + */ + protocol?: "tcp" | "http"; + /** + * @description Port the health check will be performed on. + * @example 4711 + */ + port?: number; + /** + * @description Time interval in seconds health checks are performed. + * @example 15 + */ + interval?: number; + /** + * @description Time in seconds after an attempt is considered a timeout. + * @example 10 + */ + timeout?: number; + /** + * @description Unsuccessful retries needed until a target is considered unhealthy; an unhealthy target needs the same number of successful retries to become healthy again. + * @example 3 + */ + retries?: number; + /** @description Additional configuration for protocol http. */ + http?: { + /** + * @description 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. + * @example example.com + */ + domain?: string | null; + /** + * @description HTTP path to use for health checks. May not contain literal spaces, use percent-encoding instead. + * @example / + */ + path?: string; + /** + * @description String that must be contained in HTTP response in order to pass the health check. + * @example {"status": "ok"} + */ + response?: string; + /** + * @description List of returned HTTP status codes in order to pass the health check. Supports the wildcards `?` for exactly one character and `*` for multiple ones. + * @default [ + * "2??", + * "3??" + * ] + * @example [ + * "2??", + * "3??" + * ] + */ + status_codes?: string[]; + /** + * @description Use HTTPS for health check. + * @example false + */ + tls?: boolean; + }; + }; + /** + * LoadBalancerServiceHTTP + * @description Configuration option for protocols http and https. + */ + http?: { + /** + * @description Name of the cookie used for sticky sessions. + * @example HCLBSTICKY + */ + cookie_name?: string; + /** + * @description Lifetime of the cookie used for sticky sessions (in seconds). + * @example 300 + */ + cookie_lifetime?: number; + /** + * @description IDs of the Certificates to use for TLS/SSL termination by the Load Balancer; empty for TLS/SSL passthrough or if `protocol` is "http". + * @example [ + * 897 + * ] + */ + certificates?: number[]; + /** + * @description Redirect HTTP requests to HTTPS. Only available if protocol is "https". + * @default false + * @example true + */ + redirect_http?: boolean; + /** + * @description Use sticky sessions. Only available if protocol is "http" or "https". + * @default false + * @example true + */ + sticky_sessions?: boolean; + }; + }; + }; + }; + responses: { + /** @description The `action` key contains the `update_service` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "update_service", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_load_balancer_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the Load Balancer Action. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "load_balancer" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_load_balancer_metrics: { + parameters: { + query: { + /** @description Type of metrics to get. */ + type: "open_connections" | "connections_per_second" | "requests_per_second" | "bandwidth"; + /** @description Start of period to get Metrics for (in ISO-8601 format). */ + start: string; + /** @description End of period to get Metrics for (in ISO-8601 format). */ + end: string; + /** @description Resolution of results in seconds. */ + step?: string; + }; + header?: never; + path: { + /** @description ID of the Load Balancer. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `metrics` key in the reply contains a metrics object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + metrics: { + /** + * @description Start of period of metrics reported (in ISO-8601 format). + * @example 2017-01-01T00:00:00+00:00 + */ + start: string; + /** + * @description End of period of metrics reported (in ISO-8601 format). + * @example 2017-01-01T23:00:00+00:00 + */ + end: string; + /** + * @description Resolution of results in seconds. + * @example 60 + */ + step: number; + /** + * @description Hash with timeseries information, containing the name of timeseries as key. + * @example { + * "name_of_timeseries": { + * "values": [ + * [ + * 1435781470.622, + * "42" + * ], + * [ + * 1435781471.622, + * "43" + * ] + * ] + * } + * } + */ + time_series: { + [key: string]: { + /** @description Metrics Timestamps with values. */ + values: (number | string)[][]; + }; + }; + }; + }; + }; + }; + }; + }; + list_locations: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response with the [Locations](#locations). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @description List of [Locations](#locations). */ + locations: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_location: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Location. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response with the [Location](#locations). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + }; + }; + }; + }; + }; + list_networks: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Networks](#networks). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + networks: { + /** + * Format: int64 + * @description ID of the [Network](#networks). + * @example 4711 + */ + id: number; + /** + * @description Name of the [Network](#networks). + * @example mynet + */ + name: string; + /** + * @description IP range of the [Network](#networks). + * + * Uses CIDR notation. + * + * @example 10.0.0.0/16 + */ + ip_range: string; + /** @description List of subnets allocated in this [Network](#networks). */ + subnets: { + /** + * @description Type of subnet. + * + * - `cloud` - Used to connect cloud [Servers](#servers) and [Load Balancers](#load-balancers). + * - `server` - Same as the `cloud` type. **Deprecated**, use the `cloud` type instead. + * - `vswitch` - Used to [connect cloud Servers and Load Balancers with dedicated Servers](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch). + * + * @enum {string} + */ + type: "cloud" | "server" | "vswitch"; + /** + * @description IP range of the subnet. + * + * Uses CIDR notation. + * + * @example 10.0.1.0/24 + */ + ip_range?: string; + /** + * @description Name of the [Network Zone](#network-zones). + * + * The [Location](#locations) contains the `network_zone` property it belongs to. + * + * @example eu-central + */ + network_zone: string; + /** + * @description Gateway for [Servers](#servers) attached to this subnet. + * + * For subnets of type `server` this is always the first IP of the subnets IP range. + * + * @example 10.0.0.1 + */ + gateway: string; + /** + * Format: int64 + * @description ID of the robot vSwitch if the subnet is of type `vswitch`. + * @example 1000 + */ + vswitch_id?: number | null; + }[]; + /** @description Array of routes set in this [Network](#networks). */ + routes: { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }[]; + /** + * @description Array of IDs of [Servers](#servers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + servers: number[]; + /** + * @description Array of IDs of [Load Balancers](#load-balancers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + load_balancers?: number[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Indicates if the routes from this [Network](#networks) should be exposed to the vSwitch connection. + * @example false + */ + expose_routes_to_vswitch: boolean; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_network: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the [Network](#networks). + * @example mynet + */ + name: string; + /** + * @description IP range of the [Network](#networks). + * + * Uses CIDR notation. + * + * Must span all included subnets. Must be one of the private IPv4 ranges of RFC1918. + * + * Minimum network size is /24. We highly recommend that you pick a larger [Network](#networks) with a /16 netmask. + * + * @example 10.0.0.0/16 + */ + ip_range: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** @description Array of subnets to allocate. */ + subnets?: { + /** + * @description Type of subnet. + * + * - `cloud` - Used to connect cloud [Servers](#servers) and [Load Balancers](#load-balancers). + * - `server` - Same as the `cloud` type. **Deprecated**, use the `cloud` type instead. + * - `vswitch` - Used to [connect cloud Servers and Load Balancers with dedicated Servers](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch). + * + * @enum {string} + */ + type: "cloud" | "server" | "vswitch"; + /** + * @description IP range of the subnet. + * + * Uses CIDR notation. + * + * Must be a subnet of the parent [Networks](#networks) `ip_range`. + * + * Must not overlap with any other subnets or with any destinations in routes. + * + * Minimum network size is /30. We highly recommend that you pick a larger subnet with a /24 netmask. + * + * @example 10.0.1.0/24 + */ + ip_range?: string; + /** + * @description Name of the [Network Zone](#network-zones). + * + * The [Location](#locations) contains the `network_zone` property it belongs to. + * + * @example eu-central + */ + network_zone: string; + /** + * Format: int64 + * @description ID of the robot vSwitch. + * + * Must only be supplied for subnets of type `vswitch`. + * + * @example 1000 + */ + vswitch_id?: number; + }[]; + /** @description Array of routes set in this [Network](#networks). */ + routes?: { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }[]; + /** + * @description Toggle to expose routes to the [Networks](#networks) vSwitch. + * + * Indicates if the routes from this [Network](#networks) should be exposed to the vSwitch in this [Network](#networks). Only takes effect if a [vSwitch is setup](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch) in this [Network](#networks). + * + * @example false + */ + expose_routes_to_vswitch?: boolean; + }; + }; + }; + responses: { + /** @description Response for creating a [Network](#networks). + * + * Contains the newly created [Network](#networks). + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + network?: { + /** + * Format: int64 + * @description ID of the [Network](#networks). + * @example 4711 + */ + id: number; + /** + * @description Name of the [Network](#networks). + * @example mynet + */ + name: string; + /** + * @description IP range of the [Network](#networks). + * + * Uses CIDR notation. + * + * @example 10.0.0.0/16 + */ + ip_range: string; + /** @description List of subnets allocated in this [Network](#networks). */ + subnets: { + /** + * @description Type of subnet. + * + * - `cloud` - Used to connect cloud [Servers](#servers) and [Load Balancers](#load-balancers). + * - `server` - Same as the `cloud` type. **Deprecated**, use the `cloud` type instead. + * - `vswitch` - Used to [connect cloud Servers and Load Balancers with dedicated Servers](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch). + * + * @enum {string} + */ + type: "cloud" | "server" | "vswitch"; + /** + * @description IP range of the subnet. + * + * Uses CIDR notation. + * + * @example 10.0.1.0/24 + */ + ip_range?: string; + /** + * @description Name of the [Network Zone](#network-zones). + * + * The [Location](#locations) contains the `network_zone` property it belongs to. + * + * @example eu-central + */ + network_zone: string; + /** + * @description Gateway for [Servers](#servers) attached to this subnet. + * + * For subnets of type `server` this is always the first IP of the subnets IP range. + * + * @example 10.0.0.1 + */ + gateway: string; + /** + * Format: int64 + * @description ID of the robot vSwitch if the subnet is of type `vswitch`. + * @example 1000 + */ + vswitch_id?: number | null; + }[]; + /** @description Array of routes set in this [Network](#networks). */ + routes: { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }[]; + /** + * @description Array of IDs of [Servers](#servers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + servers: number[]; + /** + * @description Array of IDs of [Load Balancers](#load-balancers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + load_balancers?: number[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Indicates if the routes from this [Network](#networks) should be exposed to the vSwitch connection. + * @example false + */ + expose_routes_to_vswitch: boolean; + }; + }; + }; + }; + }; + }; + list_networks_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_networks_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting a single [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `network` key contains the network. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + network?: { + /** + * Format: int64 + * @description ID of the [Network](#networks). + * @example 4711 + */ + id: number; + /** + * @description Name of the [Network](#networks). + * @example mynet + */ + name: string; + /** + * @description IP range of the [Network](#networks). + * + * Uses CIDR notation. + * + * @example 10.0.0.0/16 + */ + ip_range: string; + /** @description List of subnets allocated in this [Network](#networks). */ + subnets: { + /** + * @description Type of subnet. + * + * - `cloud` - Used to connect cloud [Servers](#servers) and [Load Balancers](#load-balancers). + * - `server` - Same as the `cloud` type. **Deprecated**, use the `cloud` type instead. + * - `vswitch` - Used to [connect cloud Servers and Load Balancers with dedicated Servers](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch). + * + * @enum {string} + */ + type: "cloud" | "server" | "vswitch"; + /** + * @description IP range of the subnet. + * + * Uses CIDR notation. + * + * @example 10.0.1.0/24 + */ + ip_range?: string; + /** + * @description Name of the [Network Zone](#network-zones). + * + * The [Location](#locations) contains the `network_zone` property it belongs to. + * + * @example eu-central + */ + network_zone: string; + /** + * @description Gateway for [Servers](#servers) attached to this subnet. + * + * For subnets of type `server` this is always the first IP of the subnets IP range. + * + * @example 10.0.0.1 + */ + gateway: string; + /** + * Format: int64 + * @description ID of the robot vSwitch if the subnet is of type `vswitch`. + * @example 1000 + */ + vswitch_id?: number | null; + }[]; + /** @description Array of routes set in this [Network](#networks). */ + routes: { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }[]; + /** + * @description Array of IDs of [Servers](#servers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + servers: number[]; + /** + * @description Array of IDs of [Load Balancers](#load-balancers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + load_balancers?: number[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Indicates if the routes from this [Network](#networks) should be exposed to the vSwitch connection. + * @example false + */ + expose_routes_to_vswitch: boolean; + }; + }; + }; + }; + }; + }; + update_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New [Network](#networks) name. + * @example new-name + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Toggle to expose routes to the [Networks](#networks) vSwitch. + * + * Indicates if the routes from this [Network](#networks) should be exposed to the vSwitch in this [Network](#networks). Only takes effect if a [vSwitch is setup](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch) in this [Network](#networks). + * + * @example false + */ + expose_routes_to_vswitch?: boolean; + }; + }; + }; + responses: { + /** @description Response for updating a [Network](#networks). + * + * Contains the updated [Network](#networks). + * */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "network": { + * "id": 4711, + * "name": "new-name", + * "ip_range": "10.0.0.0/16", + * "subnets": [ + * { + * "type": "cloud", + * "ip_range": "10.0.1.0/24", + * "network_zone": "eu-central", + * "gateway": "10.0.0.1" + * } + * ], + * "routes": [ + * { + * "destination": "10.100.1.0/24", + * "gateway": "10.0.1.1" + * } + * ], + * "servers": [ + * 42 + * ], + * "load_balancers": [ + * 42 + * ], + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00", + * "expose_routes_to_vswitch": true + * } + * } */ + "application/json": { + network?: { + /** + * Format: int64 + * @description ID of the [Network](#networks). + * @example 4711 + */ + id: number; + /** + * @description Name of the [Network](#networks). + * @example mynet + */ + name: string; + /** + * @description IP range of the [Network](#networks). + * + * Uses CIDR notation. + * + * @example 10.0.0.0/16 + */ + ip_range: string; + /** @description List of subnets allocated in this [Network](#networks). */ + subnets: { + /** + * @description Type of subnet. + * + * - `cloud` - Used to connect cloud [Servers](#servers) and [Load Balancers](#load-balancers). + * - `server` - Same as the `cloud` type. **Deprecated**, use the `cloud` type instead. + * - `vswitch` - Used to [connect cloud Servers and Load Balancers with dedicated Servers](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch). + * + * @enum {string} + */ + type: "cloud" | "server" | "vswitch"; + /** + * @description IP range of the subnet. + * + * Uses CIDR notation. + * + * @example 10.0.1.0/24 + */ + ip_range?: string; + /** + * @description Name of the [Network Zone](#network-zones). + * + * The [Location](#locations) contains the `network_zone` property it belongs to. + * + * @example eu-central + */ + network_zone: string; + /** + * @description Gateway for [Servers](#servers) attached to this subnet. + * + * For subnets of type `server` this is always the first IP of the subnets IP range. + * + * @example 10.0.0.1 + */ + gateway: string; + /** + * Format: int64 + * @description ID of the robot vSwitch if the subnet is of type `vswitch`. + * @example 1000 + */ + vswitch_id?: number | null; + }[]; + /** @description Array of routes set in this [Network](#networks). */ + routes: { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }[]; + /** + * @description Array of IDs of [Servers](#servers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + servers: number[]; + /** + * @description Array of IDs of [Load Balancers](#load-balancers) attached to this [Network](#networks). + * @example [ + * 42 + * ] + */ + load_balancers?: number[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Indicates if the routes from this [Network](#networks) should be exposed to the vSwitch connection. + * @example false + */ + expose_routes_to_vswitch: boolean; + }; + }; + }; + }; + }; + }; + delete_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for deleting a [Network](#networks). */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_network_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "add_subnet", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + add_network_route: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }; + }; + }; + responses: { + /** @description Response for adding a route to a [Network](#networks). + * + * The `action` key contains an [Action](#actions) with command `add_route`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "add_route", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + add_network_subnet: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Type of subnet. + * + * - `cloud` - Used to connect cloud [Servers](#servers) and [Load Balancers](#load-balancers). + * - `server` - Same as the `cloud` type. **Deprecated**, use the `cloud` type instead. + * - `vswitch` - Used to [connect cloud Servers and Load Balancers with dedicated Servers](https://docs.hetzner.com/cloud/networks/connect-dedi-vswitch). + * + * @enum {string} + */ + type: "cloud" | "server" | "vswitch"; + /** + * @description IP range of the subnet. + * + * Uses CIDR notation. + * + * Must be a subnet of the parent [Networks](#networks) `ip_range`. + * + * Must not overlap with any other subnets or with any destinations in routes. + * + * Minimum network size is /30. We highly recommend that you pick a larger subnet with a /24 netmask. + * + * @example 10.0.1.0/24 + */ + ip_range?: string; + /** + * @description Name of the [Network Zone](#network-zones). + * + * The [Location](#locations) contains the `network_zone` it belongs to. + * + * @example eu-central + */ + network_zone: string; + /** + * Format: int64 + * @description ID of the robot vSwitch. + * + * Must be supplied if the subnet is of type `vswitch`. + * + * @example 1000 + */ + vswitch_id?: number; + }; + }; + }; + responses: { + /** @description Response for adding a subnet to a [Network](#networks). + * + * The `action` key contains an [Action](#actions) with command `add_subnet`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "add_subnet", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_network_ip_range: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description IP range of the [Network](#networks). + * + * Uses CIDR notation. + * + * Must span all included subnets. Must be one of the private IPv4 ranges of RFC1918. + * + * Minimum network size is /24. We highly recommend that you pick a larger [Network](#networks) with a /16 netmask. + * + * @example 10.0.0.0/16 + */ + ip_range: string; + }; + }; + }; + responses: { + /** @description Response for changing the [Networks](#networks) IP range. + * + * The `action` key contains an [Action](#actions) with command `change_ip_range`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_ip_range", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_network_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Delete protection setting. + * + * If true, prevents the [Network](#networks) from being deleted. + * + * @example true + */ + delete?: boolean; + }; + }; + }; + responses: { + /** @description Response for changing the [Networks](#networks) protection. + * + * The `action` key contains an [Action](#actions) with command `change_protection`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + delete_network_route: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Destination network or host of the route. + * + * Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. + * + * Must be one of + * * private IPv4 ranges of RFC1918 + * * or `0.0.0.0/0`. + * + * Must not overlap with + * * an existing ip_range in any subnets + * * or with any destinations in other routes + * * or with `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.100.1.0/24 + */ + destination: string; + /** + * @description Gateway of the route. + * + * Packages addressed for the specified destination will be send to this IP address. + * + * Cannot be + * * the first IP of the networks ip_range, + * * an IP behind a vSwitch or + * * `172.31.1.1`. + * + * `172.31.1.1` is being used as a gateway for the public network interface of [Servers](#servers). + * + * @example 10.0.1.1 + */ + gateway: string; + }; + }; + }; + responses: { + /** @description Response for deleting a route from a [Network](#networks). + * + * The `action` key contains an [Action](#actions) with command `delete_route`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "delete_route", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + delete_network_subnet: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description IP range in CIDR block notation of the subnet to delete. + * @example 10.0.1.0/24 + */ + ip_range: string; + }; + }; + }; + responses: { + /** @description Response for deleting a subnet from a [Network](#networks). + * + * The `action` key contains an [Action](#actions) with command `delete_subnet`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "delete_subnet", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_network_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Network. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting an [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "add_subnet", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_placement_groups: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Filter resources by type. Can be used multiple times. The response will only + * contain the resources with the specified type. + * */ + type?: "spread"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `placement_groups` key contains an array of Placement Group objects. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "placement_groups": [ + * { + * "id": 897, + * "name": "my Placement Group", + * "labels": { + * "key": "value" + * }, + * "type": "spread", + * "created": "2019-01-08T12:10:00+00:00", + * "servers": [ + * 4711, + * 4712 + * ] + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + placement_groups: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_placement_group: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "name": "my Placement Group", + * "type": "spread" + * } */ + "application/json": { + /** + * @description Name of the Placement Group. + * @example my Placement Group + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Define the Placement Group Type. + * @example spread + * @enum {string} + */ + type: "spread"; + }; + }; + }; + responses: { + /** @description The `PlacementGroup` key contains the Placement Group that was just created. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "placement_group": { + * "id": 897, + * "name": "my Placement Group", + * "labels": { + * "key": "value" + * }, + * "type": "spread", + * "created": "2019-01-08T12:10:00+00:00", + * "servers": [] + * } + * } */ + "application/json": { + /** PlacementGroup */ + placement_group: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + }; + /** ActionNullable */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + } | null; + }; + }; + }; + }; + }; + get_placement_group: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Placement Group. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `placement_group` key contains a Placement Group object. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "placement_group": { + * "id": 897, + * "name": "my Placement Group", + * "labels": { + * "key": "value" + * }, + * "type": "spread", + * "created": "2019-01-08T12:10:00+00:00", + * "servers": [ + * 4711, + * 4712 + * ] + * } + * } */ + "application/json": { + /** PlacementGroup */ + placement_group: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + }; + }; + }; + }; + }; + }; + update_placement_group: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Placement Group. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New Placement Group name. + * @example my Placement Group + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `certificate` key contains the Placement Group that was just updated. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "placement_group": { + * "id": 897, + * "name": "my Placement Group", + * "labels": { + * "key": "value" + * }, + * "type": "spread", + * "created": "2019-01-08T12:10:00+00:00", + * "servers": [ + * 4711, + * 4712 + * ] + * } + * } */ + "application/json": { + /** PlacementGroup */ + placement_group: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + }; + }; + }; + }; + }; + }; + delete_placement_group: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Placement Group. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Placement Group deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + get_pricing: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `pricing` key in the reply contains an pricing object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + pricing: { + /** + * @description Currency the returned prices are expressed in, coded according to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). + * @example EUR + */ + currency: string; + /** + * Format: decimal + * @description VAT rate used for calculating prices with VAT. + * @example 19.00 + */ + vat_rate: string; + /** @description Price of [Primary IPs](#primary-ips) per type and per [Location](#locations). */ + primary_ips: { + /** + * @description Type of [Primary IP](#primary-ips) the price is for. + * @example ipv4 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** @description Price of the [Primary IP](#primary-ips) type per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }[]; + /** @description Price of [Floating IPs](#floating-ips) per type and per [Location](#locations). */ + floating_ips: { + /** + * @description Type of [Floating IP](#floating-ips) the price is for. + * @example ipv4 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** @description Price of the [Floating IP](#floating-ips) type per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }[]; + /** @description Price of [Images](#images). */ + image: { + /** @description Price of [Images](#images) per GB/month. */ + price_per_gb_month: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }; + /** @description Price of [Volumes](#volumes). */ + volume: { + /** @description Price of [Volumes](#volumes) per GB/month. */ + price_per_gb_month: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }; + /** @description Price of [Server](#servers) backups. */ + server_backup: { + /** + * Format: decimal + * @description Price increase of the [Server](#servers) base price in percentage. + * @example 20.00 + */ + percentage: string; + }; + /** @description Price of Server per [type](#server-types) and per [Location](#locations). */ + server_types: { + /** + * Format: int64 + * @description ID of the [Server Types](#server-types) the price is for. + * @example 104 + */ + id: number; + /** + * @description Name of the [Server Types](#server-types) the price is for. + * @example cpx11 + */ + name: string; + /** @description Price of the [Server Types](#server-types) per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }[]; + /** @description Price of Load Balancer per [type](#load-balancer-types) and per [Location](#locations). */ + load_balancer_types: { + /** + * Format: int64 + * @description ID of the [Load Balancer Types](#load-balancer-types) the price is for. + * @example 1 + */ + id: number; + /** + * @description Name of the [Load Balancer Types](#load-balancer-types) the price is for. + * @example lb11 + */ + name: string; + /** @description Price of the [Load Balancer Types](#load-balancer-types) per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + }[]; + /** + * @deprecated + * @description Price of [Floating IPs](#floating-ips). + * + * **Deprecated**: This field is deprecated, please refer to the `floating_ips` field instead. + * + * See the [Changelog](https://docs.hetzner.cloud/changelog#2024-08-29-field-floating_ip-in-pricing-response-is-now-deprecated) for more details. + * + */ + floating_ip: { + /** @description Price of one [Floating IP](#floating-ips) per month. */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }; + }; + }; + }; + }; + }; + }; + list_primary_ips: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** + * @description Filter results by IP address. + * @example 127.0.0.1 + */ + ip?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "created" | "created:asc" | "created:desc"; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Primary IPs](#primary-ips). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + primary_ips: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Blocked state of the [Primary IP](#primary-ips). + * @example false + */ + blocked: boolean; + /** @description [Datacenter](#datacenters) the [Primary IP](#primary-ips) is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** @description List of reverse DNS records. */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description [Primary IP](#primary-ips) type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * @description Auto deletion state. + * + * If enabled the [Primary IP](#primary-ips) will be deleted once the assigned resource gets deleted. + * + * @default false + * @example true + */ + auto_delete: boolean; + /** + * @description Type of resource the [Primary IP](#primary-ips) can get assigned to. + * + * @example server + * @enum {string} + */ + assignee_type: "server"; + /** + * Format: int64 + * @description ID of resource the [Primary IP](#primary-ips) is assigned to. + * + * `null` if the [Primary IP](#primary-ips) is not assigned. + * + * @example 17 + */ + assignee_id: number | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_primary_ip: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Request Body for creating a new [Primary IP](#primary-ips). + * + * The `datacenter` and `assignee_id`/`assignee_type` attributes are mutually exclusive. + * */ + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description [Primary IP](#primary-ips) type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * @description [Datacenter](#datacenters) ID or name. + * + * The [Primary IP](#primary-ips) will be bound to this [Datacenter](#datacenters). Omit if `assignee_id`/`assignee_type` is provided. + * + * @example fsn1-dc8 + */ + datacenter?: string; + /** + * @description Type of resource the [Primary IP](#primary-ips) can get assigned to. + * + * Currently [Primary IPs](#primary-ips) can only be assigned to [Servers](#servers), + * therefore this field must be set to `server`. + * + * @example server + * @enum {string} + */ + assignee_type: "server"; + /** + * Format: int64 + * @description ID of resource to assign the [Primary IP](#primary-ips) to. + * + * Omitted if the [Primary IP](#primary-ips) should not get assigned. + * + * @example 17 + */ + assignee_id?: number | null; + /** + * @description Auto deletion state. + * + * If enabled the [Primary IP](#primary-ips) will be deleted once the assigned resource gets deleted. + * + * @default false + * @example false + */ + auto_delete?: boolean; + }; + }; + }; + responses: { + /** @description Response for creating a [Primary IP](#primary-ips). + * + * Contains the newly created [Primary IP](#primary-ips). + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "primary_ip": { + * "id": 42, + * "name": "my-ip", + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00", + * "blocked": false, + * "datacenter": { + * "id": 42, + * "name": "fsn1-dc8", + * "description": "Falkenstein DC Park 8", + * "location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "server_types": { + * "supported": [ + * 1, + * 2, + * 3 + * ], + * "available": [ + * 1, + * 2, + * 3 + * ], + * "available_for_migration": [ + * 1, + * 2, + * 3 + * ] + * } + * }, + * "ip": "2001:db8::/64", + * "dns_ptr": [ + * { + * "ip": "2001:db8::1", + * "dns_ptr": "server.example.com" + * } + * ], + * "protection": { + * "delete": false + * }, + * "type": "ipv6", + * "auto_delete": true, + * "assignee_type": "server", + * "assignee_id": 17 + * }, + * "action": { + * "id": 13, + * "command": "create_primary_ip", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 17, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** PrimaryIP */ + primary_ip: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Blocked state of the [Primary IP](#primary-ips). + * @example false + */ + blocked: boolean; + /** @description [Datacenter](#datacenters) the [Primary IP](#primary-ips) is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** @description List of reverse DNS records. */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description [Primary IP](#primary-ips) type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * @description Auto deletion state. + * + * If enabled the [Primary IP](#primary-ips) will be deleted once the assigned resource gets deleted. + * + * @default false + * @example true + */ + auto_delete: boolean; + /** + * @description Type of resource the [Primary IP](#primary-ips) can get assigned to. + * + * @example server + * @enum {string} + */ + assignee_type: "server"; + /** + * Format: int64 + * @description ID of resource the [Primary IP](#primary-ips) is assigned to. + * + * `null` if the [Primary IP](#primary-ips) is not assigned. + * + * @example 17 + */ + assignee_id: number | null; + }; + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_primary_ips_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for listing [Actions](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_primary_ips_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for getting a single [Action](#actions). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_primary_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `primary_ip` key contains the [Primary IP](#primary-ips). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** PrimaryIP */ + primary_ip: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Blocked state of the [Primary IP](#primary-ips). + * @example false + */ + blocked: boolean; + /** @description [Datacenter](#datacenters) the [Primary IP](#primary-ips) is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** @description List of reverse DNS records. */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description [Primary IP](#primary-ips) type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * @description Auto deletion state. + * + * If enabled the [Primary IP](#primary-ips) will be deleted once the assigned resource gets deleted. + * + * @default false + * @example true + */ + auto_delete: boolean; + /** + * @description Type of resource the [Primary IP](#primary-ips) can get assigned to. + * + * @example server + * @enum {string} + */ + assignee_type: "server"; + /** + * Format: int64 + * @description ID of resource the [Primary IP](#primary-ips) is assigned to. + * + * `null` if the [Primary IP](#primary-ips) is not assigned. + * + * @example 17 + */ + assignee_id: number | null; + }; + }; + }; + }; + }; + }; + update_primary_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Auto deletion state. + * + * If enabled the [Primary IP](#primary-ips) will be deleted once the assigned resource gets deleted. + * + * @default false + * @example true + */ + auto_delete?: boolean; + }; + }; + }; + responses: { + /** @description The `primary_ip` key contains the updated [Primary IP](#primary-ips). */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** PrimaryIP */ + primary_ip: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Blocked state of the [Primary IP](#primary-ips). + * @example false + */ + blocked: boolean; + /** @description [Datacenter](#datacenters) the [Primary IP](#primary-ips) is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** + * @description IP address. + * @example 2001:db8::/64 + */ + ip: string; + /** @description List of reverse DNS records. */ + dns_ptr: { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }[]; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description [Primary IP](#primary-ips) type. + * @example ipv6 + * @enum {string} + */ + type: "ipv4" | "ipv6"; + /** + * @description Auto deletion state. + * + * If enabled the [Primary IP](#primary-ips) will be deleted once the assigned resource gets deleted. + * + * @default false + * @example true + */ + auto_delete: boolean; + /** + * @description Type of resource the [Primary IP](#primary-ips) can get assigned to. + * + * @example server + * @enum {string} + */ + assignee_type: "server"; + /** + * Format: int64 + * @description ID of resource the [Primary IP](#primary-ips) is assigned to. + * + * `null` if the [Primary IP](#primary-ips) is not assigned. + * + * @example 17 + */ + assignee_id: number | null; + }; + }; + }; + }; + }; + }; + delete_primary_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description [Primary IP](#primary-ips) deletion succeeded. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + assign_primary_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Type of resource assigning the Primary IP to. + * @example server + * @enum {string} + */ + assignee_type: "server"; + /** + * Format: int64 + * @description ID of a resource of type `assignee_type`. + * @example 4711 + */ + assignee_id: number; + }; + }; + }; + responses: { + /** @description Response for assigning a [Primary IP](#primary-ips). + * + * Contains an [Action](#actions) of type `assign_primary_ip`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "assign_primary_ip", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "primary_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_primary_ip_dns_ptr: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + /** @description The `ip` attributes specifies for which IP address the record is set. For IPv4 addresses this must be the exact address of the [Primary IP](#primary-ips). For IPv6 addresses this must be a single address within the `/64` subnet of the [Primary IP](#primary-ips). + * + * The `dns_ptr` attribute specifies the hostname used for the IP address. + * + * For IPv6 [Floating IPs](#floating-ips) up to 100 entries can be created. + * */ + requestBody?: { + content: { + "application/json": { + /** + * @description Single IPv4 or IPv6 address to create pointer for. + * + * @example 2001:db8::1 + */ + ip: string; + /** + * @description Domain Name to point to. + * + * PTR record content used for reverse DNS. + * + * @example server.example.com + */ + dns_ptr: string; + }; + }; + }; + responses: { + /** @description Response for changing a [Primary IPs](#primary-ips) DNS pointer. + * + * Contains an [Action](#actions) of type `change_dns_ptr`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_dns_ptr", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "primary_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_primary_ip_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + }; + }; + responses: { + /** @description Response for changing a [Primary IPs](#primary-ips) protection settings. + * + * Contains an [Action](#actions) of type `change_protection`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 4711, + * "type": "primary_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + unassign_primary_ip: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Primary IP. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Response for unassigning a [Primary IP](#primary-ips). + * + * Contains an [Action](#actions) of type `unassign_primary_ip`. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "unassign_primary_ip", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "primary_ip" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_server_types: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `server_types` key in the reply contains an array of Server type objects with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + server_types: { + /** + * Format: int64 + * @description ID of the Server type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Server type. + * @example cpx11 + */ + name: string; + /** + * @description Description of the Server type. + * @example CPX11 + */ + description: string; + /** + * @description Number of cpu cores a Server of this type will have. + * @example 2 + */ + cores: number; + /** + * @description Memory a Server of this type will have in GB. + * @example 2 + */ + memory: number; + /** + * @description Disk size a Server of this type will have in GB. + * @example 40 + */ + disk: number; + /** + * @description This field is deprecated. Use the deprecation object instead. + * @example false + */ + deprecated: boolean; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + /** + * @description Type of Server boot drive. Local has higher speed. Network has better availability. + * @enum {string} + */ + storage_type: "local" | "network"; + /** + * @description Type of cpu. + * @example shared + * @enum {string} + */ + cpu_type: "shared" | "dedicated"; + /** + * @description CPU architecture of the Server Type. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + /** + * DeprecationInfo + * @description 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?: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_server_type: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server Type. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `server_type` key in the reply contains a Server type object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + server_type: { + /** + * Format: int64 + * @description ID of the Server type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Server type. + * @example cpx11 + */ + name: string; + /** + * @description Description of the Server type. + * @example CPX11 + */ + description: string; + /** + * @description Number of cpu cores a Server of this type will have. + * @example 2 + */ + cores: number; + /** + * @description Memory a Server of this type will have in GB. + * @example 2 + */ + memory: number; + /** + * @description Disk size a Server of this type will have in GB. + * @example 40 + */ + disk: number; + /** + * @description This field is deprecated. Use the deprecation object instead. + * @example false + */ + deprecated: boolean; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + /** + * @description Type of Server boot drive. Local has higher speed. Network has better availability. + * @enum {string} + */ + storage_type: "local" | "network"; + /** + * @description Type of cpu. + * @example shared + * @enum {string} + */ + cpu_type: "shared" | "dedicated"; + /** + * @description CPU architecture of the Server Type. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + /** + * DeprecationInfo + * @description 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?: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + }; + }; + }; + }; + }; + }; + list_servers: { + parameters: { + query?: { + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by status. Can be used multiple times. The response will only + * contain the resources with the specified status. + * */ + status?: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description A paged array of servers. */ + 200: { + headers: { + /** @description A link to the next page of responses. */ + "x-next"?: string; + [name: string]: unknown; + }; + content: { + "application/json": { + servers: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + /** + * @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123). + * @example my-resource + */ + name: string; + /** + * @description Status of the Server. + * @enum {string} + */ + status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip`. */ + public_net: { + /** @description IP address (v4) and its reverse DNS entry of this Server. */ + ipv4: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v4) of this Server. + * @example 1.2.3.4 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** + * @description Reverse DNS PTR entry for the IPv4 addresses of this Server. + * @example server01.example.com + */ + dns_ptr: string; + } | null; + /** @description IPv6 network assigned to this Server and its reverse DNS entry. */ + ipv6: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v6) of this Server. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** @description Reverse DNS PTR entries for the IPv6 addresses of this Server. */ + dns_ptr: { + /** + * @description Single IPv6 address of this Server for which the reverse DNS entry has been set up. + * @example 2001:db8::1 + */ + ip: string; + /** + * @description DNS pointer for the specific IP address. + * @example server.example.com + */ + dns_ptr: string; + }[] | null; + } | null; + /** + * @description IDs of Floating IPs assigned to this Server. + * @example [ + * 478 + * ] + */ + floating_ips: number[]; + /** @description Firewalls applied to the public network interface of this Server. */ + firewalls?: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id?: number; + /** + * @description Status of the Firewall on the Server. + * @example applied + * @enum {string} + */ + status?: "applied" | "pending"; + }[]; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description The Network ID the server is attached to. + * @example 4711 + */ + network?: number; + /** + * @description The server IP address on the network. + * @example 10.0.0.2 + */ + ip?: string; + /** + * @description Additional IP addresses of the server on the network. + * @example [ + * "10.0.0.3", + * "10.0.0.4" + * ] + */ + alias_ips?: string[]; + /** + * @description The server MAC address on the network. + * @example 86:00:ff:2a:7d:e1 + */ + mac_address?: string; + }[]; + server_type: { + /** + * Format: int64 + * @description ID of the Server type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Server type. + * @example cpx11 + */ + name: string; + /** + * @description Description of the Server type. + * @example CPX11 + */ + description: string; + /** + * @description Number of cpu cores a Server of this type will have. + * @example 2 + */ + cores: number; + /** + * @description Memory a Server of this type will have in GB. + * @example 2 + */ + memory: number; + /** + * @description Disk size a Server of this type will have in GB. + * @example 40 + */ + disk: number; + /** + * @description This field is deprecated. Use the deprecation object instead. + * @example false + */ + deprecated: boolean; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + /** + * @description Type of Server boot drive. Local has higher speed. Network has better availability. + * @enum {string} + */ + storage_type: "local" | "network"; + /** + * @description Type of cpu. + * @example shared + * @enum {string} + */ + cpu_type: "shared" | "dedicated"; + /** + * @description CPU architecture of the Server Type. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + /** + * DeprecationInfo + * @description 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?: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + }; + /** @description Datacenter this Resource is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** @description Image the server is based on. */ + image: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + } | null; + /** @description ISO Image that is attached to this Server. Null if no ISO is attached. */ + iso: { + /** + * Format: int64 + * @description ID of the ISO. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the ISO. Only set for public ISOs. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + name: string | null; + /** + * @description Description of the ISO. + * @example FreeBSD 11.0 x64 + */ + description: string; + /** + * @description Type of the ISO. + * @enum {string|null} + */ + type: "public" | "private" | null; + /** + * DeprecationInfo + * @description 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: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + /** + * @description CPU architecture compatible with the ISO. + * + * Null indicates no restriction on the architecture (wildcard). + * + * @example x86 + * @enum {string|null} + */ + architecture: "x86" | "arm" | null; + } | null; + /** + * @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot. + * @example false + */ + rescue_enabled: boolean; + /** + * @description True if Server has been locked and is not available to user. + * @example false + */ + locked: boolean; + /** + * @description Time window (UTC) in which the backup will run, or null if the backups are not enabled. + * @example 22-02 + */ + backup_window: string | null; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + * @example 123456 + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + * @example 123456 + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 654321 + */ + included_traffic: number | null; + /** @description Protection configuration for the Server. */ + protection: { + /** + * @description If true, prevents the Server from being deleted. + * @example false + */ + delete: boolean; + /** + * @description If true, prevents the Server from being rebuilt. + * @example false + */ + rebuild: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** @description IDs of Volumes assigned to this Server. */ + volumes?: number[]; + /** @description Load Balancer IDs assigned to the server. */ + load_balancers?: number[]; + /** + * @description Size of the primary Disk. + * @example 50 + */ + primary_disk_size: number; + /** + * PlacementGroupNullable + * @description The placement group the server is assigned to. + */ + placement_group?: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_server: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** @description Please note that Server names must be unique per Project and valid hostnames as per RFC 1123 (i.e. may only contain letters, digits, periods, and dashes). + * + * For `server_type` you can either use the ID as listed in `/server_types` or its name. + * + * For `image` you can either use the ID as listed in `/images` or its name. + * + * If you want to create the Server in a Location, you must set `location` to the ID or name as listed in `/locations`. This is the recommended way. You can be even more specific by setting `datacenter` to the ID or name as listed in `/datacenters`. However we only recommend this if you want to assign a specific Primary IP to the Server which is located in the specified Datacenter. + * + * Some properties like `start_after_create` or `automount` will trigger Actions after the Server is created. Those Actions are listed in the `next_actions` field in the response. + * + * For accessing your Server we strongly recommend to use SSH keys by passing the respective key IDs in `ssh_keys`. If you do not specify any `ssh_keys` we will generate a root password for you and return it in the response. + * + * Please note that provided user-data is stored in our systems. While we take measures to protect it we highly recommend that you don’t use it to store passwords or other sensitive information. + * + * #### Call specific error codes + * + * | Code | Description | + * |----------------------------------|------------------------------------------------------------| + * | `placement_error` | An error during the placement occurred | + * | `primary_ip_assigned` | The specified Primary IP is already assigned to a server | + * | `primary_ip_datacenter_mismatch` | The specified Primary IP is in a different datacenter | + * | `primary_ip_version_mismatch` | The specified Primary IP has the wrong IP Version | + * */ + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the Server to create (must be unique per Project and a valid hostname as per RFC 1123). + * @example my-server + */ + name: string; + /** + * @description ID or name of Location to create Server in (must not be used together with datacenter). + * @example nbg1 + */ + location?: string; + /** + * @description ID or name of Datacenter to create Server in (must not be used together with location). + * @example nbg1-dc3 + */ + datacenter?: string; + /** + * @description ID or name of the Server type this Server should be created with. + * @example cpx11 + */ + server_type: string; + /** + * @description This automatically triggers a [Power on a Server-Server Action](#server-actions-power-on-a-server) after the creation is finished and is returned in the `next_actions` response object. + * @default true + * @example true + */ + start_after_create?: boolean; + /** + * @description ID or name of the Image the Server is created from. + * @example ubuntu-20.04 + */ + image: string; + /** + * Format: int64 + * @description ID of the Placement Group the Server should be in. + * @example 1 + */ + placement_group?: number; + /** + * @description SSH key IDs (`integer`) or names (`string`) which should be injected into the Server at creation time. + * @example [ + * "my-ssh-key" + * ] + */ + ssh_keys?: string[]; + /** + * @description Volume IDs which should be attached to the Server at the creation time. Volumes must be in the same Location. + * @example [ + * 123 + * ] + */ + volumes?: number[]; + /** + * @description Network IDs which should be attached to the Server private network interface at the creation time. + * @example [ + * 456 + * ] + */ + networks?: number[]; + /** + * @description Firewalls which should be applied on the Server's public network interface at creation time. + * @example [ + * { + * "firewall": 38 + * } + * ] + */ + firewalls?: { + /** + * Format: int64 + * @description ID of the Firewall. + */ + firewall: number; + }[]; + /** + * @description Cloud-Init user data to use during Server creation. This field is limited to 32KiB. + * @example #cloud-config + * runcmd: + * - [touch, /root/cloud-init-worked] + * + */ + user_data?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Auto-mount Volumes after attach. + * @example false + */ + automount?: boolean; + /** @description Public Network options. */ + public_net?: { + /** + * @description Attach an IPv4 on the public NIC. If false, no IPv4 address will be attached. + * @default true + */ + enable_ipv4?: boolean; + /** + * @description Attach an IPv6 on the public NIC. If false, no IPv6 address will be attached. + * @default true + */ + enable_ipv6?: boolean; + /** @description ID of the ipv4 Primary IP to use. If omitted and enable_ipv4 is true, a new ipv4 Primary IP will automatically be created. */ + ipv4?: number | null; + /** @description ID of the ipv6 Primary IP to use. If omitted and enable_ipv6 is true, a new ipv6 Primary IP will automatically be created. */ + ipv6?: number | null; + }; + }; + }; + }; + responses: { + /** @description The `server` key in the reply contains a Server object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "server": { + * "id": 42, + * "name": "my-server", + * "status": "initializing", + * "created": "2016-01-30T23:50:00+00:00", + * "public_net": { + * "ipv4": { + * "ip": "1.2.3.4", + * "blocked": false, + * "dns_ptr": "server01.example.com" + * }, + * "ipv6": { + * "ip": "2001:db8::/64", + * "blocked": false, + * "dns_ptr": [ + * { + * "ip": "2001:db8::1", + * "dns_ptr": "server.example.com" + * } + * ] + * }, + * "floating_ips": [ + * 478 + * ], + * "firewalls": [ + * { + * "id": 38, + * "status": "applied" + * } + * ] + * }, + * "private_net": [ + * { + * "network": 4711, + * "ip": "10.0.0.2", + * "alias_ips": [], + * "mac_address": "86:00:ff:2a:7d:e1" + * } + * ], + * "server_type": { + * "id": 1, + * "name": "cpx11", + * "description": "CPX11", + * "cores": 2, + * "memory": 2, + * "disk": 40, + * "deprecated": true, + * "prices": [ + * { + * "location": "fsn1", + * "price_hourly": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * }, + * "price_monthly": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * }, + * "included_traffic": 21990232555520, + * "price_per_tb_traffic": { + * "net": "1.0000000000", + * "gross": "1.1900000000000000" + * } + * } + * ], + * "storage_type": "local", + * "cpu_type": "shared", + * "architecture": "x86" + * }, + * "datacenter": { + * "id": 1, + * "name": "fsn1-dc8", + * "description": "Falkenstein 1 DC 8", + * "location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "server_types": { + * "supported": [ + * 1, + * 2, + * 3 + * ], + * "available": [ + * 1, + * 2, + * 3 + * ], + * "available_for_migration": [ + * 1, + * 2, + * 3 + * ] + * } + * }, + * "image": { + * "id": 4711, + * "type": "snapshot", + * "status": "available", + * "name": "ubuntu-20.04", + * "description": "Ubuntu 20.04 Standard 64 bit", + * "image_size": 2.3, + * "disk_size": 10, + * "created": "2016-01-30T23:50:00+00:00", + * "created_from": { + * "id": 1, + * "name": "Server" + * }, + * "bound_to": null, + * "os_flavor": "ubuntu", + * "os_version": "20.04", + * "rapid_deploy": false, + * "protection": { + * "delete": false + * }, + * "deprecated": "2018-02-28T00:00:00+00:00", + * "deleted": null, + * "labels": { + * "key": "value" + * }, + * "architecture": "x86" + * }, + * "iso": { + * "id": 4711, + * "name": "FreeBSD-11.0-RELEASE-amd64-dvd1", + * "description": "FreeBSD 11.0 x64", + * "type": "public", + * "deprecation": { + * "announced": "2018-02-28T00:00:00+00:00", + * "unavailable_after": "2018-05-31T00:00:00+00:00" + * }, + * "architecture": "x86" + * }, + * "rescue_enabled": false, + * "locked": false, + * "backup_window": "22-02", + * "outgoing_traffic": 123456, + * "ingoing_traffic": 123456, + * "included_traffic": 654321, + * "protection": { + * "delete": false, + * "rebuild": false + * }, + * "labels": { + * "key": "value" + * }, + * "volumes": [], + * "load_balancers": [], + * "primary_disk_size": 50 + * }, + * "action": { + * "id": 1, + * "command": "create_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * }, + * "next_actions": [ + * { + * "id": 13, + * "command": "start_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "root_password": "YItygq1v3GYjjMomLaKc" + * } */ + "application/json": { + server: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + /** + * @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123). + * @example my-resource + */ + name: string; + /** + * @description Status of the Server. + * @enum {string} + */ + status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip`. */ + public_net: { + /** @description IP address (v4) and its reverse DNS entry of this Server. */ + ipv4: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v4) of this Server. + * @example 1.2.3.4 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** + * @description Reverse DNS PTR entry for the IPv4 addresses of this Server. + * @example server01.example.com + */ + dns_ptr: string; + } | null; + /** @description IPv6 network assigned to this Server and its reverse DNS entry. */ + ipv6: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v6) of this Server. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** @description Reverse DNS PTR entries for the IPv6 addresses of this Server. */ + dns_ptr: { + /** + * @description Single IPv6 address of this Server for which the reverse DNS entry has been set up. + * @example 2001:db8::1 + */ + ip: string; + /** + * @description DNS pointer for the specific IP address. + * @example server.example.com + */ + dns_ptr: string; + }[] | null; + } | null; + /** + * @description IDs of Floating IPs assigned to this Server. + * @example [ + * 478 + * ] + */ + floating_ips: number[]; + /** @description Firewalls applied to the public network interface of this Server. */ + firewalls?: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id?: number; + /** + * @description Status of the Firewall on the Server. + * @example applied + * @enum {string} + */ + status?: "applied" | "pending"; + }[]; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description The Network ID the server is attached to. + * @example 4711 + */ + network?: number; + /** + * @description The server IP address on the network. + * @example 10.0.0.2 + */ + ip?: string; + /** + * @description Additional IP addresses of the server on the network. + * @example [ + * "10.0.0.3", + * "10.0.0.4" + * ] + */ + alias_ips?: string[]; + /** + * @description The server MAC address on the network. + * @example 86:00:ff:2a:7d:e1 + */ + mac_address?: string; + }[]; + server_type: { + /** + * Format: int64 + * @description ID of the Server type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Server type. + * @example cpx11 + */ + name: string; + /** + * @description Description of the Server type. + * @example CPX11 + */ + description: string; + /** + * @description Number of cpu cores a Server of this type will have. + * @example 2 + */ + cores: number; + /** + * @description Memory a Server of this type will have in GB. + * @example 2 + */ + memory: number; + /** + * @description Disk size a Server of this type will have in GB. + * @example 40 + */ + disk: number; + /** + * @description This field is deprecated. Use the deprecation object instead. + * @example false + */ + deprecated: boolean; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + /** + * @description Type of Server boot drive. Local has higher speed. Network has better availability. + * @enum {string} + */ + storage_type: "local" | "network"; + /** + * @description Type of cpu. + * @example shared + * @enum {string} + */ + cpu_type: "shared" | "dedicated"; + /** + * @description CPU architecture of the Server Type. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + /** + * DeprecationInfo + * @description 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?: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + }; + /** @description Datacenter this Resource is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** @description Image the server is based on. */ + image: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + } | null; + /** @description ISO Image that is attached to this Server. Null if no ISO is attached. */ + iso: { + /** + * Format: int64 + * @description ID of the ISO. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the ISO. Only set for public ISOs. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + name: string | null; + /** + * @description Description of the ISO. + * @example FreeBSD 11.0 x64 + */ + description: string; + /** + * @description Type of the ISO. + * @enum {string|null} + */ + type: "public" | "private" | null; + /** + * DeprecationInfo + * @description 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: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + /** + * @description CPU architecture compatible with the ISO. + * + * Null indicates no restriction on the architecture (wildcard). + * + * @example x86 + * @enum {string|null} + */ + architecture: "x86" | "arm" | null; + } | null; + /** + * @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot. + * @example false + */ + rescue_enabled: boolean; + /** + * @description True if Server has been locked and is not available to user. + * @example false + */ + locked: boolean; + /** + * @description Time window (UTC) in which the backup will run, or null if the backups are not enabled. + * @example 22-02 + */ + backup_window: string | null; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + * @example 123456 + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + * @example 123456 + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 654321 + */ + included_traffic: number | null; + /** @description Protection configuration for the Server. */ + protection: { + /** + * @description If true, prevents the Server from being deleted. + * @example false + */ + delete: boolean; + /** + * @description If true, prevents the Server from being rebuilt. + * @example false + */ + rebuild: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** @description IDs of Volumes assigned to this Server. */ + volumes?: number[]; + /** @description Load Balancer IDs assigned to the server. */ + load_balancers?: number[]; + /** + * @description Size of the primary Disk. + * @example 50 + */ + primary_disk_size: number; + /** + * PlacementGroupNullable + * @description The placement group the server is assigned to. + */ + placement_group?: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + } | null; + }; + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + next_actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** + * @description Root password when no SSH keys have been specified. + * @example YItygq1v3GYjjMomLaKc + */ + root_password: string | null; + }; + }; + }; + }; + }; + list_servers_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_servers_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply has this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `server` key in the reply contains a Server object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + /** + * @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123). + * @example my-resource + */ + name: string; + /** + * @description Status of the Server. + * @enum {string} + */ + status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip`. */ + public_net: { + /** @description IP address (v4) and its reverse DNS entry of this Server. */ + ipv4: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v4) of this Server. + * @example 1.2.3.4 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** + * @description Reverse DNS PTR entry for the IPv4 addresses of this Server. + * @example server01.example.com + */ + dns_ptr: string; + } | null; + /** @description IPv6 network assigned to this Server and its reverse DNS entry. */ + ipv6: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v6) of this Server. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** @description Reverse DNS PTR entries for the IPv6 addresses of this Server. */ + dns_ptr: { + /** + * @description Single IPv6 address of this Server for which the reverse DNS entry has been set up. + * @example 2001:db8::1 + */ + ip: string; + /** + * @description DNS pointer for the specific IP address. + * @example server.example.com + */ + dns_ptr: string; + }[] | null; + } | null; + /** + * @description IDs of Floating IPs assigned to this Server. + * @example [ + * 478 + * ] + */ + floating_ips: number[]; + /** @description Firewalls applied to the public network interface of this Server. */ + firewalls?: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id?: number; + /** + * @description Status of the Firewall on the Server. + * @example applied + * @enum {string} + */ + status?: "applied" | "pending"; + }[]; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description The Network ID the server is attached to. + * @example 4711 + */ + network?: number; + /** + * @description The server IP address on the network. + * @example 10.0.0.2 + */ + ip?: string; + /** + * @description Additional IP addresses of the server on the network. + * @example [ + * "10.0.0.3", + * "10.0.0.4" + * ] + */ + alias_ips?: string[]; + /** + * @description The server MAC address on the network. + * @example 86:00:ff:2a:7d:e1 + */ + mac_address?: string; + }[]; + server_type: { + /** + * Format: int64 + * @description ID of the Server type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Server type. + * @example cpx11 + */ + name: string; + /** + * @description Description of the Server type. + * @example CPX11 + */ + description: string; + /** + * @description Number of cpu cores a Server of this type will have. + * @example 2 + */ + cores: number; + /** + * @description Memory a Server of this type will have in GB. + * @example 2 + */ + memory: number; + /** + * @description Disk size a Server of this type will have in GB. + * @example 40 + */ + disk: number; + /** + * @description This field is deprecated. Use the deprecation object instead. + * @example false + */ + deprecated: boolean; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + /** + * @description Type of Server boot drive. Local has higher speed. Network has better availability. + * @enum {string} + */ + storage_type: "local" | "network"; + /** + * @description Type of cpu. + * @example shared + * @enum {string} + */ + cpu_type: "shared" | "dedicated"; + /** + * @description CPU architecture of the Server Type. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + /** + * DeprecationInfo + * @description 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?: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + }; + /** @description Datacenter this Resource is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** @description Image the server is based on. */ + image: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + } | null; + /** @description ISO Image that is attached to this Server. Null if no ISO is attached. */ + iso: { + /** + * Format: int64 + * @description ID of the ISO. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the ISO. Only set for public ISOs. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + name: string | null; + /** + * @description Description of the ISO. + * @example FreeBSD 11.0 x64 + */ + description: string; + /** + * @description Type of the ISO. + * @enum {string|null} + */ + type: "public" | "private" | null; + /** + * DeprecationInfo + * @description 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: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + /** + * @description CPU architecture compatible with the ISO. + * + * Null indicates no restriction on the architecture (wildcard). + * + * @example x86 + * @enum {string|null} + */ + architecture: "x86" | "arm" | null; + } | null; + /** + * @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot. + * @example false + */ + rescue_enabled: boolean; + /** + * @description True if Server has been locked and is not available to user. + * @example false + */ + locked: boolean; + /** + * @description Time window (UTC) in which the backup will run, or null if the backups are not enabled. + * @example 22-02 + */ + backup_window: string | null; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + * @example 123456 + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + * @example 123456 + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 654321 + */ + included_traffic: number | null; + /** @description Protection configuration for the Server. */ + protection: { + /** + * @description If true, prevents the Server from being deleted. + * @example false + */ + delete: boolean; + /** + * @description If true, prevents the Server from being rebuilt. + * @example false + */ + rebuild: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** @description IDs of Volumes assigned to this Server. */ + volumes?: number[]; + /** @description Load Balancer IDs assigned to the server. */ + load_balancers?: number[]; + /** + * @description Size of the primary Disk. + * @example 50 + */ + primary_disk_size: number; + /** + * PlacementGroupNullable + * @description The placement group the server is assigned to. + */ + placement_group?: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + } | null; + }; + }; + }; + }; + }; + }; + update_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New name to set. + * @example my-server + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `server` key in the reply contains the updated Server. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + server?: { + /** + * Format: int64 + * @description ID of the Server. + * @example 42 + */ + id: number; + /** + * @description Name of the Server (must be unique per Project and a valid hostname as per RFC 1123). + * @example my-resource + */ + name: string; + /** + * @description Status of the Server. + * @enum {string} + */ + status: "running" | "initializing" | "starting" | "stopping" | "off" | "deleting" | "migrating" | "rebuilding" | "unknown"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Public network information. The Server's IPv4 address can be found in `public_net->ipv4->ip`. */ + public_net: { + /** @description IP address (v4) and its reverse DNS entry of this Server. */ + ipv4: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v4) of this Server. + * @example 1.2.3.4 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** + * @description Reverse DNS PTR entry for the IPv4 addresses of this Server. + * @example server01.example.com + */ + dns_ptr: string; + } | null; + /** @description IPv6 network assigned to this Server and its reverse DNS entry. */ + ipv6: { + /** + * Format: int64 + * @description ID of the Primary IP. + * @example 42 + */ + id?: number; + /** + * @description IP address (v6) of this Server. + * @example 2001:db8::/64 + */ + ip: string; + /** + * @description If the IP is blocked by our anti abuse dept. + * @example false + */ + blocked: boolean; + /** @description Reverse DNS PTR entries for the IPv6 addresses of this Server. */ + dns_ptr: { + /** + * @description Single IPv6 address of this Server for which the reverse DNS entry has been set up. + * @example 2001:db8::1 + */ + ip: string; + /** + * @description DNS pointer for the specific IP address. + * @example server.example.com + */ + dns_ptr: string; + }[] | null; + } | null; + /** + * @description IDs of Floating IPs assigned to this Server. + * @example [ + * 478 + * ] + */ + floating_ips: number[]; + /** @description Firewalls applied to the public network interface of this Server. */ + firewalls?: { + /** + * Format: int64 + * @description ID of the Firewall. + * @example 42 + */ + id?: number; + /** + * @description Status of the Firewall on the Server. + * @example applied + * @enum {string} + */ + status?: "applied" | "pending"; + }[]; + }; + /** @description Private networks information. */ + private_net: { + /** + * Format: int64 + * @description The Network ID the server is attached to. + * @example 4711 + */ + network?: number; + /** + * @description The server IP address on the network. + * @example 10.0.0.2 + */ + ip?: string; + /** + * @description Additional IP addresses of the server on the network. + * @example [ + * "10.0.0.3", + * "10.0.0.4" + * ] + */ + alias_ips?: string[]; + /** + * @description The server MAC address on the network. + * @example 86:00:ff:2a:7d:e1 + */ + mac_address?: string; + }[]; + server_type: { + /** + * Format: int64 + * @description ID of the Server type. + * @example 1 + */ + id: number; + /** + * @description Unique identifier of the Server type. + * @example cpx11 + */ + name: string; + /** + * @description Description of the Server type. + * @example CPX11 + */ + description: string; + /** + * @description Number of cpu cores a Server of this type will have. + * @example 2 + */ + cores: number; + /** + * @description Memory a Server of this type will have in GB. + * @example 2 + */ + memory: number; + /** + * @description Disk size a Server of this type will have in GB. + * @example 40 + */ + disk: number; + /** + * @description This field is deprecated. Use the deprecation object instead. + * @example false + */ + deprecated: boolean; + /** @description Price per [Location](#locations). */ + prices: { + /** + * @description Name of the [Location](#locations) the price is for. + * @example fsn1 + */ + location: string; + /** @description Hourly price in this [Location](#locations). */ + price_hourly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** @description Monthly price in this [Location](#locations). */ + price_monthly: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + /** + * Format: int64 + * @description Free traffic per month in bytes in this [Location](#locations). + * @example 654321 + */ + included_traffic: number; + /** @description Additional traffic price per TB in this [Location](#locations). */ + price_per_tb_traffic: { + /** + * Format: decimal + * @description Price without VAT. + * @example 1.0000 + */ + net: string; + /** + * Format: decimal + * @description Price with VAT added. + * @example 1.1900 + */ + gross: string; + }; + }[]; + /** + * @description Type of Server boot drive. Local has higher speed. Network has better availability. + * @enum {string} + */ + storage_type: "local" | "network"; + /** + * @description Type of cpu. + * @example shared + * @enum {string} + */ + cpu_type: "shared" | "dedicated"; + /** + * @description CPU architecture of the Server Type. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + /** + * DeprecationInfo + * @description 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?: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + }; + /** @description Datacenter this Resource is located at. */ + datacenter: { + /** + * Format: int64 + * @description ID of the Datacenter. + * @example 42 + */ + id: number; + /** + * @description Unique name for the [Datacenter](#datacenters). + * + * Can be used as a more descriptive identifier. + * + * @example fsn1-dc8 + */ + name: string; + /** + * @description Descriptive name for the [Datacenter](#datacenters). + * + * Desired to be easy to understand for humans. Might be changed for cosmetic reasons. Do not use this as an identifier. + * + * @example Falkenstein DC Park 8 + */ + description: string; + /** @description [Location](#locations) the [Datacenter](#datacenters) is located at. + * */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** @description [Server Types](#server-types) supported and available in this [Datacenter](#datacenters). + * */ + server_types: { + /** + * @description List of [Server Types](#server-types) supported in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) are generally available in this Datacenter, but might be + * temporarily out of stock. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + supported: number[]; + /** + * @description [Server Types](#server-types) currently available in this [Datacenter](#datacenters). + * + * These [Server Types](#server-types) can currently be purchased. Types that are temporarily unavailable + * but are supported in this [Datacenter](#datacenters) are listed as `supported`. + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available: number[]; + /** + * @description [Server Types](#server-types) available to migrate to in this [Datacenter](#datacenters). + * + * Existing [Servers](#servers) can be migrated to these [Server Types](#server-types). + * + * @example [ + * 1, + * 2, + * 3 + * ] + */ + available_for_migration: number[]; + }; + }; + /** @description Image the server is based on. */ + image: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + } | null; + /** @description ISO Image that is attached to this Server. Null if no ISO is attached. */ + iso: { + /** + * Format: int64 + * @description ID of the ISO. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the ISO. Only set for public ISOs. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + name: string | null; + /** + * @description Description of the ISO. + * @example FreeBSD 11.0 x64 + */ + description: string; + /** + * @description Type of the ISO. + * @enum {string|null} + */ + type: "public" | "private" | null; + /** + * DeprecationInfo + * @description 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: { + /** + * Format: iso-8601 + * @description 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. + * + * @example 2023-09-01T00:00:00+00:00 + */ + unavailable_after: string; + /** + * Format: iso-8601 + * @description Date of the deprecation announcement. + * + * @example 2023-06-01T00:00:00+00:00 + */ + announced: string; + } | null; + /** + * @description CPU architecture compatible with the ISO. + * + * Null indicates no restriction on the architecture (wildcard). + * + * @example x86 + * @enum {string|null} + */ + architecture: "x86" | "arm" | null; + } | null; + /** + * @description True if rescue mode is enabled. Server will then boot into rescue system on next reboot. + * @example false + */ + rescue_enabled: boolean; + /** + * @description True if Server has been locked and is not available to user. + * @example false + */ + locked: boolean; + /** + * @description Time window (UTC) in which the backup will run, or null if the backups are not enabled. + * @example 22-02 + */ + backup_window: string | null; + /** + * Format: int64 + * @description Outbound Traffic for the current billing period in bytes. + * @example 123456 + */ + outgoing_traffic: number | null; + /** + * Format: int64 + * @description Inbound Traffic for the current billing period in bytes. + * @example 123456 + */ + ingoing_traffic: number | null; + /** + * Format: int64 + * @description Free Traffic for the current billing period in bytes. + * @example 654321 + */ + included_traffic: number | null; + /** @description Protection configuration for the Server. */ + protection: { + /** + * @description If true, prevents the Server from being deleted. + * @example false + */ + delete: boolean; + /** + * @description If true, prevents the Server from being rebuilt. + * @example false + */ + rebuild: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** @description IDs of Volumes assigned to this Server. */ + volumes?: number[]; + /** @description Load Balancer IDs assigned to the server. */ + load_balancers?: number[]; + /** + * @description Size of the primary Disk. + * @example 50 + */ + primary_disk_size: number; + /** + * PlacementGroupNullable + * @description The placement group the server is assigned to. + */ + placement_group?: { + /** + * Format: int64 + * @description ID of the Placement Group. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Type of Placement Group. + * + * @example spread + * @enum {string} + */ + type: "spread"; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Array of IDs of Servers that are part of this Placement Group. + * @example [ + * 42 + * ] + */ + servers: number[]; + } | null; + }; + }; + }; + }; + }; + }; + delete_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + list_server_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "start_server", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + add_server_to_placement_group: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of Placement Group the Server should be added to. + * @example 1 + */ + placement_group: number; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "add_to_placement_group", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + attach_server_iso: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description ID or name of ISO to attach to the Server as listed in GET `/isos`. + * @example FreeBSD-11.0-RELEASE-amd64-dvd1 + */ + iso: string; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "attach_iso", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + attach_server_to_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of an existing network to attach the Server to. + * @example 4711 + */ + network: number; + /** + * @description IP to request to be assigned to this Server; if you do not provide this then you will be auto assigned an IP address. + * @example 10.0.1.1 + */ + ip?: string; + /** + * @description Additional IPs to be assigned to this Server. + * @example [ + * "10.0.1.2" + * ] + */ + alias_ips?: string[]; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "attach_to_network", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_server_alias_ips: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of an existing Network already attached to the Server. + * @example 4711 + */ + network: number; + /** + * @description New alias IPs to set for this Server. + * @example [ + * "10.0.1.2" + * ] + */ + alias_ips: string[]; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_alias_ips", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_server_dns_ptr: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + /** @description Select the IP address for which to change the DNS entry by passing `ip`. It can be either IPv4 or IPv6. The target hostname is set by passing `dns_ptr`. */ + requestBody?: { + content: { + "application/json": { + /** + * @description Primary IP address for which the reverse DNS entry should be set. + * @example 1.2.3.4 + */ + ip: string; + /** + * @description Hostname to set as a reverse DNS PTR entry, reset to original value if `null`. + * @example server01.example.com + */ + dns_ptr: string | null; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_dns_ptr", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_server_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description If true, prevents the Server from being deleted (currently delete and rebuild attribute needs to have the same value). + * @example true + */ + delete?: boolean; + /** + * @description If true, prevents the Server from being rebuilt (currently delete and rebuild attribute needs to have the same value). + * @example true + */ + rebuild?: boolean; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_server_type: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description If false, do not upgrade the disk (this allows downgrading the Server type later). + * @example true + */ + upgrade_disk: boolean; + /** + * @description ID or name of Server type the Server should migrate to. + * @example cpx11 + */ + server_type: string; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_server_type", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + create_server_image: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Description of the Image, will be auto-generated if not set. + * @example my image + */ + description?: string; + /** + * @description Type of Image to create. + * @default snapshot + * @example snapshot + * @enum {string} + */ + type?: "snapshot" | "backup"; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `image` key in the reply contains an the created Image, which is an object with this structure. + * + * The `action` key in the reply contains an Action object with this structure. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "image": { + * "id": 4711, + * "type": "snapshot", + * "status": "creating", + * "name": null, + * "description": "my image", + * "image_size": 2.3, + * "disk_size": 10, + * "created": "2016-01-30T23:50:00+00:00", + * "created_from": { + * "id": 1, + * "name": "Server" + * }, + * "bound_to": null, + * "os_flavor": "ubuntu", + * "os_version": "20.04", + * "rapid_deploy": false, + * "protection": { + * "delete": false + * }, + * "deprecated": "2018-02-28T00:00:00+00:00", + * "deleted": null, + * "labels": { + * "key": "value" + * }, + * "architecture": "x86" + * }, + * "action": { + * "id": 13, + * "command": "create_image", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + image?: { + /** + * Format: int64 + * @description ID of the Image. + * @example 42 + */ + id: number; + /** + * @description Type of the Image. + * @example snapshot + * @enum {string} + */ + type: "system" | "app" | "snapshot" | "backup"; + /** + * @description Whether the Image can be used or if it's still being created or unavailable. + * @enum {string} + */ + status: "available" | "creating" | "unavailable"; + /** + * @description Unique identifier of the Image. This value is only set for system Images. + * @example ubuntu-20.04 + */ + name: string | null; + /** + * @description Description of the Image. + * @example Ubuntu 20.04 Standard 64 bit + */ + description: string; + /** + * @description Size of the Image file in our storage in GB. For snapshot Images this is the value relevant for calculating costs for the Image. + * @example 2.3 + */ + image_size: number | null; + /** + * @description Size of the disk contained in the Image in GB. + * @example 10 + */ + disk_size: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** @description Information about the Server the Image was created from. */ + created_from: { + /** + * Format: int64 + * @description ID of the Server the Image was created from. + * @example 1 + */ + id: number; + /** + * @description Server name at the time the Image was created. + * @example Server + */ + name: string; + } | null; + /** + * Format: int64 + * @description ID of Server the Image is bound to. Only set for Images of type `backup`. + * @example null + */ + bound_to: number | null; + /** + * @description Flavor of operating system contained in the Image. + * @example ubuntu + * @enum {string} + */ + os_flavor: "ubuntu" | "centos" | "debian" | "fedora" | "rocky" | "alma" | "opensuse" | "unknown"; + /** + * @description Operating system version. + * @example 20.04 + */ + os_version: string | null; + /** + * @description Indicates that rapid deploy of the Image is available. + * @example false + */ + rapid_deploy?: boolean; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description Point in time when the Image is considered to be deprecated (in ISO-8601 format). + * @example 2018-02-28T00:00:00+00:00 + */ + deprecated: string | null; + /** + * @description Point in time where the Image was deleted (in ISO-8601 format). + * @example null + */ + deleted: string | null; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description CPU architecture compatible with the Image. + * + * @example x86 + * @enum {string} + */ + architecture: "x86" | "arm"; + }; + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + detach_server_from_network: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of an existing network to detach the Server from. + * @example 4711 + */ + network: number; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "detach_from_network", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 4711, + * "type": "network" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + detach_server_iso: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "detach_iso", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + disable_server_backup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "disable_backup", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + disable_server_rescue: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "disable_rescue", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + enable_server_backup: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "enable_backup", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + enable_server_rescue: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Type of rescue system to boot. + * @default linux64 + * @enum {string} + */ + type?: "linux64"; + /** + * @description Array of SSH key IDs which should be injected into the rescue system. + * @example [ + * 2323 + * ] + */ + ssh_keys?: number[]; + }; + }; + }; + responses: { + /** @description The `root_password` key in the reply contains the root password that can be used to access the booted rescue system. + * + * The `action` key in the reply contains an Action object with this structure. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "root_password": "zCWbFhnu950dUTko5f40", + * "action": { + * "id": 13, + * "command": "enable_rescue", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** + * @description Password that will be set for this Server once the Action succeeds. + * @example zCWbFhnu950dUTko5f40 + */ + root_password?: string; + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + poweroff_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "stop_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + poweron_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "start_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + reboot_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "reboot_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + rebuild_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + /** @description To select which Image to rebuild from you can either pass an ID or a name as the `image` argument. Passing a name only works for `system` Images since the other Image types do not have a name set. */ + requestBody?: { + content: { + "application/json": { + /** + * @description ID or name of Image to rebuilt from. + * @example ubuntu-20.04 + */ + image: string; + }; + }; + }; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "rebuild_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * }, + * "root_password": null + * } */ + "application/json": { + /** @description New root password when not using SSH keys. */ + root_password?: string | null; + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + remove_server_from_placement_group: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "remove_from_placement_group", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + request_server_console: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "wss_url": "wss://console.hetzner.cloud/?server_id=1&token=3db32d15-af2f-459c-8bf8-dee1fd05f49c", + * "password": "9MQaTg2VAGI0FIpc10k3UpRXcHj2wQ6x", + * "action": { + * "id": 13, + * "command": "request_console", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** + * @description URL of websocket proxy to use; this includes a token which is valid for a limited time only. + * @example wss://console.hetzner.cloud/?server_id=1&token=3db32d15-af2f-459c-8bf8-dee1fd05f49c + */ + wss_url: string; + /** + * @description VNC password to use for this connection (this password only works in combination with a wss_url with valid token). + * @example 9MQaTg2VAGI0FIpc10k3UpRXcHj2wQ6x + */ + password: string; + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + reset_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "reset_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + reset_server_password: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `root_password` key in the reply contains the new root password that will be active if the Action succeeds. + * + * The `action` key in the reply contains an Action object with this structure. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "root_password": "zCWbFhnu950dUTko5f40", + * "action": { + * "id": 13, + * "command": "reset_password", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** + * @description Password that will be set for this Server once the Action succeeds. + * @example zCWbFhnu950dUTko5f40 + */ + root_password?: string; + /** Action */ + action?: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + shutdown_server: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply contains an Action object with this structure. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "shutdown_server", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_server_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply has this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "start_server", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_server_metrics: { + parameters: { + query: { + /** @description Type of metrics to get. */ + type: "cpu" | "disk" | "network"; + /** @description Start of period to get Metrics for (in ISO-8601 format). */ + start: string; + /** @description End of period to get Metrics for (in ISO-8601 format). */ + end: string; + /** @description Resolution of results in seconds. */ + step?: string; + }; + header?: never; + path: { + /** @description ID of the Server. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `metrics` key in the reply contains a metrics object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + metrics: { + /** + * @description Start of period of metrics reported (in ISO-8601 format). + * @example 2017-01-01T00:00:00+00:00 + */ + start: string; + /** + * @description End of period of metrics reported (in ISO-8601 format). + * @example 2017-01-01T23:00:00+00:00 + */ + end: string; + /** + * @description Resolution of results in seconds. + * @example 60 + */ + step: number; + /** + * @description Hash with timeseries information, containing the name of timeseries as key. + * @example { + * "name_of_timeseries": { + * "values": [ + * [ + * 1435781470.622, + * "42" + * ], + * [ + * 1435781471.622, + * "43" + * ] + * ] + * } + * } + */ + time_series: { + [key: string]: { + /** @description Metrics Timestamps with values. */ + values: (number | string)[][]; + }; + }; + }; + }; + }; + }; + }; + }; + list_ssh_keys: { + parameters: { + query?: { + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Can be used to filter SSH keys by their fingerprint. The response will only contain the SSH key matching the specified fingerprint. */ + fingerprint?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `ssh_keys` key in the reply contains an array of SSH key objects with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ssh_keys: { + /** + * Format: int64 + * @description ID of the SSH Key. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description MD5 fingerprint of the SSH public key. + * @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f + */ + fingerprint: string; + /** + * @description Public key. + * @example ssh-rsa AAAjjk76kgf...Xt + */ + public_key: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_ssh_key: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Name of the SSH key. + * @example My ssh key + */ + name: string; + /** + * @description Public key. + * @example ssh-rsa AAAjjk76kgf...Xt + */ + public_key: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `ssh_key` key in the reply contains the object that was just created. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ssh_key: { + /** + * Format: int64 + * @description ID of the SSH Key. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description MD5 fingerprint of the SSH public key. + * @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f + */ + fingerprint: string; + /** + * @description Public key. + * @example ssh-rsa AAAjjk76kgf...Xt + */ + public_key: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }; + }; + }; + }; + }; + }; + get_ssh_key: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the SSH Key. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `ssh_key` key in the reply contains an SSH key object with this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + ssh_key: { + /** + * Format: int64 + * @description ID of the SSH Key. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description MD5 fingerprint of the SSH public key. + * @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f + */ + fingerprint: string; + /** + * @description Public key. + * @example ssh-rsa AAAjjk76kgf...Xt + */ + public_key: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }; + }; + }; + }; + }; + }; + update_ssh_key: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the SSH Key. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New name Name to set. + * @example My ssh key + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `ssh_key` key in the reply contains the modified SSH key object with the new description. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "ssh_key": { + * "id": 2323, + * "name": "My ssh key", + * "fingerprint": "b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f", + * "public_key": "ssh-rsa AAAjjk76kgf...Xt", + * "labels": { + * "key": "value" + * }, + * "created": "2016-01-30T23:50:00+00:00" + * } + * } */ + "application/json": { + ssh_key: { + /** + * Format: int64 + * @description ID of the SSH Key. + * @example 42 + */ + id: number; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * @description MD5 fingerprint of the SSH public key. + * @example b7:2f:30:a0:2f:6c:58:6c:21:04:58:61:ba:06:3b:2f + */ + fingerprint: string; + /** + * @description Public key. + * @example ssh-rsa AAAjjk76kgf...Xt + */ + public_key: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + }; + }; + }; + }; + }; + }; + delete_ssh_key: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the SSH Key. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description SSH key deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_volumes: { + parameters: { + query?: { + /** @description Filter resources by status. Can be used multiple times. The response will only + * contain the resources with the specified status. + * */ + status?: "available" | "creating"; + /** @description Sort resources by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; + /** @description Filter resources by their name. The response will only contain the resources + * matching exactly the specified name. + * */ + name?: string; + /** @description Filter resources by labels. The response will only contain resources matching the + * label selector. For more information, see "[Label Selector](#label-selector)". + * */ + label_selector?: string; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `volumes` key contains a list of volumes. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + volumes: { + /** + * Format: int64 + * @description ID of the Volume. + * @example 42 + */ + id: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * Format: int64 + * @description ID of the Server the Volume is attached to, null if it is not attached at all. + * @example 12 + */ + server: number | null; + /** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Size in GB of the Volume. + * @example 42 + */ + size: number; + /** + * @description Device path on the file system for the Volume. + * @example /dev/disk/by-id/scsi-0HC_Volume_4711 + */ + linux_device: string; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Status of the Volume. + * @example available + * @enum {string} + */ + status: "available" | "creating"; + /** + * @description Filesystem of the Volume if formatted on creation, null if not formatted on creation. + * @example xfs + */ + format: string | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + create_volume: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "size": 42, + * "name": "test-database", + * "labels": { + * "key": "value" + * }, + * "location": "nbg1", + * "automount": false, + * "format": "xfs" + * } */ + "application/json": { + /** + * @description Size of the Volume in GB. + * @example 42 + */ + size: number; + /** + * @description Name of the volume. + * @example databases-storage + */ + name: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + /** + * @description Auto-mount Volume after attach. `server` must be provided. + * @example false + */ + automount?: boolean; + /** + * @description Format Volume after creation. One of: `xfs`, `ext4`. + * @example xfs + */ + format?: string; + /** + * @description Location to create the Volume in (can be omitted if Server is specified). + * @example nbg1 + */ + location?: string; + /** + * Format: int64 + * @description Server to which to attach the Volume once it's created (Volume will be created in the same Location as the server). + */ + server?: number; + }; + }; + }; + responses: { + /** @description The `volume` key contains the Volume that was just created. + * + * The `action` key contains the Action tracking Volume creation. + * */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "volume": { + * "id": 4711, + * "created": "2016-01-30T23:50:11+00:00", + * "name": "database-storage", + * "server": 12, + * "location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "size": 42, + * "linux_device": "/dev/disk/by-id/scsi-0HC_Volume_4711", + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "status": "available", + * "format": "xfs" + * }, + * "action": { + * "id": 13, + * "command": "create_volume", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 554, + * "type": "volume" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * }, + * "next_actions": [ + * { + * "id": 13, + * "command": "attach_volume", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 554, + * "type": "volume" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ] + * } */ + "application/json": { + volume: { + /** + * Format: int64 + * @description ID of the Volume. + * @example 42 + */ + id: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * Format: int64 + * @description ID of the Server the Volume is attached to, null if it is not attached at all. + * @example 12 + */ + server: number | null; + /** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Size in GB of the Volume. + * @example 42 + */ + size: number; + /** + * @description Device path on the file system for the Volume. + * @example /dev/disk/by-id/scsi-0HC_Volume_4711 + */ + linux_device: string; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Status of the Volume. + * @example available + * @enum {string} + */ + status: "available" | "creating"; + /** + * @description Filesystem of the Volume if formatted on creation, null if not formatted on creation. + * @example xfs + */ + format: string | null; + }; + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + next_actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + }; + }; + }; + }; + }; + list_volumes_actions: { + parameters: { + query?: { + /** @description Filter the actions by ID. Can be used multiple times. The response will only contain + * actions matching the specified IDs. + * */ + id?: number; + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + get_volumes_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Action. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key in the reply has this structure. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_volume: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `volume` key contains the volume. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + volume: { + /** + * Format: int64 + * @description ID of the Volume. + * @example 42 + */ + id: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * Format: int64 + * @description ID of the Server the Volume is attached to, null if it is not attached at all. + * @example 12 + */ + server: number | null; + /** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Size in GB of the Volume. + * @example 42 + */ + size: number; + /** + * @description Device path on the file system for the Volume. + * @example /dev/disk/by-id/scsi-0HC_Volume_4711 + */ + linux_device: string; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Status of the Volume. + * @example available + * @enum {string} + */ + status: "available" | "creating"; + /** + * @description Filesystem of the Volume if formatted on creation, null if not formatted on creation. + * @example xfs + */ + format: string | null; + }; + }; + }; + }; + }; + }; + update_volume: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New Volume name. + * @example database-storage + */ + name?: string; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * + * Note that the set of [Labels](#labels) provided in the request will overwrite the + * existing one. + * + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels?: { + [key: string]: string; + }; + }; + }; + }; + responses: { + /** @description The `volume` key contains the updated volume. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "volume": { + * "id": 4711, + * "created": "2016-01-30T23:50:11+00:00", + * "name": "database-storage", + * "server": 12, + * "location": { + * "id": 1, + * "name": "fsn1", + * "description": "Falkenstein DC Park 1", + * "country": "DE", + * "city": "Falkenstein", + * "latitude": 50.47612, + * "longitude": 12.370071, + * "network_zone": "eu-central" + * }, + * "size": 42, + * "linux_device": "/dev/disk/by-id/scsi-0HC_Volume_4711", + * "protection": { + * "delete": false + * }, + * "labels": { + * "key": "value" + * }, + * "status": "available", + * "format": "xfs" + * } + * } */ + "application/json": { + volume: { + /** + * Format: int64 + * @description ID of the Volume. + * @example 42 + */ + id: number; + /** + * @description Point in time when the Resource was created (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + created: string; + /** + * @description Name of the Resource. Must be unique per Project. + * @example my-resource + */ + name: string; + /** + * Format: int64 + * @description ID of the Server the Volume is attached to, null if it is not attached at all. + * @example 12 + */ + server: number | null; + /** @description Location of the Volume. Volume can only be attached to Servers in the same Location. */ + location: { + /** + * Format: int64 + * @description ID of the Location. + * @example 42 + */ + id: number; + /** + * @description Unique identifier of the [Location](#locations). + * @example fsn1 + */ + name: string; + /** + * @description Human readable description of the [Location](#locations). + * @example Falkenstein DC Park 1 + */ + description: string; + /** + * @description Country the [Location](#locations) resides in. + * + * ISO 3166-1 alpha-2 code of the country. + * + * @example DE + */ + country: string; + /** + * @description Name of the closest city to the [Location](#locations). + * + * City name or city name and state in short form. E.g. `Falkenstein` or `Ashburn, VA`. + * + * @example Falkenstein + */ + city: string; + /** + * Format: double + * @description Latitude of the city closest to the [Location](#locations). + * @example 50.47612 + */ + latitude: number; + /** + * Format: double + * @description Longitude of the city closest to the [Location](#locations). + * @example 12.370071 + */ + longitude: number; + /** + * @description Name of the Network Zone this [Location](#locations) resides in. + * @example eu-central + */ + network_zone: string; + }; + /** + * @description Size in GB of the Volume. + * @example 42 + */ + size: number; + /** + * @description Device path on the file system for the Volume. + * @example /dev/disk/by-id/scsi-0HC_Volume_4711 + */ + linux_device: string; + /** @description Protection configuration for the Resource. */ + protection: { + /** + * @description Prevent the Resource from being deleted. + * @example false + */ + delete: boolean; + }; + /** + * @description User-defined labels (`key/value` pairs) for the Resource. + * For more information, see "[Labels](#labels)". + * + * @example { + * "environment": "prod", + * "example.com/my": "label", + * "just-a-key": "" + * } + */ + labels: { + [key: string]: string; + }; + /** + * @description Status of the Volume. + * @example available + * @enum {string} + */ + status: "available" | "creating"; + /** + * @description Filesystem of the Volume if formatted on creation, null if not formatted on creation. + * @example xfs + */ + format: string | null; + }; + }; + }; + }; + }; + }; + delete_volume: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Volume deleted. */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; + list_volume_actions: { + parameters: { + query?: { + /** @description Sort actions by field and direction. Can be used multiple times. For more + * information, see "[Sorting](#sorting)". + * */ + sort?: "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"; + /** @description Filter the actions by status. Can be used multiple times. The response will only + * contain actions matching the specified statuses. + * */ + status?: "running" | "success" | "error"; + /** @description Page number to return. For more information, see "[Pagination](#pagination)". */ + page?: number; + /** @description Maximum number of entries returned per page. For more information, see "[Pagination](#pagination)". */ + per_page?: number; + }; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `actions` key contains a list of Actions. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "actions": [ + * { + * "id": 13, + * "command": "attach_volume", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 13, + * "type": "volume" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * ], + * "meta": { + * "pagination": { + * "page": 1, + * "per_page": 25, + * "previous_page": null, + * "next_page": null, + * "last_page": 1, + * "total_entries": 21 + * } + * } + * } */ + "application/json": { + actions: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }[]; + /** ListMeta */ + meta: { + /** @description See "[Pagination](#pagination)" for more information. */ + pagination: { + /** + * Format: int64 + * @description Current page number. + * @example 3 + */ + page: number; + /** + * Format: int64 + * @description Maximum number of entries returned per page. + * @example 25 + */ + per_page: number; + /** + * Format: int64 + * @description Page number of the previous page. Can be null if the current page is the first one. + * @example 2 + */ + previous_page: number | null; + /** + * Format: int64 + * @description Page number of the next page. Can be null if the current page is the last one. + * @example 4 + */ + next_page: number | null; + /** + * Format: int64 + * @description Page number of the last page available. Can be null if the current page is the last one. + * @example 4 + */ + last_page: number | null; + /** + * Format: int64 + * @description Total number of entries that exist for this query. Can be null if unknown. + * @example 100 + */ + total_entries: number | null; + }; + }; + }; + }; + }; + }; + }; + attach_volume: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * Format: int64 + * @description ID of the Server the Volume will be attached to. + * @example 43 + */ + server: number; + /** + * @description Auto-mount the Volume after attaching it. + * @example false + */ + automount?: boolean; + }; + }; + }; + responses: { + /** @description The `action` key contains the `attach_volume` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "attach_volume", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 43, + * "type": "server" + * }, + * { + * "id": 554, + * "type": "volume" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + change_volume_protection: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description If true, prevents the Volume from being deleted. + * @example true + */ + delete?: boolean; + }; + }; + }; + responses: { + /** @description The `action` key contains the `change_protection` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "change_protection", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * }, + * { + * "id": 554, + * "type": "volume" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + detach_volume: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the `detach_volume` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "detach_volume", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + resize_volume: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description New Volume size in GB (must be greater than current size). + * @example 50 + */ + size: number; + }; + }; + }; + responses: { + /** @description The `action` key contains the `resize_volume` Action. */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "resize_volume", + * "status": "running", + * "progress": 0, + * "started": "2016-01-30T23:50:00+00:00", + * "finished": null, + * "resources": [ + * { + * "id": 554, + * "type": "volume" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; + get_volume_action: { + parameters: { + query?: never; + header?: never; + path: { + /** @description ID of the Volume. */ + id: number; + /** @description ID of the Action. */ + action_id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description The `action` key contains the Volume Action. */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + /** @example { + * "action": { + * "id": 13, + * "command": "attach_volume", + * "status": "success", + * "progress": 100, + * "started": "2016-01-30T23:55:00+00:00", + * "finished": "2016-01-30T23:56:00+00:00", + * "resources": [ + * { + * "id": 42, + * "type": "server" + * } + * ], + * "error": { + * "code": "action_failed", + * "message": "Action failed" + * } + * } + * } */ + "application/json": { + /** Action */ + action: { + /** + * Format: int64 + * @description ID of the Action. + * @example 42 + */ + id: number; + /** + * @description Command executed in the Action. + * @example start_resource + */ + command: string; + /** + * @description Status of the Action. + * @enum {string} + */ + status: "running" | "success" | "error"; + /** + * @description Point in time when the Action was started (in ISO-8601 format). + * @example 2016-01-30T23:55:00+00:00 + */ + started: string; + /** + * @description Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null. + * @example 2016-01-30T23:55:00+00:00 + */ + finished: string | null; + /** + * Format: int32 + * @description Progress of the Action in percent. + * @example 100 + */ + progress: number; + /** @description Resources the Action relates to. */ + resources: { + /** + * Format: int64 + * @description ID of the Resource. + * @example 42 + */ + id: number; + /** + * @description Type of the Resource. + * @example server + */ + type: string; + }[]; + /** @description Error message for the Action if an error occurred, otherwise null. */ + error: { + /** + * @description Fixed error code for machines. + * @example action_failed + */ + code: string; + /** + * @description Error message for humans. + * @example Action failed + */ + message: string; + } | null; + }; + }; + }; + }; + }; + }; +} diff --git a/packages/server/src/types/hostinger-types.ts b/packages/server/src/types/hostinger-types.ts new file mode 100644 index 000000000..91cc5dcbc --- /dev/null +++ b/packages/server/src/types/hostinger-types.ts @@ -0,0 +1,5377 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/api/billing/v1/catalog": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get catalog item list + * @description This endpoint retrieves a list of catalog items available for order. + * + * Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`. + */ + get: operations["billing_getCatalogItemListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/billing/v1/orders": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create new service order + * @deprecated + * @description This endpoint creates a new service order. + * + * **DEPRECATED** + * + * To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. + * + * To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. + * + * + * To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. + * Coupons also can be provided during order creation. + * + * Orders created using this endpoint will be set for automatic renewal. + * + * Some `credit_card` payments might need additional verification, rendering purchase unprocessed. + * We recommend use other payment methods than `credit_card` if you encounter this issue. + */ + post: operations["billing_createNewServiceOrderV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/billing/v1/payment-methods/{paymentMethodId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Set default payment method + * @description This endpoint sets default payment method for your account. + */ + post: operations["billing_setDefaultPaymentMethodV1"]; + /** + * Delete payment method + * @description This endpoint deletes a payment method from your account. + */ + delete: operations["billing_deletePaymentMethodV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/billing/v1/payment-methods": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get payment method list + * @description This endpoint retrieves a list of available payment methods that can be used for placing new orders. + * + * If you want to add new payment method, please use [hPanel](https://hpanel.hostinger.com/billing/payment-methods). + */ + get: operations["billing_getPaymentMethodListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/billing/v1/subscriptions/{subscriptionId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Cancel subscription + * @description This endpoint cancels a subscription and stops any further billing. + */ + delete: operations["billing_cancelSubscriptionV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/billing/v1/subscriptions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get subscription list + * @description This endpoint retrieves a list of all subscriptions associated with your account. + */ + get: operations["billing_getSubscriptionListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dns/v1/snapshots/{domain}/{snapshotId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get snapshot + * @description This endpoint retrieves particular DNS snapshot with the contents of DNS zone records. + */ + get: operations["DNS_getSnapshotV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dns/v1/snapshots/{domain}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get snapshot list + * @description This endpoint retrieves list of DNS snapshots. + */ + get: operations["DNS_getSnapshotListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dns/v1/snapshots/{domain}/{snapshotId}/restore": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Restore snapshot + * @description This endpoint restores DNS zone to the selected snapshot. + */ + post: operations["DNS_restoreSnapshotV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dns/v1/zones/{domain}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get records + * @description This endpoint retrieves DNS zone records for a specific domain. + */ + get: operations["DNS_getRecordsV1"]; + /** + * Update zone records + * @description This endpoint updates DNS records for the selected domain. + * + * Using `overwrite = true` will replace existing records with the provided ones. + * Otherwise existing records will be updated and new records will be added. + */ + put: operations["DNS_updateZoneRecordsV1"]; + post?: never; + /** + * Delete zone records + * @description This endpoint deletes DNS records for the selected domain. + * To filter which records to delete, add the `name` of the record and `type` to the filter. + * Multiple filters can be provided with single request. + * + * If you have multiple records with the same name and type, and you want to delete only part of them, + * refer to the `Update zone records` endpoint. + */ + delete: operations["DNS_deleteZoneRecordsV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dns/v1/zones/{domain}/reset": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Reset zone records + * @description This endpoint resets DNS zone to the default records. + */ + post: operations["DNS_resetZoneRecordsV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/dns/v1/zones/{domain}/validate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Validate zone records + * @description This endpoint used to validate DNS records prior update for the selected domain. + * + * If the validation is successful, the response will contain `200 Success` code. + * If there is validation error, the response will fail with `422 Validation error` code. + */ + post: operations["DNS_validateZoneRecordsV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/availability": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Check domain availability + * @description This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. + * If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. + * TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). + * + * Endpoint has rate limit of 10 requests per minute. + */ + post: operations["domains_checkDomainAvailabilityV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/forwarding/{domain}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get forwarding data + * @description This endpoint retrieves domain forwarding data. + */ + get: operations["domains_getForwardingDataV1"]; + put?: never; + post?: never; + /** + * Delete forwarding data + * @description This endpoint deletes domain forwarding data. + */ + delete: operations["domains_deleteForwardingDataV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/forwarding": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create forwarding data + * @description This endpoint creates domain forwarding data. + */ + post: operations["domains_createForwardingDataV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/portfolio/{domain}/domain-lock": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Enable domain lock + * @description This endpoint enables domain lock for the domain. When domain lock is enabled, + * the domain cannot be transferred to another registrar without first disabling the lock. + */ + put: operations["domains_enableDomainLockV1"]; + post?: never; + /** + * Disable domain lock + * @description This endpoint disables domain lock for the domain. Domain lock needs to be disabled + * before transferring the domain to another registrar. + */ + delete: operations["domains_disableDomainLockV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/portfolio/{domain}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get domain + * @description This endpoint retrieves details for specified domain. + */ + get: operations["domains_getDomainV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/portfolio": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get domain list + * @description This endpoint retrieves a list of all domains associated with your account. + */ + get: operations["domains_getDomainListV1"]; + put?: never; + /** + * Purchase new domain + * @description This endpoint allows you to buy (purchase) and register a new domain name. + * + * If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. + * + * If no payment method is provided, your default payment method will be used automatically. + * + * If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. + * Before making a request, ensure that WHOIS information for the desired TLD exists in your account. + * + * Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD. + */ + post: operations["domains_purchaseNewDomainV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/portfolio/{domain}/privacy-protection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Enable privacy protection + * @description This endpoint enables privacy protection for the domain. + * When privacy protection is enabled, the domain owner's personal information is hidden from the public WHOIS database. + */ + put: operations["domains_enablePrivacyProtectionV1"]; + post?: never; + /** + * Disable privacy protection + * @description This endpoint disables privacy protection for the domain. + * When privacy protection is disabled, the domain owner's personal information is visible in the public WHOIS database. + */ + delete: operations["domains_disablePrivacyProtectionV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/portfolio/{domain}/nameservers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update nameservers + * @description This endpoint sets the nameservers for a specified domain. + * + * Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable. + */ + put: operations["domains_updateNameserversV1"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/whois/{whoisId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get WHOIS profile + * @description This endpoint retrieves a WHOIS contact profile. + */ + get: operations["domains_getWHOISProfileV1"]; + put?: never; + post?: never; + /** + * Delete WHOIS profile + * @description This endpoint deletes WHOIS contact profile. + */ + delete: operations["domains_deleteWHOISProfileV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/whois": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get WHOIS profile list + * @description This endpoint retrieves a list of WHOIS contact profiles. + */ + get: operations["domains_getWHOISProfileListV1"]; + put?: never; + /** + * Create WHOIS profile + * @description This endpoint creates WHOIS contact profile. + */ + post: operations["domains_createWHOISProfileV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/domains/v1/whois/{whoisId}/usage": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get WHOIS profile usage + * @description This endpoint retrieves a domain list where provided WHOIS contact profile is used. + */ + get: operations["domains_getWHOISProfileUsageV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/data-centers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get data centers list + * @description This endpoint retrieves a list of all data centers available. + */ + get: operations["VPS_getDataCentersListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall/{firewallId}/activate/{virtualMachineId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Activate firewall + * @description This endpoint activates a firewall for a specified virtual machine. + * + * Only one firewall can be active for a virtual machine at a time. + */ + post: operations["VPS_activateFirewallV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall/{firewallId}/deactivate/{virtualMachineId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Deactivate firewall + * @description This endpoint deactivates a firewall for a specified virtual machine. + */ + post: operations["VPS_deactivateFirewallV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall/{firewallId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get firewall + * @description This endpoint retrieves firewall by its ID and rules associated with it. + */ + get: operations["VPS_getFirewallV1"]; + put?: never; + post?: never; + /** + * Delete firewall + * @description This endpoint deletes a specified firewall. + * + * Any virtual machine that has this firewall activated will automatically have it deactivated. + */ + delete: operations["VPS_deleteFirewallV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get firewall list + * @description This endpoint retrieves a list of all firewalls available. + */ + get: operations["VPS_getFirewallListV1"]; + put?: never; + /** + * Create new firewall + * @description This endpoint creates a new firewall. + */ + post: operations["VPS_createNewFirewallV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall/{firewallId}/rules/{ruleId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update firewall rule + * @description This endpoint updates a specific firewall rule from a specified firewall. + * + * Any virtual machine that has this firewall activated will loose sync with the firewall and will have to be synced again manually. + */ + put: operations["VPS_updateFirewallRuleV1"]; + post?: never; + /** + * Delete firewall rule + * @description This endpoint deletes a specific firewall rule from a specified firewall. + * + * Any virtual machine that has this firewall activated will loose sync with the firewall and will have to be synced again manually. + */ + delete: operations["VPS_deleteFirewallRuleV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall/{firewallId}/rules": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create firewall rule + * @description This endpoint creates new firewall rule from a specified firewall. + * By default, the firewall drops all incoming traffic, which means you must add accept rules for all ports you want to use. + * + * Any virtual machine that has this firewall activated will loose sync with the firewall and will have to be synced again manually. + */ + post: operations["VPS_createFirewallRuleV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/firewall/{firewallId}/sync/{virtualMachineId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Sync firewall + * @description This endpoint syncs a firewall for a specified virtual machine. + * + * Firewall can loose sync with virtual machine if the firewall has new rules added, removed or updated. + */ + post: operations["VPS_syncFirewallV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/post-install-scripts/{postInstallScriptId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get post-install script + * @description This endpoint retrieves post-install script by its ID. + */ + get: operations["VPS_getPostInstallScriptV1"]; + /** + * Update post-install script + * @description This endpoint updates a specific post-install script. + */ + put: operations["VPS_updatePostInstallScriptV1"]; + post?: never; + /** + * Delete a post-install script + * @description This endpoint deletes a post-install script from your account. + */ + delete: operations["VPS_deleteAPostInstallScriptV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/post-install-scripts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get post-install script list + * @description This endpoint retrieves a list of post-install scripts associated with your account. + */ + get: operations["VPS_getPostInstallScriptListV1"]; + put?: never; + /** + * Create post-install script + * @description This endpoint allows you to add a new post-install script to your account, + * which can then be used run after the installation of a virtual machine instance. + * + * The script contents will be saved to the file `/post_install` with executable attribute set and will be executed once virtual machine is installed. + * The output of the script will be redirected to `/post_install.log`. Maximum script size is 48KB. + */ + post: operations["VPS_createPostInstallScriptV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/public-keys/attach/{virtualMachineId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Attach public key + * @description This endpoint attaches an existing public keys from your account to a specified virtual machine. + * + * Multiple keys can be attached to a single virtual machine. + */ + post: operations["VPS_attachPublicKeyV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/public-keys/{publicKeyId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete a public key + * @description This endpoint deletes a public key from your account. + * + * **Deleting public key from account does not remove it from virtual machine** + */ + delete: operations["VPS_deleteAPublicKeyV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/public-keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get public key list + * @description This endpoint retrieves a list of public keys associated with your account. + */ + get: operations["VPS_getPublicKeyListV1"]; + put?: never; + /** + * Create new public key + * @description This endpoint allows you to add a new public key to your account, + * which can then be attached to virtual machine instances for secure access. + */ + post: operations["VPS_createNewPublicKeyV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/templates/{templateId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get template + * @description This endpoint retrieves details of a specific OS template for virtual machines. + */ + get: operations["VPS_getTemplateV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/templates": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get template list + * @description This endpoint retrieves a list of available OS templates for virtual machines. + */ + get: operations["VPS_getTemplateListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/actions/{actionId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get action + * @description This endpoint retrieves details of a specific action performed on a specified virtual machine. + * + * This endpoint allows you to view detailed information about a particular action, including the action name, timestamp, and status. + */ + get: operations["VPS_getActionV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/actions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get action list + * @description This endpoint retrieves a list of actions performed on a specified virtual machine. + * + * Actions are operations or events that have been executed on the virtual machine, such as starting, stopping, or modifying + * the machine. This endpoint allows you to view the history of these actions, providing details about each action, + * such as the action name, timestamp, and status. + */ + get: operations["VPS_getActionListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/public-keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get attached public keys + * @description This endpoint retrieves a list of public keys attached to a specified virtual machine. + */ + get: operations["VPS_getAttachedPublicKeysV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/backups/{backupId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete backup + * @description This endpoint deletes a specified backup for a virtual machine. + */ + delete: operations["VPS_deleteBackupV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/backups": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get backup list + * @description This endpoint retrieves a list of backups for a specified virtual machine. + */ + get: operations["VPS_getBackupListV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/backups/{backupId}/restore": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Restore backup + * @description This endpoint restores a backup for a specified virtual machine. + * + * The system will then initiate the restore process, which may take some time depending on the size of the backup. + * + * **All data on the virtual machine will be overwritten with the data from the backup.** + */ + post: operations["VPS_restoreBackupV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/hostname": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Set hostname + * @description This endpoint sets the hostname for a specified virtual machine. + * Changing hostname does not update PTR record automatically. + * If you want your virtual machine to be reachable by a hostname, + * you need to point your domain A/AAAA records to virtual machine IP as well. + */ + put: operations["VPS_setHostnameV1"]; + post?: never; + /** + * Reset hostname + * @description This endpoint resets the hostname and PTR record of a specified virtual machine to the default value. + */ + delete: operations["VPS_resetHostnameV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get virtual machine + * @description This endpoint retrieves detailed information about a specified virtual machine. + */ + get: operations["VPS_getVirtualMachineV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get virtual machine list + * @description This endpoint retrieves a list of all available virtual machines. + */ + get: operations["VPS_getVirtualMachineListV1"]; + put?: never; + /** + * Purchase new virtual machine + * @description This endpoint allows you to buy (purchase) and setup a new virtual machine. + * + * If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. + * + * If no payment method is provided, your default payment method will be used automatically. + */ + post: operations["VPS_purchaseNewVirtualMachineV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/monarx": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get scan metrics + * @description This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine. + * The scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, + * detected threats, and other relevant statistics. This information is useful for monitoring the security status of the + * virtual machine and assessing the effectiveness of the malware scanner. + */ + get: operations["VPS_getScanMetricsV1"]; + put?: never; + /** + * Install Monarx + * @description This endpoint installs the Monarx malware scanner on a specified virtual machine. + * + * [Monarx](https://www.monarx.com/) is a security tool designed to detect and prevent malware infections on virtual machines. + * By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software. + */ + post: operations["VPS_installMonarxV1"]; + /** + * Uninstall Monarx + * @description This endpoint uninstalls the Monarx malware scanner on a specified virtual machine. + * If Monarx is not installed, the request will still be processed without any effect. + */ + delete: operations["VPS_uninstallMonarxV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/metrics": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get metrics + * @description This endpoint retrieves the historical metrics for a specified virtual machine. + * It includes the following metrics: + * - CPU usage + * - Memory usage + * - Disk usage + * - Network usage + * - Uptime + */ + get: operations["VPS_getMetricsV1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/nameservers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Set nameservers + * @description This endpoint sets the nameservers for a specified virtual machine. + * Be aware, that improper nameserver configuration can lead to the virtual machine being unable to resolve domain names. + */ + put: operations["VPS_setNameserversV1"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/ptr": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create PTR record + * @description This endpoint creates or updates a PTR (Pointer) record for a specified virtual machine. + */ + post: operations["VPS_createPTRRecordV1"]; + /** + * Delete PTR record + * @description This endpoint deletes a PTR (Pointer) record for a specified virtual machine. + * + * Once deleted, reverse DNS lookups to the virtual machine's IP address will no longer return the previously configured hostname. + */ + delete: operations["VPS_deletePTRRecordV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/panel-password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Set panel password + * @description This endpoint sets the panel password for a specified virtual machine. + * If virtual machine does not use panel OS, the request will still be processed without any effect. + * Requirements for the password is the same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate). + */ + put: operations["VPS_setPanelPasswordV1"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/recovery": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Start recovery mode + * @description This endpoint initiates the recovery mode for a specified virtual machine. + * Recovery mode is a special state that allows users to perform system rescue operations, + * such as repairing file systems, recovering data, or troubleshooting issues that prevent the virtual machine + * from booting normally. + * + * Virtual machine will boot recovery disk image and original disk image will be mounted in `/mnt` directory. + */ + post: operations["VPS_startRecoveryModeV1"]; + /** + * Stop recovery mode + * @description This endpoint stops the recovery mode for a specified virtual machine. + * If virtual machine is not in recovery mode, this operation will fail. + */ + delete: operations["VPS_stopRecoveryModeV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/recreate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Recreate virtual machine + * @description This endpoint will recreate a virtual machine from scratch. + * The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. + * Snapshots, if there are any, will be deleted. + * + * ## Password Requirements + * Password will be checked against leaked password databases. + * Requirements for the password are: + * - At least 8 characters long + * - At least one uppercase letter + * - At least one lowercase letter + * - At least one number + * - Is not leaked publicly + * + * **This operation is irreversible and will result in the loss of all data stored on the virtual machine!** + */ + post: operations["VPS_recreateVirtualMachineV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/restart": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Restart virtual machine + * @description This endpoint restarts a specified virtual machine. This is equivalent to fully stopping and starting the virtual machine. + * If the virtual machine was stopped, it will be started. + */ + post: operations["VPS_restartVirtualMachineV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/root-password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Set root password + * @description This endpoint sets the root password for a specified virtual machine. + * Requirements for the password is the same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate). + */ + put: operations["VPS_setRootPasswordV1"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/setup": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Setup new virtual machine + * @description This endpoint will setup newly purchased virtual machine with `initial` state. + */ + post: operations["VPS_setupNewVirtualMachineV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get snapshot + * @description This endpoint retrieves a snapshot for a specified virtual machine. + */ + get: operations["VPS_getSnapshotV1"]; + put?: never; + /** + * Create snapshot + * @description This endpoint creates a snapshot of a specified virtual machine. + * A snapshot captures the state and data of the virtual machine at a specific point in time, + * allowing users to restore the virtual machine to that state if needed. + * This operation is useful for backup purposes, system recovery, + * and testing changes without affecting the current state of the virtual machine. + * + * **Creating new snapshot will overwrite the existing snapshot!** + */ + post: operations["VPS_createSnapshotV1"]; + /** + * Delete snapshot + * @description This endpoint deletes a snapshot of a specified virtual machine. + */ + delete: operations["VPS_deleteSnapshotV1"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot/restore": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Restore snapshot + * @description This endpoint restores a specified virtual machine to a previous state using a snapshot. + * Restoring from a snapshot allows users to revert the virtual machine to that state, which is useful for system recovery, undoing changes, or testing. + */ + post: operations["VPS_restoreSnapshotV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/start": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Start virtual machine + * @description This endpoint starts a specified virtual machine. + * If the virtual machine is already running, the request will still be processed without any effect. + */ + post: operations["VPS_startVirtualMachineV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/vps/v1/virtual-machines/{virtualMachineId}/stop": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Stop virtual machine + * @description This endpoint stops a specified virtual machine. + * If the virtual machine is already stopped, the request will still be processed without any effect. + */ + post: operations["VPS_stopVirtualMachineV1"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + "Common.Schema.PaginationMetaSchema": { + /** @example 1 */ + current_page?: number; + /** @example 15 */ + per_page?: number; + /** @example 100 */ + total?: number; + }; + "Billing.V1.Order.StoreRequest": { + /** + * @description Payment method ID + * @example 517244 + */ + payment_method_id: number; + items: { + /** + * @description Price Item ID + * @example hostingercom-vps-kvm2-usd-1m + */ + item_id: string; + /** @example 1 */ + quantity: number; + }[]; + /** @description Discount coupon codes */ + coupons?: unknown[]; + }; + "Billing.V1.Subscription.CancelRequest": { + /** + * @description Cancellation reason code + * @example other + * @enum {string|null} + */ + reason_code?: "other" | null; + /** + * @description Cancellation option + * @example immediately + * @enum {string|null} + */ + cancel_option?: "immediately" | null; + }; + "DNS.V1.Zone.DestroyRequest": { + /** @description Filter records for deletion */ + filters: { + /** + * @description Name of the record + * @example @ + */ + name: string; + /** + * @description Type of the record + * @example A + * @enum {string} + */ + type: + | "A" + | "AAAA" + | "CNAME" + | "ALIAS" + | "MX" + | "TXT" + | "NS" + | "SOA" + | "SRV" + | "CAA"; + }[]; + }; + "DNS.V1.Zone.ResetRequest": { + /** + * @description Determines if operation should be run synchronously + * @default true + * @example true + */ + sync: boolean; + /** + * @description Determines if email records should be reset + * @default true + * @example true + */ + reset_email_records: boolean; + /** + * @description Specifies which record types to not reset + * @example [ + * "MX", + * "TXT" + * ] + */ + whitelisted_record_types?: string[]; + }; + "DNS.V1.Zone.UpdateRequest": { + /** + * @description If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created. + * @default true + * @example true + */ + overwrite: boolean; + zone: { + /** + * @description Name of the record (use `@` for wildcard name) + * @example www + */ + name: string; + /** @description Records assigned to the name */ + records: { + /** + * @description Content of the name record + * @example mydomain.tld. + */ + content: string; + }[]; + /** + * @description TTL (Time-To-Live) of the record + * @example 14400 + */ + ttl?: number; + /** + * @description Type of the record + * @example A + * @enum {string} + */ + type: + | "A" + | "AAAA" + | "CNAME" + | "ALIAS" + | "MX" + | "TXT" + | "NS" + | "SOA" + | "SRV" + | "CAA"; + }[]; + }; + "Domains.V1.Availability.AvailabilityRequest": { + /** + * @description Domain name (without TLD) + * @example mydomain + */ + domain: string; + /** + * @description TLDs list + * @example [ + * "com", + * "net", + * "org" + * ] + */ + tlds: string[]; + /** + * @description Should response include alternatives + * @default false + * @example true + */ + with_alternatives: boolean; + }; + "Domains.V1.Forwarding.StoreRequest": { + /** + * @description Domain name + * @example mydomain.tld + */ + domain: string; + /** + * @description Redirect type + * @example 301 + * @enum {string} + */ + redirect_type: "301" | "302"; + /** + * @description URL to forward domain to + * @example https://forward.to.my.url + */ + redirect_url: string; + }; + "Domains.V1.Portfolio.PurchaseRequest": { + /** + * @description Domain name + * @example my-new-domain.tld + */ + domain: string; + /** + * @description Catalog price item ID + * @example hostingercom-domain-com-usd-1y + */ + item_id: string; + /** + * @description Payment method ID, default will be used if not provided + * @example 1327362 + */ + payment_method_id?: number; + /** @description Domain contact information */ + domain_contacts?: { + /** + * @description Owner contact WHOIS record ID + * @example 741288 + */ + owner_id?: number; + /** + * @description Administrative contact WHOIS record ID + * @example 546123 + */ + admin_id?: number; + /** + * @description Billing contact WHOIS record ID + * @example 741288 + */ + billing_id?: number; + /** + * @description Technical contact WHOIS record ID + * @example 741288 + */ + tech_id?: number; + }; + /** @description Additional registration data, possible values depends on TLD */ + additional_details?: Record; + /** @description Discount coupon codes */ + coupons?: unknown[]; + }; + "Domains.V1.Portfolio.UpdateNameserversRequest": { + /** + * @description First name server + * @example ns1.some-nameserver.tld + */ + ns1: string; + /** + * @description Second name server + * @example ns2.some-nameserver.tld + */ + ns2: string; + /** + * @description Third name server + * @example ns3.some-nameserver.tld + */ + ns3?: string; + /** + * @description Fourth name server + * @example ns4.some-nameserver.tld + */ + ns4?: string; + }; + "Domains.V1.WHOIS.StoreRequest": { + /** + * @description TLD of the domain (without leading dot) + * @example com + */ + tld: string; + /** + * @description ISO 3166 2-letter country code + * @example NL + */ + country: string; + /** + * @description Legal entity type + * @example individual + * @enum {string} + */ + entity_type: "individual" | "organization"; + /** @description TLD details */ + tld_details?: Record; + /** @description WHOIS details */ + whois_details: Record; + }; + "VPS.V1.Firewall.Rules.StoreRequest": { + /** + * @example TCP + * @enum {string} + */ + protocol: + | "TCP" + | "UDP" + | "ICMP" + | "GRE" + | "any" + | "ESP" + | "AH" + | "ICMPv6" + | "SSH" + | "HTTP" + | "HTTPS" + | "MySQL" + | "PostgreSQL"; + /** + * @description Port or port range, ex: 1024:2048 + * @example 443 + */ + port: string; + /** + * @example any + * @enum {string} + */ + source: "any" | "custom"; + /** + * @description IP range, CIDR, single IP or `any` + * @example 351.15.24.0/24 + */ + source_detail: string; + }; + "VPS.V1.Firewall.StoreRequest": { + /** @example My Firewall Group */ + name: string; + }; + "VPS.V1.PostInstallScript.StoreRequest": { + /** + * @description Name of the script + * @example My Script + */ + name: string; + /** + * @description Content of the script + * @example #!/bin/bash + * + * echo 'Hello, World!' + */ + content: string; + }; + "VPS.V1.PublicKey.AttachRequest": { + /** + * @description Public Key IDs to attach + * @example [ + * 18232, + * 10230230 + * ] + */ + ids: number[]; + }; + "VPS.V1.PublicKey.StoreRequest": { + /** @example My Public Key */ + name: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD... */ + key: string; + }; + "VPS.V1.VirtualMachine.HostnameUpdateRequest": { + /** @example my.server.tld */ + hostname: string; + }; + "VPS.V1.VirtualMachine.MetricGetRequest": { + /** + * Format: date-time + * @example 2025-05-01T00:00:00Z + */ + date_from: string; + /** + * Format: date-time + * @example 2025-06-01T00:00:00Z + */ + date_to: string; + }; + "VPS.V1.VirtualMachine.NameserversUpdateRequest": { + /** @example 4.3.2.1 */ + ns1: string; + /** @example 1.2.3.4 */ + ns2?: string; + }; + "VPS.V1.VirtualMachine.PanelPasswordUpdateRequest": { + /** + * Format: password + * @description Panel password for the virtual machine + * @example oMeNRustosIO + */ + password: string; + }; + "VPS.V1.VirtualMachine.PurchaseRequest": { + /** + * @description Catalog price item ID + * @example hostingercom-vps-kvm2-usd-1m + */ + item_id: string; + /** + * @description Payment method ID, default will be used if not provided + * @example 1327362 + */ + payment_method_id?: number; + setup: components["schemas"]["VPS.V1.VirtualMachine.SetupRequest"]; + /** @description Discount coupon codes */ + coupons?: unknown[]; + }; + "VPS.V1.VirtualMachine.Recovery.StartRequest": { + /** + * @description Temporary root password for recovery mode + * @example oMeNRustosIO + */ + root_password: string; + }; + "VPS.V1.VirtualMachine.RecreateRequest": { + /** + * @description Template ID + * @example 1130 + */ + template_id: number; + /** + * Format: password + * @description Password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response. + * @example oMeNRustosIO + */ + password?: string; + /** + * @description Post-install script ID + * @example 6324 + */ + post_install_script_id?: number; + }; + "VPS.V1.VirtualMachine.RootPasswordUpdateRequest": { + /** + * Format: password + * @description Root password for the virtual machine + * @example oMeNRustosIO + */ + password: string; + }; + "VPS.V1.VirtualMachine.SetupRequest": { + /** + * @description Template ID + * @example 1130 + */ + template_id: number; + /** + * @description Data center ID + * @example 19 + */ + data_center_id: number; + /** + * @description Post-install script ID + * @example 6324 + */ + post_install_script_id?: number; + /** + * Format: password + * @description Password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response. + * @example oMeNRustosIO + */ + password?: string; + /** + * @description Override default hostname of the virtual machine + * @example my.server.tld + */ + hostname?: string; + /** + * @description Install Monarx malware scanner (if supported) + * @default false + * @example false + */ + install_monarx: boolean; + /** + * @description Enable weekly backup schedule + * @default true + * @example true + */ + enable_backups: boolean; + /** + * @description Name server 1 + * @example 4.3.2.1 + */ + ns1?: string; + /** + * @description Name server 2 + * @example 1.2.3.4 + */ + ns2?: string; + /** @description Use SSH key */ + public_key?: { + /** + * @description Name of the SSH key + * @example my-key + */ + name?: string; + /** + * @description Contents of the SSH key + * @example ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC2X... + */ + key?: string; + }; + }; + /** @description Array of [`Billing.V1.Catalog.CatalogItemResource`](#model/billingv1catalogcatalogitemresource) */ + "Billing.V1.Catalog.CatalogItemCollection": components["schemas"]["Billing.V1.Catalog.CatalogItemResource"][]; + /** @description Array of [`Billing.V1.Catalog.CatalogItemPriceResource`](#model/billingv1catalogcatalogitempriceresource) */ + "Billing.V1.Catalog.CatalogItemPriceCollection": components["schemas"]["Billing.V1.Catalog.CatalogItemPriceResource"][]; + "Billing.V1.Catalog.CatalogItemPriceResource": { + /** + * @description Price item ID + * @example hostingercom-vps-kvm2-usd-1m + */ + id?: string; + /** + * @description Price item name + * @example KVM 2 (billed every month) + */ + name?: string; + /** + * @description Currency code + * @example USD + */ + currency?: string; + /** + * @description Price in cents + * @example 1799 + */ + price?: number; + /** + * @description First period price in cents + * @example 899 + */ + first_period_price?: number; + /** + * @description Period + * @example 1 + */ + period?: number; + /** + * @description Period unit + * @example day + * @enum {string} + */ + period_unit?: "day" | "week" | "month" | "year" | "none"; + }; + "Billing.V1.Catalog.CatalogItemResource": { + /** + * @description Catalog item ID + * @example hostingercom-vps-kvm2 + */ + id?: string; + /** @example KVM 2 */ + name?: string; + /** @example VPS */ + category?: string; + /** + * @description Flexible key-value storage containing category-specific metadata for the catalog item. The structure and available fields vary depending on the item category. + * @example { + * "field": "value" + * } + */ + metadata?: Record | null; + prices?: components["schemas"]["Billing.V1.Catalog.CatalogItemPriceCollection"]; + }; + "Billing.V1.Order.OrderBillingAddressResource": { + /** @example John */ + first_name?: string; + /** @example Doe */ + last_name?: string; + /** @example null */ + company?: string | null; + /** @example null */ + address_1?: string | null; + /** @example null */ + address_2?: string | null; + /** @example null */ + city?: string | null; + /** @example null */ + state?: string | null; + /** @example null */ + zip?: string | null; + /** @example NL */ + country?: string | null; + /** @example null */ + phone?: string | null; + /** @example john@doe.tld */ + email?: string; + }; + "Billing.V1.Order.OrderResource": { + /** + * @description Order ID + * @example 2957086 + */ + id?: number; + /** + * @description Subscription ID + * @example Azz353Uhl1xC54pR0 + */ + subscription_id?: string; + /** + * @example completed + * @enum {string} + */ + status?: + | "completed" + | "pending" + | "processing" + | "failed" + | "refunded" + | "cancelled" + | "awaiting_payment" + | "payment_initiated" + | "fraud_refund"; + /** + * @description Currency code + * @example USD + */ + currency?: string; + /** + * @description Subtotal price (exc. VAT) in cents + * @example 899 + */ + subtotal?: number; + /** + * @description Total price (inc. VAT) in cents + * @example 1088 + */ + total?: number; + billing_address?: components["schemas"]["Billing.V1.Order.OrderBillingAddressResource"]; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + updated_at?: string; + }; + "Billing.V1.Order.VirtualMachineOrderResource": { + order?: components["schemas"]["Billing.V1.Order.OrderResource"]; + virtual_machine?: components["schemas"]["VPS.V1.VirtualMachine.VirtualMachineResource"]; + }; + /** @description Array of [`Billing.V1.PaymentMethod.PaymentMethodResource`](#model/billingv1paymentmethodpaymentmethodresource) */ + "Billing.V1.PaymentMethod.PaymentMethodCollection": components["schemas"]["Billing.V1.PaymentMethod.PaymentMethodResource"][]; + "Billing.V1.PaymentMethod.PaymentMethodResource": { + /** + * @description Payment method ID + * @example 6523 + */ + id?: number; + /** @example Credit Card */ + name?: string; + /** @example 1234*****6464 */ + identifier?: string; + /** @example card */ + payment_method?: string; + /** @example true */ + is_default?: boolean; + /** @example false */ + is_expired?: boolean; + /** @example false */ + is_suspended?: boolean; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + expires_at?: string; + }; + /** @description Array of [`Billing.V1.Subscription.SubscriptionResource`](#model/billingv1subscriptionsubscriptionresource) */ + "Billing.V1.Subscription.SubscriptionCollection": components["schemas"]["Billing.V1.Subscription.SubscriptionResource"][]; + "Billing.V1.Subscription.SubscriptionResource": { + /** + * @description Subscription ID + * @example Azz36nUfKX1S1MSF + */ + id?: string; + /** @example KVM 1 */ + name?: string; + /** + * @example active + * @enum {string} + */ + status?: + | "active" + | "paused" + | "cancelled" + | "not_renewing" + | "transferred" + | "in_trial" + | "future"; + /** @example 1 */ + billing_period?: number; + /** @example day */ + billing_period_unit?: string; + /** @example USD */ + currency_code?: string; + /** + * @description Total price in cents + * @example 1799 + */ + total_price?: number; + /** + * @description Renewal price in cents + * @example 1799 + */ + renewal_price?: number; + /** @example true */ + is_auto_renewed?: boolean; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + expires_at?: string | null; + /** + * Format: date-time + * @example 2025-02-28T11:54:22Z + */ + next_billing_at?: string | null; + }; + "Common.SuccessEmptyResource": { + /** @example Request accepted */ + message?: string; + }; + /** @description Array of [`DNS.V1.Snapshot.SnapshotResource`](#model/dnsv1snapshotsnapshotresource) */ + "DNS.V1.Snapshot.SnapshotCollection": components["schemas"]["DNS.V1.Snapshot.SnapshotResource"][]; + "DNS.V1.Snapshot.SnapshotResource": { + /** + * @description Snapshot ID + * @example 5341 + */ + id?: number; + /** + * @description Reason of the update + * @example Zone records update request + */ + reason?: string; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + }; + "DNS.V1.Snapshot.SnapshotWithContentResource": { + /** + * @description Snapshot ID + * @example 5341 + */ + id?: number; + /** + * @description Reason of the update + * @example Zone records update request + */ + reason?: string; + snapshot?: components["schemas"]["DNS.V1.Zone.RecordCollection"]; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + }; + /** @description Array of [`DNS.V1.Zone.NameRecordResource`](#model/dnsv1zonenamerecordresource) */ + "DNS.V1.Zone.NameRecordCollection": components["schemas"]["DNS.V1.Zone.NameRecordResource"][]; + "DNS.V1.Zone.NameRecordResource": { + /** + * @description Content of the name record + * @example mydomain.tld. + */ + content?: string; + /** + * @description Flag to mark name record as disabled + * @example false + */ + is_disabled?: boolean; + }; + /** @description Array of [`DNS.V1.Zone.RecordResource`](#model/dnsv1zonerecordresource) */ + "DNS.V1.Zone.RecordCollection": components["schemas"]["DNS.V1.Zone.RecordResource"][]; + "DNS.V1.Zone.RecordResource": { + /** + * @description Name of the record (use `@` for wildcard name) + * @example www + */ + name?: string; + records?: components["schemas"]["DNS.V1.Zone.NameRecordCollection"]; + /** + * @description TTL (Time-To-Live) of the record + * @example 14400 + */ + ttl?: number; + /** + * @description Type of the record + * @example A + * @enum {string} + */ + type?: + | "A" + | "AAAA" + | "CNAME" + | "ALIAS" + | "MX" + | "TXT" + | "NS" + | "SOA" + | "SRV" + | "CAA"; + }; + /** @description Array of [`Domains.V1.Availability.AvailabilityResource`](#model/domainsv1availabilityavailabilityresource) */ + "Domains.V1.Availability.AvailabilityCollection": components["schemas"]["Domains.V1.Availability.AvailabilityResource"][]; + "Domains.V1.Availability.AvailabilityResource": { + /** + * @description Domain name, `null` when not claimed free domain + * @example mydomain.tld + */ + domain?: string | null; + /** + * @description `true` if domain is available for registration + * @example true + */ + is_available?: boolean; + /** + * @description `true` if domain is provided as an alternative + * @example false + */ + is_alternative?: boolean; + /** @description Special rules and/or restrictions applied for registering TLD */ + restriction?: string | null; + }; + /** @description Array of [`Domains.V1.Domain.DomainResource`](#model/domainsv1domaindomainresource) */ + "Domains.V1.Domain.DomainCollection": components["schemas"]["Domains.V1.Domain.DomainResource"][]; + "Domains.V1.Domain.DomainExtendedResource": { + /** + * @description Domain name + * @example mydomain.tld + */ + domain?: string; + /** + * @description Status of the domain + * @example active + * @enum {string} + */ + status?: + | "active" + | "pending_setup" + | "expired" + | "requested" + | "pending_verification"; + message?: string | null; + /** + * @description Is privacy protection allowed for the domain + * @example true + */ + is_privacy_protection_allowed?: boolean; + /** + * @description Is privacy protection enabled for the domain + * @example false + */ + is_privacy_protected?: boolean; + /** + * @description Is domain allowed to be locked + * @example true + */ + is_lockable?: boolean; + /** + * @description Is domain locked + * @example true + */ + is_locked?: boolean; + /** + * @description Name servers + * @example { + * "ns1": "ns1.example.tld", + * "ns2": "ns2.example.tld" + * } + */ + name_servers?: { + /** + * @description Name server 1 + * @example ns1.example.tld + */ + ns1?: string; + /** + * @description Name server 2 + * @example ns2.example.tld + */ + ns2?: string; + }; + /** + * @description Child name servers + * @example { + * "ns1.example.tld": [ + * "258.231.55.321", + * "258.231.55.322" + * ] + * } + */ + child_name_servers?: string[][]; + /** @description WHOIS profiles */ + domain_contacts?: { + /** + * @description Admin WHOIS profile ID + * @example 114698 + */ + admin_id?: number; + /** + * @description Owner WHOIS profile ID + * @example 614698 + */ + owner_id?: number; + /** + * @description Billing WHOIS profile ID + * @example 154698 + */ + billing_id?: number; + /** + * @description Technician WHOIS profile ID + * @example 524248 + */ + tech_id?: number; + }; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + updated_at?: string; + /** + * Format: date-time + * @example 2025-04-27T11:54:22Z + */ + "60_days_lock_expires_at"?: string | null; + /** + * Format: date-time + * @example 2025-02-27T12:54:22Z + */ + registered_at?: string | null; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + expires_at?: string | null; + }; + "Domains.V1.Domain.DomainResource": { + /** + * @description Domain ID + * @example 13632 + */ + id?: number; + /** + * @description Domain name, `null` when not claimed free domain + * @example mydomain.tld + */ + domain?: string | null; + /** + * @example domain + * @enum {string} + */ + type?: "domain" | "free_domain"; + /** + * @example active + * @enum {string} + */ + status?: + | "active" + | "pending_setup" + | "expired" + | "requested" + | "pending_verification"; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + expires_at?: string | null; + }; + "Domains.V1.Forwarding.ForwardingResource": { + /** + * @description Domain name + * @example mydomain.tld + */ + domain?: string | null; + /** + * @description Redirect type + * @example 301 + * @enum {string} + */ + redirect_type?: "301" | "302"; + /** + * @description URL domain is forwarded to + * @example https://forward.to.my.url + */ + redirect_url?: string; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + updated_at?: string | null; + }; + /** @description Array of [`Domains.V1.WHOIS.ProfileResource`](#model/domainsv1whoisprofileresource) */ + "Domains.V1.WHOIS.ProfileCollection": components["schemas"]["Domains.V1.WHOIS.ProfileResource"][]; + "Domains.V1.WHOIS.ProfileResource": { + /** + * @description WHOIS Profile ID + * @example 746263 + */ + id?: number; + /** + * @description TLD to which contact profile can be applied to + * @example com + */ + tld?: string; + /** + * @description ISO 3166 2-letter country code + * @example NL + */ + country?: string; + /** + * @description WHOIS profile entity type + * @example individual + * @enum {string} + */ + entity_type?: "individual" | "organization"; + /** + * @description WHOIS profile details + * @example { + * "first_name": "John", + * "last_name": "Doe", + * "email": "john@doe.tld" + * } + */ + whois_details?: Record; + /** @description TLD details */ + tld_details?: Record; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-19T11:54:22Z + */ + updated_at?: string; + }; + /** + * @description Array of domains + * @example [ + * "mydomain1.tld", + * "mydomain2.tld" + * ] + */ + "Domains.V1.WHOIS.ProfileUsageResource": string[]; + /** @description Array of [`VPS.V1.Action.ActionResource`](#model/vpsv1actionactionresource) */ + "VPS.V1.Action.ActionCollection": components["schemas"]["VPS.V1.Action.ActionResource"][]; + "VPS.V1.Action.ActionResource": { + /** + * @description Action ID + * @example 8123712 + */ + id?: number; + /** + * @description Action name + * @example action_name + */ + name?: string; + /** + * @description Action state + * @example success + * @enum {string} + */ + state?: "success" | "error" | "delayed" | "sent" | "created"; + /** + * Format: date-time + * @example 2025-02-27T11:54:00Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-02-27T11:58:00Z + */ + updated_at?: string; + }; + /** @description Array of [`VPS.V1.Backup.BackupResource`](#model/vpsv1backupbackupresource) */ + "VPS.V1.Backup.BackupCollection": components["schemas"]["VPS.V1.Backup.BackupResource"][]; + "VPS.V1.Backup.BackupResource": { + /** + * @description Backup ID + * @example 325 + */ + id?: number; + /** + * @description Location of the backup + * @example nl-srv-openvzbackups + */ + location?: string; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + }; + /** @description Array of [`VPS.V1.DataCenter.DataCenterResource`](#model/vpsv1datacenterdatacenterresource) */ + "VPS.V1.DataCenter.DataCenterCollection": components["schemas"]["VPS.V1.DataCenter.DataCenterResource"][]; + "VPS.V1.DataCenter.DataCenterResource": { + /** + * @description Data center ID + * @example 29 + */ + id?: number; + /** + * @description Data center name + * @example phx + */ + name?: string | null; + /** + * @description Data center location country (two letter code) + * @example us + */ + location?: string | null; + /** + * @description Data center location city + * @example Phoenix + */ + city?: string | null; + /** + * @description Data center location continent + * @example North America + */ + continent?: string | null; + }; + /** @description Array of [`VPS.V1.Firewall.FirewallResource`](#model/vpsv1firewallfirewallresource) */ + "VPS.V1.Firewall.FirewallCollection": components["schemas"]["VPS.V1.Firewall.FirewallResource"][]; + "VPS.V1.Firewall.FirewallResource": { + /** + * @description Firewall ID + * @example 65224 + */ + id?: number; + /** + * @description Firewall name + * @example HTTP and SSH only + */ + name?: string; + /** + * @description Is current firewall synced with VPS + * @example false + */ + is_synced?: boolean; + rules?: components["schemas"]["VPS.V1.Firewall.FirewallRuleCollection"]; + /** + * Format: date-time + * @example 2021-09-01T12:00:00Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2021-09-01T12:00:00Z + */ + updated_at?: string; + }; + /** @description Array of [`VPS.V1.Firewall.FirewallRuleResource`](#model/vpsv1firewallfirewallruleresource) */ + "VPS.V1.Firewall.FirewallRuleCollection": components["schemas"]["VPS.V1.Firewall.FirewallRuleResource"][]; + "VPS.V1.Firewall.FirewallRuleResource": { + /** + * @description Firewall rule ID + * @example 24541 + */ + id?: number; + /** + * @description Firewall rule action + * @example accept + * @enum {string} + */ + action?: "accept" | "drop"; + /** + * @description Firewall rule protocol + * @example TCP + * @enum {string} + */ + protocol?: + | "TCP" + | "UDP" + | "ICMP" + | "GRE" + | "any" + | "ESP" + | "AH" + | "ICMPv6" + | "SSH" + | "HTTP" + | "HTTPS" + | "MySQL" + | "PostgreSQL"; + /** + * @description Firewall rule destination port: single or port range + * @example 1024:2048 + */ + port?: string; + /** + * @description Firewall rule source. Can be `any` or `custom` + * @example any + */ + source?: string; + /** + * @description Firewall rule source detail. Can be `any` or IP address, CIDR or range + * @example any + */ + source_detail?: string; + }; + /** @description Array of [`VPS.V1.IPAddress.IPAddressResource`](#model/vpsv1ipaddressipaddressresource) */ + "VPS.V1.IPAddress.IPAddressCollection": components["schemas"]["VPS.V1.IPAddress.IPAddressResource"][]; + "VPS.V1.IPAddress.IPAddressResource": { + /** + * @description IP address ID + * @example 52347 + */ + id?: number; + /** + * @description IP address: IPv4 or IPv6 + * @example 213.331.273.15 + */ + address?: string; + /** + * @description IP address PTR record + * @example something.domain.tld + */ + ptr?: string | null; + }; + "VPS.V1.Malware.MetricsResource": { + /** + * @description Records found during last scan + * @example 1 + */ + records?: number; + /** + * @description Malicious files found during last scan + * @example 2 + */ + malicious?: number; + /** + * @description Compromised files found during last scan + * @example 3 + */ + compromised?: number; + /** + * @description Total number of files scanned during last scan + * @example 193218 + */ + scanned_files?: number; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + scan_started_at?: string; + /** + * Format: date-time + * @example 2025-03-27T11:54:22Z + */ + scan_ended_at?: string | null; + }; + "VPS.V1.Metrics.MetricsCollection": { + /** + * @description CPU usage in percentage, 0 - 100% + * @example { + * "unit": "%", + * "usage": { + * "1742269632": 1.45 + * } + * } + */ + cpu_usage?: + | components["schemas"]["VPS.V1.Metrics.MetricsResource"] + | null; + /** + * @description RAM usage in bytes + * @example { + * "unit": "bytes", + * "usage": { + * "1742269632": 554176512 + * } + * } + */ + ram_usage?: + | components["schemas"]["VPS.V1.Metrics.MetricsResource"] + | null; + /** + * @description Disk space usage in bytes + * @example { + * "unit": "bytes", + * "usage": { + * "1742269632": 2620018688 + * } + * } + */ + disk_space?: + | components["schemas"]["VPS.V1.Metrics.MetricsResource"] + | null; + /** + * @description Outgoing traffic in bytes + * @example { + * "unit": "bytes", + * "usage": { + * "1742269632": 784800 + * } + * } + */ + outgoing_traffic?: + | components["schemas"]["VPS.V1.Metrics.MetricsResource"] + | null; + /** + * @description Incoming traffic in bytes + * @example { + * "unit": "bytes", + * "usage": { + * "1742269632": 8978400 + * } + * } + */ + incoming_traffic?: + | components["schemas"]["VPS.V1.Metrics.MetricsResource"] + | null; + /** + * @description Uptime in milliseconds + * @example { + * "unit": "milliseconds", + * "usage": { + * "1742269632": 455248 + * } + * } + */ + uptime?: components["schemas"]["VPS.V1.Metrics.MetricsResource"] | null; + }; + "VPS.V1.Metrics.MetricsResource": { + /** + * @description Measurement unit + * @example measurement-unit + */ + unit?: string; + /** + * @description Object, containing UNIX timestamps as a key and measurement as a value. + * @example { + * "timestamp": 123 + * } + */ + usage?: Record; + }; + /** @description Array of [`VPS.V1.PostInstallScript.PostInstallScriptResource`](#model/vpsv1postinstallscriptpostinstallscriptresource) */ + "VPS.V1.PostInstallScript.PostInstallScriptCollection": components["schemas"]["VPS.V1.PostInstallScript.PostInstallScriptResource"][]; + "VPS.V1.PostInstallScript.PostInstallScriptResource": { + /** + * @description Post-install script ID + * @example 325 + */ + id?: number; + /** + * @description Name of the script + * @example My Setup Script + */ + name?: string; + /** + * @description Content of the script + * @example #!/bin/bash\napt-get update\napt-get install -y nginx + */ + content?: string; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-19T11:54:22Z + */ + updated_at?: string; + }; + /** @description Array of [`VPS.V1.PublicKey.PublicKeyResource`](#model/vpsv1publickeypublickeyresource) */ + "VPS.V1.PublicKey.PublicKeyCollection": components["schemas"]["VPS.V1.PublicKey.PublicKeyResource"][]; + "VPS.V1.PublicKey.PublicKeyResource": { + /** + * @description Public key ID + * @example 325 + */ + id?: number; + /** + * @description Public key name + * @example My public key + */ + name?: string; + /** + * @description Public key content + * @example ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD... + */ + key?: string; + }; + "VPS.V1.Snapshot.SnapshotResource": { + /** + * @description Snapshot ID + * @example 325 + */ + id?: number; + /** + * Format: date-time + * @example 2025-02-27T11:54:22Z + */ + created_at?: string; + /** + * Format: date-time + * @example 2025-03-19T11:54:22Z + */ + expires_at?: string; + }; + /** @description Array of [`VPS.V1.Template.TemplateResource`](#model/vpsv1templatetemplateresource) */ + "VPS.V1.Template.TemplateCollection": components["schemas"]["VPS.V1.Template.TemplateResource"][]; + "VPS.V1.Template.TemplateResource": { + /** + * @description Template ID + * @example 6523 + */ + id?: number; + /** + * @description Template name + * @example Ubuntu 20.04 LTS + */ + name?: string; + /** + * @description Template description + * @example Ubuntu 20.04 LTS + */ + description?: string; + /** + * @description Link to official OS documentation + * @example https://docs.ubuntu.com + */ + documentation?: string | null; + }; + /** @description Array of [`VPS.V1.VirtualMachine.VirtualMachineResource`](#model/vpsv1virtualmachinevirtualmachineresource) */ + "VPS.V1.VirtualMachine.VirtualMachineCollection": components["schemas"]["VPS.V1.VirtualMachine.VirtualMachineResource"][]; + "VPS.V1.VirtualMachine.VirtualMachineResource": { + /** + * @description Virtual machine ID + * @example 17923 + */ + id?: number; + /** + * @description Active firewall ID, `null` if disabled + * @example null + */ + firewall_group_id?: number | null; + /** + * @description Subscription ID + * @example Azz353Uhl1xC54pR0 + */ + subscription_id?: string | null; + /** + * @description VPS plan name + * @example KVM 4 + */ + plan?: string | null; + /** @example srv17923.hstgr.cloud */ + hostname?: string; + /** + * @example running + * @enum {string} + */ + state?: + | "running" + | "starting" + | "stopping" + | "stopped" + | "creating" + | "initial" + | "error" + | "suspending" + | "unsuspending" + | "suspended" + | "destroying" + | "destroyed" + | "recreating" + | "restoring" + | "recovery" + | "stopping_recovery"; + /** + * @example unlocked + * @enum {string} + */ + actions_lock?: "unlocked" | "locked"; + /** + * @description CPUs count assigned to virtual machine + * @example 4 + */ + cpus?: number; + /** + * @description Memory available to virtual machine (in megabytes) + * @example 8192 + */ + memory?: number; + /** + * @description Virtual machine disk size (in megabytes) + * @example 51200 + */ + disk?: number; + /** + * @description Monthly internet traffic available to virtual machine (in megabytes) + * @example 1073741824 + */ + bandwidth?: number; + /** + * @description Primary DNS resolver + * @example 1.1.1.1 + */ + ns1?: string | null; + /** + * @description Secondary DNS resolver + * @example 8.8.8.8 + */ + ns2?: string | null; + /** @description IPv4 address of virtual machine */ + ipv4?: + | components["schemas"]["VPS.V1.IPAddress.IPAddressCollection"] + | null; + /** @description IPv6 address of virtual machine, `null` if not assigned */ + ipv6?: + | components["schemas"]["VPS.V1.IPAddress.IPAddressCollection"] + | null; + /** @description OS template installed in virtual machine */ + template?: + | components["schemas"]["VPS.V1.Template.TemplateResource"] + | null; + /** + * Format: date-time + * @example 2024-09-05T07:25:36.00000Z + */ + created_at?: string; + }; + }; + responses: { + /** @description Error response */ + "Common.Response.ErrorResponse": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** + * @description Message of the error + * @example Error message + */ + message?: string; + /** + * @description Request correlation ID + * @example 26a91bd9-f8c8-4a83-9df9-83e23d696fe3 + */ + correlation_id?: string; + }; + }; + }; + /** @description Unauthenticated response */ + "Common.Response.UnauthorizedResponse": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** + * @description Message of the error + * @example Unauthenticated + */ + message?: string; + /** + * @description Request correlation ID + * @example 26a91bd9-f8c8-4a83-9df9-83e23d696fe3 + */ + correlation_id?: string; + }; + }; + }; + /** @description Validation error response */ + "Common.Response.UnprocessableContentResponse": { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** + * @description Validation error message + * @example The name field is required. (and 1 more error) + */ + message?: string; + /** @description Object of detailed errors for each field */ + errors?: { + /** @example [ + * "The field_1 field is required.", + * "The field_1 must be a number." + * ] */ + field_1?: unknown[]; + /** @example [ + * "The field_2 field is required.", + * "The field_2 must be a string." + * ] */ + field_2?: unknown[]; + }; + /** + * @description Request correlation ID + * @example 26a91bd9-f8c8-4a83-9df9-83e23d696fe3 + */ + correlation_id?: string; + }; + }; + }; + }; + parameters: { + /** @description Filter catalog items by category */ + category: "DOMAIN" | "VPS"; + /** @description Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain */ + name: string; + /** @description Payment method ID */ + paymentMethodId: number; + /** @description Subscription ID */ + subscriptionId: string; + /** @description Domain name */ + domain: string; + /** @description Page number */ + page: number; + /** @description Snapshot ID */ + snapshotId: number; + /** @description Filter by TLD (without leading dot) */ + tld: string; + /** @description WHOIS ID */ + whoisId: number; + /** @description Token ID */ + tokenId: number; + /** @description Action ID */ + actionId: number; + /** @description Backup ID */ + backupId: number; + /** @description Firewall ID */ + firewallId: number; + /** @description Firewall Rule ID */ + ruleId: number; + /** @description Post-install script ID */ + postInstallScriptId: number; + /** @description Public Key ID */ + publicKeyId: number; + /** @description Template ID */ + templateId: number; + /** @description Virtual Machine ID */ + virtualMachineId: number; + }; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + billing_getCatalogItemListV1: { + parameters: { + query?: { + /** @description Filter catalog items by category */ + category?: components["parameters"]["category"]; + /** @description Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain */ + name?: components["parameters"]["name"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Billing.V1.Catalog.CatalogItemCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + billing_createNewServiceOrderV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Billing.V1.Order.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Billing.V1.Order.OrderResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + billing_setDefaultPaymentMethodV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Payment method ID */ + paymentMethodId: components["parameters"]["paymentMethodId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + billing_deletePaymentMethodV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Payment method ID */ + paymentMethodId: components["parameters"]["paymentMethodId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + billing_getPaymentMethodListV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Billing.V1.PaymentMethod.PaymentMethodCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + billing_cancelSubscriptionV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Subscription ID */ + subscriptionId: components["parameters"]["subscriptionId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Billing.V1.Subscription.CancelRequest"]; + }; + }; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + billing_getSubscriptionListV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Billing.V1.Subscription.SubscriptionCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_getSnapshotV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + /** @description Snapshot ID */ + snapshotId: components["parameters"]["snapshotId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DNS.V1.Snapshot.SnapshotWithContentResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_getSnapshotListV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DNS.V1.Snapshot.SnapshotCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_restoreSnapshotV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + /** @description Snapshot ID */ + snapshotId: components["parameters"]["snapshotId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_getRecordsV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["DNS.V1.Zone.RecordCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_updateZoneRecordsV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DNS.V1.Zone.UpdateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_deleteZoneRecordsV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DNS.V1.Zone.DestroyRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_resetZoneRecordsV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DNS.V1.Zone.ResetRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + DNS_validateZoneRecordsV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DNS.V1.Zone.UpdateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_checkDomainAvailabilityV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Domains.V1.Availability.AvailabilityRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.Availability.AvailabilityCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_getForwardingDataV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.Forwarding.ForwardingResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_deleteForwardingDataV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_createForwardingDataV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Domains.V1.Forwarding.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.Forwarding.ForwardingResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_enableDomainLockV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_disableDomainLockV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_getDomainV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.Domain.DomainExtendedResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_getDomainListV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.Domain.DomainCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_purchaseNewDomainV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Domains.V1.Portfolio.PurchaseRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Billing.V1.Order.OrderResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_enablePrivacyProtectionV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_disablePrivacyProtectionV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_updateNameserversV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Domain name */ + domain: components["parameters"]["domain"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Domains.V1.Portfolio.UpdateNameserversRequest"]; + }; + }; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_getWHOISProfileV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description WHOIS ID */ + whoisId: components["parameters"]["whoisId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.WHOIS.ProfileResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_deleteWHOISProfileV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description WHOIS ID */ + whoisId: components["parameters"]["whoisId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_getWHOISProfileListV1: { + parameters: { + query?: { + /** @description Filter by TLD (without leading dot) */ + tld?: components["parameters"]["tld"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.WHOIS.ProfileCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_createWHOISProfileV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["Domains.V1.WHOIS.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.WHOIS.ProfileResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + domains_getWHOISProfileUsageV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description WHOIS ID */ + whoisId: components["parameters"]["whoisId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Domains.V1.WHOIS.ProfileUsageResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getDataCentersListV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.DataCenter.DataCenterCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_activateFirewallV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deactivateFirewallV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getFirewallV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.FirewallResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deleteFirewallV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getFirewallListV1: { + parameters: { + query?: { + /** @description Page number */ + page?: components["parameters"]["page"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["VPS.V1.Firewall.FirewallCollection"]; + meta?: components["schemas"]["Common.Schema.PaginationMetaSchema"]; + }; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_createNewFirewallV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.FirewallResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_updateFirewallRuleV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + /** @description Firewall Rule ID */ + ruleId: components["parameters"]["ruleId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.Rules.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.FirewallRuleResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deleteFirewallRuleV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + /** @description Firewall Rule ID */ + ruleId: components["parameters"]["ruleId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_createFirewallRuleV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.Rules.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Firewall.FirewallRuleResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_syncFirewallV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Firewall ID */ + firewallId: components["parameters"]["firewallId"]; + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getPostInstallScriptV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Post-install script ID */ + postInstallScriptId: components["parameters"]["postInstallScriptId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.PostInstallScript.PostInstallScriptResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_updatePostInstallScriptV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Post-install script ID */ + postInstallScriptId: components["parameters"]["postInstallScriptId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.PostInstallScript.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.PostInstallScript.PostInstallScriptResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deleteAPostInstallScriptV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Post-install script ID */ + postInstallScriptId: components["parameters"]["postInstallScriptId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getPostInstallScriptListV1: { + parameters: { + query?: { + /** @description Page number */ + page?: components["parameters"]["page"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["VPS.V1.PostInstallScript.PostInstallScriptCollection"]; + meta?: components["schemas"]["Common.Schema.PaginationMetaSchema"]; + }; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_createPostInstallScriptV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.PostInstallScript.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.PostInstallScript.PostInstallScriptResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_attachPublicKeyV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.PublicKey.AttachRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deleteAPublicKeyV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Public Key ID */ + publicKeyId: components["parameters"]["publicKeyId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getPublicKeyListV1: { + parameters: { + query?: { + /** @description Page number */ + page?: components["parameters"]["page"]; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["VPS.V1.PublicKey.PublicKeyCollection"]; + meta?: components["schemas"]["Common.Schema.PaginationMetaSchema"]; + }; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_createNewPublicKeyV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.PublicKey.StoreRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.PublicKey.PublicKeyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getTemplateV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Template ID */ + templateId: components["parameters"]["templateId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Template.TemplateResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getTemplateListV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Template.TemplateCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getActionV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + /** @description Action ID */ + actionId: components["parameters"]["actionId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getActionListV1: { + parameters: { + query?: { + /** @description Page number */ + page?: components["parameters"]["page"]; + }; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["VPS.V1.Action.ActionCollection"]; + meta?: components["schemas"]["Common.Schema.PaginationMetaSchema"]; + }; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getAttachedPublicKeysV1: { + parameters: { + query?: { + /** @description Page number */ + page?: components["parameters"]["page"]; + }; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["VPS.V1.PublicKey.PublicKeyCollection"]; + meta?: components["schemas"]["Common.Schema.PaginationMetaSchema"]; + }; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deleteBackupV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + /** @description Backup ID */ + backupId: components["parameters"]["backupId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success empty response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Common.SuccessEmptyResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getBackupListV1: { + parameters: { + query?: { + /** @description Page number */ + page?: components["parameters"]["page"]; + }; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + data?: components["schemas"]["VPS.V1.Backup.BackupCollection"]; + meta?: components["schemas"]["Common.Schema.PaginationMetaSchema"]; + }; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_restoreBackupV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + /** @description Backup ID */ + backupId: components["parameters"]["backupId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_setHostnameV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.HostnameUpdateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_resetHostnameV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.VirtualMachineResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getVirtualMachineListV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.VirtualMachineCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_purchaseNewVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.PurchaseRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Billing.V1.Order.VirtualMachineOrderResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getScanMetricsV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Malware.MetricsResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_installMonarxV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_uninstallMonarxV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getMetricsV1: { + parameters: { + query: { + date_from: string; + date_to: string; + }; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Metrics.MetricsCollection"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_setNameserversV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.NameserversUpdateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_createPTRRecordV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deletePTRRecordV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_setPanelPasswordV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.PanelPasswordUpdateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_startRecoveryModeV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.Recovery.StartRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_stopRecoveryModeV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_recreateVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.RecreateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_restartVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_setRootPasswordV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.RootPasswordUpdateRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_setupNewVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.SetupRequest"]; + }; + }; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.VirtualMachine.VirtualMachineResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 422: components["responses"]["Common.Response.UnprocessableContentResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_getSnapshotV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Snapshot.SnapshotResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_createSnapshotV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_deleteSnapshotV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_restoreSnapshotV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_startVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; + VPS_stopVirtualMachineV1: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Virtual Machine ID */ + virtualMachineId: components["parameters"]["virtualMachineId"]; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Success response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["VPS.V1.Action.ActionResource"]; + }; + }; + 401: components["responses"]["Common.Response.UnauthorizedResponse"]; + 500: components["responses"]["Common.Response.ErrorResponse"]; + }; + }; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ad02cc282..90a03307b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -515,6 +515,9 @@ importers: memfs: specifier: ^4.17.2 version: 4.17.2 + openapi-typescript: + specifier: 7.8.0 + version: 7.8.0(typescript@5.8.3) tailwindcss: specifier: ^3.4.17 version: 3.4.17 @@ -705,6 +708,9 @@ importers: ollama-ai-provider: specifier: ^1.2.0 version: 1.2.0(zod@3.25.32) + openapi-fetch: + specifier: 0.14.0 + version: 0.14.0 otpauth: specifier: ^9.4.0 version: 9.4.0 @@ -3091,6 +3097,16 @@ packages: peerDependencies: '@redis/client': ^1.0.0 + '@redocly/ajv@8.11.2': + resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} + + '@redocly/config@0.22.2': + resolution: {integrity: sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==} + + '@redocly/openapi-core@1.34.3': + resolution: {integrity: sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==} + engines: {node: '>=18.17.0', npm: '>=9.5.0'} + '@rollup/rollup-android-arm-eabi@4.41.1': resolution: {integrity: sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==} cpu: [arm] @@ -3652,6 +3668,10 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -3676,6 +3696,10 @@ packages: ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + ansi-escapes@7.0.0: resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} engines: {node: '>=18'} @@ -3908,6 +3932,9 @@ packages: resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} + character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -4018,6 +4045,9 @@ packages: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} + colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -4851,6 +4881,10 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} @@ -4898,6 +4932,10 @@ packages: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} + index-to-position@1.1.0: + resolution: {integrity: sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==} + engines: {node: '>=18'} + inflation@2.1.0: resolution: {integrity: sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==} engines: {node: '>= 0.8.0'} @@ -5072,6 +5110,10 @@ packages: js-file-download@0.4.12: resolution: {integrity: sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==} + js-levenshtein@1.1.6: + resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} + engines: {node: '>=0.10.0'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -5520,6 +5562,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimatch@7.4.6: resolution: {integrity: sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==} engines: {node: '>=10'} @@ -5774,6 +5820,9 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} + openapi-fetch@0.14.0: + resolution: {integrity: sha512-PshIdm1NgdLvb05zp8LqRQMNSKzIlPkyMxYFxwyHR+UlKD4t2nUjkDhNxeRbhRSEd3x5EUNh2w5sJYwkhOH4fg==} + openapi-path-templating@2.2.1: resolution: {integrity: sha512-eN14VrDvl/YyGxxrkGOHkVkWEoPyhyeydOUrbvjoz8K5eIGgELASwN1eqFOJ2CTQMGCy2EntOK1KdtJ8ZMekcg==} engines: {node: '>=12.20.0'} @@ -5785,6 +5834,15 @@ packages: openapi-types@12.1.3: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} + openapi-typescript-helpers@0.0.15: + resolution: {integrity: sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==} + + openapi-typescript@7.8.0: + resolution: {integrity: sha512-1EeVWmDzi16A+siQlo/SwSGIT7HwaFAVjvMA7/jG5HMLSnrUOzPL7uSTRZZa4v/LCRxHTApHKtNY6glApEoiUQ==} + hasBin: true + peerDependencies: + typescript: ^5.x + otpauth@9.4.0: resolution: {integrity: sha512-fHIfzIG5RqCkK9cmV8WU+dPQr9/ebR5QOwGZn2JAr1RQF+lmAuLL2YdtdqvmBjNmgJlYk3KZ4a0XokaEhg1Jsw==} @@ -5833,6 +5891,10 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} + parse-json@8.3.0: + resolution: {integrity: sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==} + engines: {node: '>=18'} + parseley@0.12.1: resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} @@ -5927,6 +5989,10 @@ packages: resolution: {integrity: sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==} engines: {node: '>=12'} + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + pngjs@5.0.0: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} @@ -6641,6 +6707,10 @@ packages: resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==} engines: {node: '>=16'} + supports-color@10.0.0: + resolution: {integrity: sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==} + engines: {node: '>=18'} + supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -6826,6 +6896,10 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -6895,6 +6969,9 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + uri-js-replace@1.0.1: + resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==} + url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} @@ -7120,6 +7197,9 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + yaml@2.8.0: resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==} engines: {node: '>= 14.6'} @@ -9259,6 +9339,29 @@ snapshots: dependencies: '@redis/client': 1.6.0 + '@redocly/ajv@8.11.2': + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js-replace: 1.0.1 + + '@redocly/config@0.22.2': {} + + '@redocly/openapi-core@1.34.3(supports-color@10.0.0)': + dependencies: + '@redocly/ajv': 8.11.2 + '@redocly/config': 0.22.2 + colorette: 1.4.0 + https-proxy-agent: 7.0.6(supports-color@10.0.0) + js-levenshtein: 1.1.6 + js-yaml: 4.1.0 + minimatch: 5.1.6 + pluralize: 8.0.0 + yaml-ast-parser: 0.0.43 + transitivePeerDependencies: + - supports-color + '@rollup/rollup-android-arm-eabi@4.41.1': optional: true @@ -10053,10 +10156,12 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) transitivePeerDependencies: - supports-color + agent-base@7.1.4: {} + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 @@ -10090,6 +10195,8 @@ snapshots: dependencies: string-width: 4.2.3 + ansi-colors@4.1.3: {} + ansi-escapes@7.0.0: dependencies: environment: 1.1.0 @@ -10354,6 +10461,8 @@ snapshots: chalk@5.4.1: {} + change-case@5.4.4: {} + character-entities-html4@2.1.0: {} character-entities-legacy@1.1.4: {} @@ -10475,6 +10584,8 @@ snapshots: color-string: 1.9.1 optional: true + colorette@1.4.0: {} + colorette@2.0.20: {} combined-stream@1.0.8: @@ -10641,9 +10752,11 @@ snapshots: dateformat@4.6.3: {} - debug@4.4.1: + debug@4.4.1(supports-color@10.0.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 10.0.0 decamelize@1.2.0: {} @@ -10717,7 +10830,7 @@ snapshots: docker-modem@5.0.6: dependencies: - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) readable-stream: 3.6.2 split-ca: 1.0.1 ssh2: 1.15.0 @@ -10854,7 +10967,7 @@ snapshots: esbuild-register@3.6.0(esbuild@0.19.12): dependencies: - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) esbuild: 0.19.12 transitivePeerDependencies: - supports-color @@ -11099,7 +11212,7 @@ snapshots: gel@2.1.0: dependencies: '@petamoriken/float16': 3.9.2 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) env-paths: 3.0.0 semver: 7.7.2 shell-quote: 1.8.2 @@ -11317,7 +11430,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6(supports-color@10.0.0): + dependencies: + agent-base: 7.1.4 + debug: 4.4.1(supports-color@10.0.0) transitivePeerDependencies: - supports-color @@ -11354,6 +11474,8 @@ snapshots: indent-string@5.0.0: {} + index-to-position@1.1.0: {} + inflation@2.1.0: {} inflight@1.0.6: @@ -11384,7 +11506,7 @@ snapshots: dependencies: '@ioredis/commands': 1.2.0 cluster-key-slot: 1.1.2 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) denque: 2.1.0 lodash.defaults: 4.2.0 lodash.isarguments: 3.1.0 @@ -11499,6 +11621,8 @@ snapshots: js-file-download@0.4.12: {} + js-levenshtein@1.1.6: {} + js-tokens@4.0.0: {} js-tokens@9.0.1: {} @@ -11698,7 +11822,7 @@ snapshots: dependencies: chalk: 5.4.1 commander: 13.1.0 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) execa: 8.0.1 lilconfig: 3.1.3 listr2: 8.3.3 @@ -12047,7 +12171,7 @@ snapshots: micromark@4.0.2: dependencies: '@types/debug': 4.1.12 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) decode-named-character-reference: 1.1.0 devlop: 1.1.0 micromark-core-commonmark: 2.0.3 @@ -12095,6 +12219,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + minimatch@7.4.6: dependencies: brace-expansion: 2.0.1 @@ -12338,6 +12466,10 @@ snapshots: dependencies: mimic-function: 5.0.1 + openapi-fetch@0.14.0: + dependencies: + openapi-typescript-helpers: 0.0.15 + openapi-path-templating@2.2.1: dependencies: apg-lite: 1.0.4 @@ -12348,6 +12480,18 @@ snapshots: openapi-types@12.1.3: {} + openapi-typescript-helpers@0.0.15: {} + + openapi-typescript@7.8.0(typescript@5.8.3): + dependencies: + '@redocly/openapi-core': 1.34.3(supports-color@10.0.0) + ansi-colors: 4.1.3 + change-case: 5.4.4 + parse-json: 8.3.0 + supports-color: 10.0.0 + typescript: 5.8.3 + yargs-parser: 21.1.1 + otpauth@9.4.0: dependencies: '@noble/hashes': 1.7.1 @@ -12408,6 +12552,12 @@ snapshots: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + parse-json@8.3.0: + dependencies: + '@babel/code-frame': 7.27.1 + index-to-position: 1.1.0 + type-fest: 4.41.0 + parseley@0.12.1: dependencies: leac: 0.6.0 @@ -12502,6 +12652,8 @@ snapshots: dependencies: queue-lit: 1.5.2 + pluralize@8.0.0: {} + pngjs@5.0.0: {} postcss-import@15.1.0(postcss@8.5.3): @@ -13255,6 +13407,8 @@ snapshots: dependencies: copy-anything: 3.0.5 + supports-color@10.0.0: {} + supports-preserve-symlinks-flag@1.0.0: {} swagger-client@3.35.3: @@ -13498,6 +13652,8 @@ snapshots: type-fest@2.19.0: {} + type-fest@4.41.0: {} + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -13571,6 +13727,8 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + uri-js-replace@1.0.1: {} + url-parse@1.5.10: dependencies: querystringify: 2.2.0 @@ -13635,7 +13793,7 @@ snapshots: vite-node@1.6.1(@types/node@18.19.104): dependencies: cac: 6.7.14 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) pathe: 1.1.2 picocolors: 1.1.1 vite: 5.4.19(@types/node@18.19.104) @@ -13652,7 +13810,7 @@ snapshots: vite-tsconfig-paths@4.3.2(typescript@5.8.3)(vite@5.4.19(@types/node@18.19.104)): dependencies: - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) globrex: 0.1.2 tsconfck: 3.1.6(typescript@5.8.3) optionalDependencies: @@ -13679,7 +13837,7 @@ snapshots: '@vitest/utils': 1.6.1 acorn-walk: 8.3.4 chai: 4.5.0 - debug: 4.4.1 + debug: 4.4.1(supports-color@10.0.0) execa: 8.0.1 local-pkg: 0.5.1 magic-string: 0.30.17 @@ -13791,6 +13949,8 @@ snapshots: yallist@4.0.0: {} + yaml-ast-parser@0.0.43: {} + yaml@2.8.0: {} yargs-parser@18.1.3: