import * as API from "@distilled.cloud/core/api"; import { type HetznerOpError, type HetznerOpContext } from "../protocol.ts"; export type { HetznerOpError, HetznerOpContext }; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreatePlacementGroupRequestLabelsMap = { [key: string]: string | undefined; }; /** Define the Placement Group Type. */ export type CreatePlacementGroupRequestType = "spread"; export interface CreatePlacementGroupRequest { /** Name of the Placement Group. */ name: string; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels?: CreatePlacementGroupRequestLabelsMap; /** Define the Placement Group Type. */ type: CreatePlacementGroupRequestType | (string & {}); } /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type CreatePlacementGroupResponsePlacementGroupLabelsMap = { [key: string]: string | undefined; }; /** Type of Placement Group. */ export type CreatePlacementGroupResponsePlacementGroupType = "spread"; /** Array of IDs of Servers that are part of this Placement Group. */ export type CreatePlacementGroupResponsePlacementGroupServersList = Array; export interface CreatePlacementGroupResponsePlacementGroup { /** ID of the [Placement Group](#tag/placement-groups). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: CreatePlacementGroupResponsePlacementGroupLabelsMap; /** Type of Placement Group. */ type: CreatePlacementGroupResponsePlacementGroupType; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; /** Array of IDs of Servers that are part of this Placement Group. */ servers: CreatePlacementGroupResponsePlacementGroupServersList; } /** Status of the Action. */ export type CreatePlacementGroupResponseActionStatus = "running" | "success" | "error"; export interface CreatePlacementGroupResponseActionResourcesItem { /** ID of the Resource. */ id: number; /** Type of the Resource. */ type: string; } /** Resources the Action relates to. */ export type CreatePlacementGroupResponseActionResourcesList = Array; /** Error message for the Action if an error occurred, otherwise null. */ export interface CreatePlacementGroupResponseActionError { /** Fixed error code for machines. */ code: string; /** Error message for humans. */ message: string; } export interface CreatePlacementGroupResponseAction { /** ID of the [Action](#description/actions). */ id: number; /** Command executed in the Action. */ command: string; /** Status of the Action. */ status: CreatePlacementGroupResponseActionStatus; /** 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: CreatePlacementGroupResponseActionResourcesList; /** Error message for the Action if an error occurred, otherwise null. */ error: CreatePlacementGroupResponseActionError | null; } export interface CreatePlacementGroupResponse { placement_group: CreatePlacementGroupResponsePlacementGroup; action?: CreatePlacementGroupResponseAction | null; } export interface DeletePlacementGroupRequest { /** ID of the Placement Group. */ id: number; } export interface DeletePlacementGroupResponse { } export interface GetPlacementGroupRequest { /** ID of the Placement Group. */ id: number; } /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type GetPlacementGroupResponsePlacementGroupLabelsMap = { [key: string]: string | undefined; }; /** Type of Placement Group. */ export type GetPlacementGroupResponsePlacementGroupType = "spread"; /** Array of IDs of Servers that are part of this Placement Group. */ export type GetPlacementGroupResponsePlacementGroupServersList = Array; export interface GetPlacementGroupResponsePlacementGroup { /** ID of the [Placement Group](#tag/placement-groups). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: GetPlacementGroupResponsePlacementGroupLabelsMap; /** Type of Placement Group. */ type: GetPlacementGroupResponsePlacementGroupType; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; /** Array of IDs of Servers that are part of this Placement Group. */ servers: GetPlacementGroupResponsePlacementGroupServersList; } export interface GetPlacementGroupResponse { placement_group: GetPlacementGroupResponsePlacementGroup; } export type ListPlacementGroupsRequestSortItem = "id" | "id:asc" | "id:desc" | "name" | "name:asc" | "name:desc" | "created" | "created:asc" | "created:desc"; export type ListPlacementGroupsRequestSortList = Array; /** Type of Placement Group. */ export type ListPlacementGroupsRequestTypeItem = "spread"; export type ListPlacementGroupsRequestTypeList = Array; export interface ListPlacementGroupsRequest { /** Sort resources by field and direction. May be used multiple times. For more information, see "[Sorting](#description/sorting)". */ sort?: ListPlacementGroupsRequestSortList; /** Filter resources by their name. The response will only contain the resources matching exactly the specified name. */ name?: string; /** Filter resources by labels. The response will only contain resources matching the label selector. For more information, see "[Label Selector](#description/label-selector)". */ label_selector?: string; /** Filter resources by type. May be used multiple times. The response will only contain the resources with the specified type. */ type?: ListPlacementGroupsRequestTypeList; /** 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; } /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type ListPlacementGroupsResponsePlacementGroupsItemLabelsMap = { [key: string]: string | undefined; }; /** Type of Placement Group. */ export type ListPlacementGroupsResponsePlacementGroupsItemType = "spread"; /** Array of IDs of Servers that are part of this Placement Group. */ export type ListPlacementGroupsResponsePlacementGroupsItemServersList = Array; export interface ListPlacementGroupsResponsePlacementGroupsItem { /** ID of the [Placement Group](#tag/placement-groups). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: ListPlacementGroupsResponsePlacementGroupsItemLabelsMap; /** Type of Placement Group. */ type: ListPlacementGroupsResponsePlacementGroupsItemType; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; /** Array of IDs of Servers that are part of this Placement Group. */ servers: ListPlacementGroupsResponsePlacementGroupsItemServersList; } export type ListPlacementGroupsResponsePlacementGroupsList = Array; /** See "[Pagination](#description/pagination)" for more information. */ export interface ListPlacementGroupsResponseMetaPagination { /** 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 ListPlacementGroupsResponseMeta { /** See "[Pagination](#description/pagination)" for more information. */ pagination: ListPlacementGroupsResponseMetaPagination; } export interface ListPlacementGroupsResponse { placement_groups: ListPlacementGroupsResponsePlacementGroupsList; meta: ListPlacementGroupsResponseMeta; } /** User-defined labels (`key/value` pairs) for the Resource. Note that the set of [Labels](#description/labels) provided in the request will overwrite the existing one. For more information, see "[Labels](#description/labels)". */ export type UpdatePlacementGroupRequestLabelsMap = { [key: string]: string | undefined; }; export interface UpdatePlacementGroupRequest { /** ID of the Placement Group. */ id: number; /** New Placement Group name. */ name?: string; /** User-defined labels (`key/value` pairs) for the Resource. Note that the set of [Labels](#description/labels) provided in the request will overwrite the existing one. For more information, see "[Labels](#description/labels)". */ labels?: UpdatePlacementGroupRequestLabelsMap; } /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ export type UpdatePlacementGroupResponsePlacementGroupLabelsMap = { [key: string]: string | undefined; }; /** Type of Placement Group. */ export type UpdatePlacementGroupResponsePlacementGroupType = "spread"; /** Array of IDs of Servers that are part of this Placement Group. */ export type UpdatePlacementGroupResponsePlacementGroupServersList = Array; export interface UpdatePlacementGroupResponsePlacementGroup { /** ID of the [Placement Group](#tag/placement-groups). */ id: number; /** Name of the Resource. Must be unique per Project. */ name: string; /** User-defined labels (`key/value` pairs) for the Resource. For more information, see "[Labels](#description/labels)". */ labels: UpdatePlacementGroupResponsePlacementGroupLabelsMap; /** Type of Placement Group. */ type: UpdatePlacementGroupResponsePlacementGroupType; /** Point in time when the Resource was created (in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). */ created: string; /** Array of IDs of Servers that are part of this Placement Group. */ servers: UpdatePlacementGroupResponsePlacementGroupServersList; } export interface UpdatePlacementGroupResponse { placement_group: UpdatePlacementGroupResponsePlacementGroup; } export type CreatePlacementGroupError = HetznerOpError; /** Create a PlacementGroup Creates a new Placement Group. */ export declare const createPlacementGroup: API.OperationMethod; export type DeletePlacementGroupError = HetznerOpError; /** Delete a PlacementGroup Deletes a Placement Group. */ export declare const deletePlacementGroup: API.OperationMethod; export type GetPlacementGroupError = HetznerOpError; /** Get a PlacementGroup Gets a specific Placement Group object. */ export declare const getPlacementGroup: API.OperationMethod; export type ListPlacementGroupsError = HetznerOpError; /** List Placement Groups Returns all Placement Group objects. */ export declare const listPlacementGroups: API.PaginatedOperationMethod; export type UpdatePlacementGroupError = HetznerOpError; /** Update a PlacementGroup Updates the Placement Group properties. Note: if the Placement Group object changes during the request, the response will be a "conflict" error. */ export declare const updatePlacementGroup: API.OperationMethod; //# sourceMappingURL=placement_groups.d.ts.map