Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

GetServer

Using GetServer

function getServer(args: GetServerArgs, opts?: InvokeOptions): Promise<GetServerResult>
def get_server(id: Optional[int] = None, name: Optional[str] = None, selector: Optional[str] = None, with_selector: Optional[str] = None, with_statuses: Optional[Sequence[str]] = None, opts: Optional[InvokeOptions] = None) -> GetServerResult
func LookupServer(ctx *Context, args *LookupServerArgs, opts ...InvokeOption) (*LookupServerResult, error)

Note: This function is named LookupServer in the Go SDK.

public static class GetServer {
    public static Task<GetServerResult> InvokeAsync(GetServerArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id int

ID of the server.

Name string

Name of the server.

Selector string

Deprecated: Please use the with_selector property instead.

WithSelector string

Label Selector. For more information about possible values, visit the Hetzner Cloud Documentation.

WithStatuses List<string>

List only servers with the specified status, could contain initializing, starting, running, stopping, off, deleting, rebuilding, migrating, unknown.

Id int

ID of the server.

Name string

Name of the server.

Selector string

Deprecated: Please use the with_selector property instead.

WithSelector string

Label Selector. For more information about possible values, visit the Hetzner Cloud Documentation.

WithStatuses []string

List only servers with the specified status, could contain initializing, starting, running, stopping, off, deleting, rebuilding, migrating, unknown.

id number

ID of the server.

name string

Name of the server.

selector string

Deprecated: Please use the with_selector property instead.

withSelector string

Label Selector. For more information about possible values, visit the Hetzner Cloud Documentation.

withStatuses string[]

List only servers with the specified status, could contain initializing, starting, running, stopping, off, deleting, rebuilding, migrating, unknown.

id int

ID of the server.

name str

Name of the server.

selector str

Deprecated: Please use the with_selector property instead.

with_selector str

Label Selector. For more information about possible values, visit the Hetzner Cloud Documentation.

with_statuses Sequence[str]

List only servers with the specified status, could contain initializing, starting, running, stopping, off, deleting, rebuilding, migrating, unknown.

GetServer Result

The following output properties are available:

BackupWindow string

(string) The backup window of the server, if enabled.

Backups bool

(boolean) Whether backups are enabled.

Datacenter string

(string) The datacenter name.

Id int

(int) Unique ID of the server.

Image string

(string) Name or ID of the image the server was created from.

Ipv4Address string

(string) The IPv4 address.

Ipv6Address string

(string) The first IPv6 address of the assigned network.

Ipv6Network string

(string) The IPv6 network.

Iso string

(string) ID or Name of the mounted ISO image.

Labels Dictionary<string, object>

(map) User-defined labels (key-value pairs)

Location string

(string) The location name.

Name string

(string) Name of the server.

Rescue string
ServerType string

(string) Name of the server type.

Status string

(string) The status of the server.

Selector string

Deprecated: Please use the with_selector property instead.

WithSelector string
WithStatuses List<string>
BackupWindow string

(string) The backup window of the server, if enabled.

Backups bool

(boolean) Whether backups are enabled.

Datacenter string

(string) The datacenter name.

Id int

(int) Unique ID of the server.

Image string

(string) Name or ID of the image the server was created from.

Ipv4Address string

(string) The IPv4 address.

Ipv6Address string

(string) The first IPv6 address of the assigned network.

Ipv6Network string

(string) The IPv6 network.

Iso string

(string) ID or Name of the mounted ISO image.

Labels map[string]interface{}

(map) User-defined labels (key-value pairs)

Location string

(string) The location name.

Name string

(string) Name of the server.

Rescue string
ServerType string

(string) Name of the server type.

Status string

(string) The status of the server.

Selector string

Deprecated: Please use the with_selector property instead.

WithSelector string
WithStatuses []string
backupWindow string

(string) The backup window of the server, if enabled.

backups boolean

(boolean) Whether backups are enabled.

datacenter string

(string) The datacenter name.

id number

(int) Unique ID of the server.

image string

(string) Name or ID of the image the server was created from.

ipv4Address string

(string) The IPv4 address.

ipv6Address string

(string) The first IPv6 address of the assigned network.

ipv6Network string

(string) The IPv6 network.

iso string

(string) ID or Name of the mounted ISO image.

labels {[key: string]: any}

(map) User-defined labels (key-value pairs)

location string

(string) The location name.

name string

(string) Name of the server.

rescue string
serverType string

(string) Name of the server type.

status string

(string) The status of the server.

selector string

Deprecated: Please use the with_selector property instead.

withSelector string
withStatuses string[]
backup_window str

(string) The backup window of the server, if enabled.

backups bool

(boolean) Whether backups are enabled.

datacenter str

(string) The datacenter name.

id int

(int) Unique ID of the server.

image str

(string) Name or ID of the image the server was created from.

ipv4_address str

(string) The IPv4 address.

ipv6_address str

(string) The first IPv6 address of the assigned network.

ipv6_network str

(string) The IPv6 network.

iso str

(string) ID or Name of the mounted ISO image.

labels Mapping[str, Any]

(map) User-defined labels (key-value pairs)

location str

(string) The location name.

name str

(string) Name of the server.

rescue str
server_type str

(string) Name of the server type.

status str

(string) The status of the server.

selector str

Deprecated: Please use the with_selector property instead.

with_selector str
with_statuses Sequence[str]

Package Details

Repository
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes
This Pulumi package is based on the hcloud Terraform Provider.