import * as API from "@distilled.cloud/core/api"; import { type HetznerOpError, type HetznerOpContext } from "../protocol.ts"; export type { HetznerOpError, HetznerOpContext }; export interface AddNetworkRouteRequest { /** ID of the Network. */ id: number; /** 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](#tag/servers). */ destination: string; /** 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](#tag/servers). */ gateway: string; } /** Status of the Action. */ export type AddNetworkRouteResponseActionStatus = "running" | "success" | "error"; export interface AddNetworkRouteResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type AddNetworkRouteResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface AddNetworkRouteResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface AddNetworkRouteResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AddNetworkRouteResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: AddNetworkRouteResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface AddNetworkRouteResponse { action: AddNetworkRouteResponseAction; } /** Type of subnet. */ export type AddNetworkSubnetRequestType = "cloud" | "server" | "vswitch"; export interface AddNetworkSubnetRequest { /** ID of the Network. */ id: number; /** Type of subnet. */ type: AddNetworkSubnetRequestType | (string & {}); /** IP range of the subnet. Uses CIDR notation. Must be a subnet of the parent [Networks](#tag/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. */ ip_range?: string; /** Name of the [Network Zone](#tag/network-zones). The [Location](#tag/locations) contains the `network_zone` it belongs to. */ network_zone: string; /** ID of the robot vSwitch. Must be supplied if the subnet is of type `vswitch`. */ vswitch_id?: number; } /** Status of the Action. */ export type AddNetworkSubnetResponseActionStatus = "running" | "success" | "error"; export type AddNetworkSubnetResponseActionResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type AddNetworkSubnetResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type AddNetworkSubnetResponseActionError = AddNetworkRouteResponseActionError; export interface AddNetworkSubnetResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AddNetworkSubnetResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: AddNetworkSubnetResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface AddNetworkSubnetResponse { action: AddNetworkSubnetResponseAction; } export interface ChangeNetworkIpRangeRequest { /** ID of the Network. */ id: number; /** IP range of the [Network](#tag/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](#tag/networks) with a /16 netmask. */ ip_range: string; } /** Status of the Action. */ export type ChangeNetworkIpRangeResponseActionStatus = "running" | "success" | "error"; export type ChangeNetworkIpRangeResponseActionResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeNetworkIpRangeResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeNetworkIpRangeResponseActionError = AddNetworkRouteResponseActionError; export interface ChangeNetworkIpRangeResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeNetworkIpRangeResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeNetworkIpRangeResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface ChangeNetworkIpRangeResponse { action: ChangeNetworkIpRangeResponseAction; } export interface ChangeNetworkProtectionRequest { /** ID of the Network. */ id: number; /** Delete protection setting. If true, prevents the [Network](#tag/networks) from being deleted. */ delete?: boolean; } /** Status of the Action. */ export type ChangeNetworkProtectionResponseActionStatus = "running" | "success" | "error"; export type ChangeNetworkProtectionResponseActionResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangeNetworkProtectionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangeNetworkProtectionResponseActionError = AddNetworkRouteResponseActionError; export interface ChangeNetworkProtectionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangeNetworkProtectionResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ChangeNetworkProtectionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface ChangeNetworkProtectionResponse { action: ChangeNetworkProtectionResponseAction; } export interface DeleteNetworkRouteRequest { /** ID of the Network. */ id: number; /** 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](#tag/servers). */ destination: string; /** 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](#tag/servers). */ gateway: string; } /** Status of the Action. */ export type DeleteNetworkRouteResponseActionStatus = "running" | "success" | "error"; export type DeleteNetworkRouteResponseActionResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type DeleteNetworkRouteResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DeleteNetworkRouteResponseActionError = AddNetworkRouteResponseActionError; export interface DeleteNetworkRouteResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DeleteNetworkRouteResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DeleteNetworkRouteResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface DeleteNetworkRouteResponse { action: DeleteNetworkRouteResponseAction; } export interface DeleteNetworkSubnetRequest { /** ID of the Network. */ id: number; /** IP range in CIDR block notation of the subnet to delete. */ ip_range: string; } /** Status of the Action. */ export type DeleteNetworkSubnetResponseActionStatus = "running" | "success" | "error"; export type DeleteNetworkSubnetResponseActionResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type DeleteNetworkSubnetResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type DeleteNetworkSubnetResponseActionError = AddNetworkRouteResponseActionError; export interface DeleteNetworkSubnetResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: DeleteNetworkSubnetResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: DeleteNetworkSubnetResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface DeleteNetworkSubnetResponse { action: DeleteNetworkSubnetResponseAction; } export interface GetNetworksActionRequest { /** ID of the Action. */ id: number; } /** Status of the Action. */ export type GetNetworksActionResponseActionStatus = "running" | "success" | "error"; export type GetNetworksActionResponseActionResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type GetNetworksActionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type GetNetworksActionResponseActionError = AddNetworkRouteResponseActionError; export interface GetNetworksActionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: GetNetworksActionResponseActionStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: GetNetworksActionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export interface GetNetworksActionResponse { action: GetNetworksActionResponseAction; } export type ListNetworkActionsRequestSortItem = "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListNetworkActionsRequestSortList = Array; /** Status of the Action. */ export type ListNetworkActionsRequestStatusItem = "running" | "success" | "error"; export type ListNetworkActionsRequestStatusList = Array; export interface ListNetworkActionsRequest { /** ID of the Network. */ id: number; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListNetworkActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListNetworkActionsRequestStatusList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Status of the Action. */ export type ListNetworkActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListNetworkActionsResponseActionsItemResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListNetworkActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListNetworkActionsResponseActionsItemError = AddNetworkRouteResponseActionError; export interface ListNetworkActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListNetworkActionsResponseActionsItemStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ListNetworkActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export type ListNetworkActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListNetworkActionsResponseMetaPagination { /** Current page number. */ page: number; /** Maximum number of entries returned per page. */ per_page: number; /** Page number of the previous page. Can be null if the current page is the first one. */ previous_page: number | null; /** Page number of the next page. Can be null if the current page is the last one. */ next_page: number | null; /** Page number of the last page available. Can be null if the current page is the last one. */ last_page: number | null; /** Total number of entries that exist for this query. Can be null if unknown. */ total_entries: number | null; } export interface ListNetworkActionsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListNetworkActionsResponseMetaPagination; } export interface ListNetworkActionsResponse { actions: ListNetworkActionsResponseActionsList; meta: ListNetworkActionsResponseMeta; } export type ListNetworksActionsRequestIdList = Array; export type ListNetworksActionsRequestSortItem = "id" | "id:asc" | "id:desc" | "command" | "command:asc" | "command:desc" | "status" | "status:asc" | "status:desc" | "started" | "started:asc" | "started:desc" | "finished" | "finished:asc" | "finished:desc"; export type ListNetworksActionsRequestSortList = Array; /** Status of the Action. */ export type ListNetworksActionsRequestStatusItem = "running" | "success" | "error"; export type ListNetworksActionsRequestStatusList = Array; export interface ListNetworksActionsRequest { /** Filter the actions by ID. May be used multiple times. The response will only contain actions matching the specified IDs. */ id?: ListNetworksActionsRequestIdList; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListNetworksActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListNetworksActionsRequestStatusList; /** Page number to return. For more information, see "[Pagination](#description/pagination)". */ page?: number; /** Maximum number of entries returned per page. For more information, see "[Pagination](#description/pagination)". */ per_page?: number; } /** Status of the Action. */ export type ListNetworksActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListNetworksActionsResponseActionsItemResourcesItem = AddNetworkRouteResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListNetworksActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListNetworksActionsResponseActionsItemError = AddNetworkRouteResponseActionError; export interface ListNetworksActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListNetworksActionsResponseActionsItemStatus; /** Point in time when the Action was started (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ started: string; /** Point in time when the Action was finished (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). Only set if the Action is finished otherwise null. */ finished: string | null; /** Progress of the Action in percent. */ progress: number; /** Resources the Action relates to. */ resources: ListNetworksActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AddNetworkRouteResponseActionError | null; } export type ListNetworksActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export type ListNetworksActionsResponseMetaPagination = ListNetworkActionsResponseMetaPagination; export type ListNetworksActionsResponseMeta = ListNetworkActionsResponseMeta; export interface ListNetworksActionsResponse { actions: ListNetworksActionsResponseActionsList; meta: ListNetworkActionsResponseMeta; } export type AddNetworkRouteError = HetznerOpError; /** Add a route to a Network Adds a route entry to a [Network](#tag/networks). If a change is currently being performed on this [Network](#tag/networks), a error response with code `conflict` will be returned. */ export declare const addNetworkRoute: API.OperationMethod; export type AddNetworkSubnetError = HetznerOpError; /** Add a subnet to a Network Adds a new subnet to the [Network](#tag/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](#tag/networks), a error response with code `conflict` will be returned. */ export declare const addNetworkSubnet: API.OperationMethod; export type ChangeNetworkIpRangeError = HetznerOpError; /** Change IP range of a Network Changes the IP range of a [Network](#tag/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](#tag/servers), they need to be rebooted or the routes to be updated manually. For example if the [Network](#tag/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](#tag/networks), a error response with code `conflict` will be returned. */ export declare const changeNetworkIpRange: API.OperationMethod; export type ChangeNetworkProtectionError = HetznerOpError; /** Change Network Protection Changes the protection settings of a [Network](#tag/networks). If a change is currently being performed on this [Network](#tag/networks), a error response with code `conflict` will be returned. */ export declare const changeNetworkProtection: API.OperationMethod; export type DeleteNetworkRouteError = HetznerOpError; /** Delete a route from a Network Delete a route entry from a [Network](#tag/networks). If a change is currently being performed on this [Network](#tag/networks), a error response with code `conflict` will be returned. */ export declare const deleteNetworkRoute: API.OperationMethod; export type DeleteNetworkSubnetError = HetznerOpError; /** Delete a subnet from a Network Deletes a single subnet entry from a [Network](#tag/networks). Subnets containing attached resources can not be deleted, they must be detached beforehand. If a change is currently being performed on this [Network](#tag/networks), a error response with code `conflict` will be returned. */ export declare const deleteNetworkSubnet: API.OperationMethod; export type GetNetworksActionError = HetznerOpError; /** Get an Action Returns a single [Action](#tag/actions). */ export declare const getNetworksAction: API.OperationMethod; export type ListNetworkActionsError = HetznerOpError; /** List Actions for a Network Lists [Actions](#tag/actions) for a [Network](#tag/networks). Use the provided URI parameters to modify the result. */ export declare const listNetworkActions: API.PaginatedOperationMethod; export type ListNetworksActionsError = HetznerOpError; /** List Actions Lists multiple [Actions](#tag/actions). Use the provided URI parameters to modify the result. */ export declare const listNetworksActions: API.PaginatedOperationMethod; //# sourceMappingURL=network_actions.d.ts.map