import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides details about a Hetzner Cloud Server. * This resource is useful if you want to use a non-terraform managed server. * * ## Deprecations * * ### `datacenter` attribute * * The `datacenter` attribute is deprecated, use the `location` attribute instead. * * See our the [API changelog](https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters) for more details. * * > Please upgrade to `v1.58.0+` of the provider to avoid issues once the Hetzner Cloud API no longer returns the `datacenter` attribute. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as hcloud from "@pulumi/hcloud"; * * const s1 = hcloud.getServer({ * name: "my-server", * }); * const s2 = hcloud.getServer({ * id: 123, * }); * const s3 = hcloud.getServer({ * withSelector: "key=value", * }); * ``` */ export declare function getServer(args?: GetServerArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getServer. */ export interface GetServerArgs { /** * ID of the server. */ id?: number; /** * Name of the server. */ name?: string; /** * (map) Private Network the server is attached to. */ networks?: inputs.GetServerNetwork[]; /** * (Optional, string) Placement Group ID the server is assigned to. */ placementGroupId?: number; /** * @deprecated Please use the withSelector property instead. */ selector?: string; /** * Label Selector. For more information about possible values, visit the [Hetzner Cloud Documentation](https://docs.hetzner.cloud/reference/cloud#label-selector). */ withSelector?: string; /** * List only servers with the specified status, could contain `initializing`, `starting`, `running`, `stopping`, `off`, `deleting`, `rebuilding`, `migrating`, `unknown`. */ withStatuses?: string[]; } /** * A collection of values returned by getServer. */ export interface GetServerResult { /** * (string) The backup window of the server, if enabled. */ readonly backupWindow: string; /** * (bool) Whether backups are enabled. */ readonly backups: boolean; /** * (string, deprecated) The datacenter name. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-datacenters-are-there) for more details about datacenters. * * @deprecated The datacenter attribute is deprecated and will be removed after 1 July 2026. Please use the location attribute instead. See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters. */ readonly datacenter: string; /** * (bool) Whether delete protection is enabled. */ readonly deleteProtection: boolean; /** * (Optional, list) Firewall IDs the server is attached to. */ readonly firewallIds: number[]; /** * (int) Unique ID of the server. */ readonly id: number; /** * (string) Name or ID of the image the server was created from. */ readonly image: string; /** * (string) The IPv4 address. */ readonly ipv4Address: string; /** * (string) The first IPv6 address of the assigned network. */ readonly ipv6Address: string; /** * (string) The IPv6 network. */ readonly ipv6Network: string; /** * (string) ID or Name of the mounted ISO image. Architecture of ISO must equal the server (type) architecture. */ readonly iso: string; /** * (map) User-defined labels (key-value pairs) */ readonly labels: { [key: string]: string; }; /** * (string) The location name. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations. */ readonly location: string; /** * (string) Name of the server. */ readonly name: string; /** * (map) Private Network the server is attached to. */ readonly networks?: outputs.GetServerNetwork[]; /** * (Optional, string) Placement Group ID the server is assigned to. */ readonly placementGroupId?: number; /** * (int) The size of the primary disk in GB. */ readonly primaryDiskSize: number; /** * (bool) Whether rebuild protection is enabled. */ readonly rebuildProtection: boolean; readonly rescue: string; /** * @deprecated Please use the withSelector property instead. */ readonly selector?: string; /** * (string) Name of the server type. */ readonly serverType: string; /** * (string) The status of the server. */ readonly status: string; readonly withSelector?: string; readonly withStatuses?: string[]; } /** * Provides details about a Hetzner Cloud Server. * This resource is useful if you want to use a non-terraform managed server. * * ## Deprecations * * ### `datacenter` attribute * * The `datacenter` attribute is deprecated, use the `location` attribute instead. * * See our the [API changelog](https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters) for more details. * * > Please upgrade to `v1.58.0+` of the provider to avoid issues once the Hetzner Cloud API no longer returns the `datacenter` attribute. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as hcloud from "@pulumi/hcloud"; * * const s1 = hcloud.getServer({ * name: "my-server", * }); * const s2 = hcloud.getServer({ * id: 123, * }); * const s3 = hcloud.getServer({ * withSelector: "key=value", * }); * ``` */ export declare function getServerOutput(args?: GetServerOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getServer. */ export interface GetServerOutputArgs { /** * ID of the server. */ id?: pulumi.Input; /** * Name of the server. */ name?: pulumi.Input; /** * (map) Private Network the server is attached to. */ networks?: pulumi.Input[]>; /** * (Optional, string) Placement Group ID the server is assigned to. */ placementGroupId?: pulumi.Input; /** * @deprecated Please use the withSelector property instead. */ selector?: pulumi.Input; /** * Label Selector. For more information about possible values, visit the [Hetzner Cloud Documentation](https://docs.hetzner.cloud/reference/cloud#label-selector). */ withSelector?: pulumi.Input; /** * List only servers with the specified status, could contain `initializing`, `starting`, `running`, `stopping`, `off`, `deleting`, `rebuilding`, `migrating`, `unknown`. */ withStatuses?: pulumi.Input[]>; }