import * as API from "@distilled.cloud/core/api"; import { type HetznerOpError, type HetznerOpContext } from "../protocol.ts"; export type { HetznerOpError, HetznerOpContext }; /** Type of resource assigning the Primary IP to. */ export type AssignPrimaryIpRequestAssigneeType = "server"; export interface AssignPrimaryIpRequest { /** ID of the Primary IP. */ id: number; /** Type of resource assigning the Primary IP to. */ assignee_type: AssignPrimaryIpRequestAssigneeType | (string & {}); /** ID of a resource of type `assignee_type`. */ assignee_id: number; } /** Status of the Action. */ export type AssignPrimaryIpResponseActionStatus = "running" | "success" | "error"; export interface AssignPrimaryIpResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type AssignPrimaryIpResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface AssignPrimaryIpResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface AssignPrimaryIpResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: AssignPrimaryIpResponseActionStatus; /** 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: AssignPrimaryIpResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface AssignPrimaryIpResponse { action: AssignPrimaryIpResponseAction; } export interface ChangePrimaryIpDnsPtrRequest { /** ID of the Primary IP. */ id: number; /** Single IPv4 or IPv6 address to create pointer for. */ ip: string; /** Domain Name to point to. PTR record content used for reverse DNS. Set to null to reset (IPv4) to the default value or remove (IPv6) the record. */ dns_ptr: string | null; } /** Status of the Action. */ export type ChangePrimaryIpDnsPtrResponseActionStatus = "running" | "success" | "error"; export type ChangePrimaryIpDnsPtrResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangePrimaryIpDnsPtrResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangePrimaryIpDnsPtrResponseActionError = AssignPrimaryIpResponseActionError; export interface ChangePrimaryIpDnsPtrResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangePrimaryIpDnsPtrResponseActionStatus; /** 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: ChangePrimaryIpDnsPtrResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface ChangePrimaryIpDnsPtrResponse { action: ChangePrimaryIpDnsPtrResponseAction; } export interface ChangePrimaryIpProtectionRequest { /** ID of the Primary IP. */ id: number; /** Prevent the Resource from being deleted. */ delete: boolean; } /** Status of the Action. */ export type ChangePrimaryIpProtectionResponseActionStatus = "running" | "success" | "error"; export type ChangePrimaryIpProtectionResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ChangePrimaryIpProtectionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ChangePrimaryIpProtectionResponseActionError = AssignPrimaryIpResponseActionError; export interface ChangePrimaryIpProtectionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ChangePrimaryIpProtectionResponseActionStatus; /** 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: ChangePrimaryIpProtectionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface ChangePrimaryIpProtectionResponse { action: ChangePrimaryIpProtectionResponseAction; } export interface GetPrimaryIpsActionRequest { /** ID of the Action. */ id: number; } /** Status of the Action. */ export type GetPrimaryIpsActionResponseActionStatus = "running" | "success" | "error"; export type GetPrimaryIpsActionResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type GetPrimaryIpsActionResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type GetPrimaryIpsActionResponseActionError = AssignPrimaryIpResponseActionError; export interface GetPrimaryIpsActionResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: GetPrimaryIpsActionResponseActionStatus; /** 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: GetPrimaryIpsActionResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface GetPrimaryIpsActionResponse { action: GetPrimaryIpsActionResponseAction; } export type ListPrimaryIpActionsRequestSortItem = "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 ListPrimaryIpActionsRequestSortList = Array; /** Status of the Action. */ export type ListPrimaryIpActionsRequestStatusItem = "running" | "success" | "error"; export type ListPrimaryIpActionsRequestStatusList = Array; export interface ListPrimaryIpActionsRequest { /** ID of the Primary IP. */ id: number; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListPrimaryIpActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListPrimaryIpActionsRequestStatusList; /** 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 ListPrimaryIpActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListPrimaryIpActionsResponseActionsItemResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListPrimaryIpActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListPrimaryIpActionsResponseActionsItemError = AssignPrimaryIpResponseActionError; export interface ListPrimaryIpActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListPrimaryIpActionsResponseActionsItemStatus; /** 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: ListPrimaryIpActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export type ListPrimaryIpActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListPrimaryIpActionsResponseMetaPagination { /** 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 ListPrimaryIpActionsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListPrimaryIpActionsResponseMetaPagination; } export interface ListPrimaryIpActionsResponse { actions: ListPrimaryIpActionsResponseActionsList; meta: ListPrimaryIpActionsResponseMeta; } export type ListPrimaryIpsActionsRequestIdList = Array; export type ListPrimaryIpsActionsRequestSortItem = "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 ListPrimaryIpsActionsRequestSortList = Array; /** Status of the Action. */ export type ListPrimaryIpsActionsRequestStatusItem = "running" | "success" | "error"; export type ListPrimaryIpsActionsRequestStatusList = Array; export interface ListPrimaryIpsActionsRequest { /** Filter the actions by ID. May be used multiple times. The response will only contain actions matching the specified IDs. */ id?: ListPrimaryIpsActionsRequestIdList; /** Sort actions by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListPrimaryIpsActionsRequestSortList; /** Filter the actions by status. May be used multiple times. The response will only contain actions matching the specified statuses. */ status?: ListPrimaryIpsActionsRequestStatusList; /** 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 ListPrimaryIpsActionsResponseActionsItemStatus = "running" | "success" | "error"; export type ListPrimaryIpsActionsResponseActionsItemResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type ListPrimaryIpsActionsResponseActionsItemResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type ListPrimaryIpsActionsResponseActionsItemError = AssignPrimaryIpResponseActionError; export interface ListPrimaryIpsActionsResponseActionsItem { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: ListPrimaryIpsActionsResponseActionsItemStatus; /** 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: ListPrimaryIpsActionsResponseActionsItemResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export type ListPrimaryIpsActionsResponseActionsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export type ListPrimaryIpsActionsResponseMetaPagination = ListPrimaryIpActionsResponseMetaPagination; export type ListPrimaryIpsActionsResponseMeta = ListPrimaryIpActionsResponseMeta; export interface ListPrimaryIpsActionsResponse { actions: ListPrimaryIpsActionsResponseActionsList; meta: ListPrimaryIpActionsResponseMeta; } export interface UnassignPrimaryIpRequest { /** ID of the Primary IP. */ id: number; } /** Status of the Action. */ export type UnassignPrimaryIpResponseActionStatus = "running" | "success" | "error"; export type UnassignPrimaryIpResponseActionResourcesItem = AssignPrimaryIpResponseActionResourcesItem; /** Resources the Action relates to. */ export type UnassignPrimaryIpResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export type UnassignPrimaryIpResponseActionError = AssignPrimaryIpResponseActionError; export interface UnassignPrimaryIpResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: UnassignPrimaryIpResponseActionStatus; /** 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: UnassignPrimaryIpResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: AssignPrimaryIpResponseActionError | null; } export interface UnassignPrimaryIpResponse { action: UnassignPrimaryIpResponseAction; } export type AssignPrimaryIpError = HetznerOpError; /** Assign a Primary IP to a resource Assign a [Primary IP](#tag/primary-ips) to a resource. A [Server](#tag/servers) can only have one [Primary IP](#tag/primary-ips) of type `ipv4` and one of type `ipv6` assigned. If you need more IPs use [Floating IPs](#tag/floating-ips). A [Server](#tag/servers) must be powered off (status `off`) in order for this operation to succeed. #### Operation specific errors */ export declare const assignPrimaryIp: API.OperationMethod; export type ChangePrimaryIpDnsPtrError = HetznerOpError; /** Change reverse DNS records for a Primary IP Change the reverse DNS records for this [Primary IP](#tag/primary-ips). Allows to modify the PTR records set for the IP address. */ export declare const changePrimaryIpDnsPtr: API.OperationMethod; export type ChangePrimaryIpProtectionError = HetznerOpError; /** Change Primary IP Protection Changes the protection configuration of a [Primary IP](#tag/primary-ips). A [Primary IPs](#tag/primary-ips) deletion protection can only be enabled if its `auto_delete` property is set to `false`. */ export declare const changePrimaryIpProtection: API.OperationMethod; export type GetPrimaryIpsActionError = HetznerOpError; /** Get an Action Returns a single [Action](#tag/actions). */ export declare const getPrimaryIpsAction: API.OperationMethod; export type ListPrimaryIpActionsError = HetznerOpError; /** List Actions for a Primary IP Returns all [Actions](#tag/actions) for a [Primary IP](#tag/primary-ips). Use the provided URI parameters to modify the result. */ export declare const listPrimaryIpActions: API.PaginatedOperationMethod; export type ListPrimaryIpsActionsError = HetznerOpError; /** List Actions Lists multiple [Actions](#tag/actions). Use the provided URI parameters to modify the result. */ export declare const listPrimaryIpsActions: API.PaginatedOperationMethod; export type UnassignPrimaryIpError = HetznerOpError; /** Unassign a Primary IP from a resource Unassign a [Primary IP](#tag/primary-ips) from a resource. A [Server](#tag/servers) must be powered off (status `off`) in order for this operation to succeed. A [Server](#tag/servers) requires at least one network interface (public or private) to be powered on. #### Operation specific errors */ export declare const unassignPrimaryIp: API.OperationMethod; //# sourceMappingURL=primary_ip_actions.d.ts.map