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

GetServerType

Provides details about a specific Hetzner Cloud Server Type. Use this resource to get detailed information about specific Server Type.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ds1 = Output.Create(HCloud.GetServerType.InvokeAsync(new HCloud.GetServerTypeArgs
        {
            Name = "cx11",
        }));
        var ds2 = Output.Create(HCloud.GetServerType.InvokeAsync(new HCloud.GetServerTypeArgs
        {
            Id = 1,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "cx11"
        _, err := hcloud.GetServerType(ctx, &hcloud.GetServerTypeArgs{
            Name: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        opt1 := 1
        _, err = hcloud.GetServerType(ctx, &hcloud.GetServerTypeArgs{
            Id: &opt1,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_hcloud as hcloud

ds1 = hcloud.get_server_type(name="cx11")
ds2 = hcloud.get_server_type(id=1)
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const ds1 = pulumi.output(hcloud.getServerType({
    name: "cx11",
}, { async: true }));
const ds2 = pulumi.output(hcloud.getServerType({
    id: 1,
}, { async: true }));

Using GetServerType

function getServerType(args: GetServerTypeArgs, opts?: InvokeOptions): Promise<GetServerTypeResult>
def get_server_type(id: Optional[int] = None, name: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetServerTypeResult
func GetServerType(ctx *Context, args *GetServerTypeArgs, opts ...InvokeOption) (*GetServerTypeResult, error)
public static class GetServerType {
    public static Task<GetServerTypeResult> InvokeAsync(GetServerTypeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id int

ID of the server_type.

Name string

Name of the server_type.

Id int

ID of the server_type.

Name string

Name of the server_type.

id number

ID of the server_type.

name string

Name of the server_type.

id int

ID of the server_type.

name str

Name of the server_type.

GetServerType Result

The following output properties are available:

Cores int

(int) Number of cpu cores a Server of this type will have.

CpuType string
Description string

(string) Description of the server_type.

Disk int

(int) Disk size a Server of this type will have in GB.

Id int

(int) Unique ID of the server_type.

Memory int

(int) Memory a Server of this type will have in GB.

Name string

(string) Name of the server_type.

StorageType string
Cores int

(int) Number of cpu cores a Server of this type will have.

CpuType string
Description string

(string) Description of the server_type.

Disk int

(int) Disk size a Server of this type will have in GB.

Id int

(int) Unique ID of the server_type.

Memory int

(int) Memory a Server of this type will have in GB.

Name string

(string) Name of the server_type.

StorageType string
cores number

(int) Number of cpu cores a Server of this type will have.

cpuType string
description string

(string) Description of the server_type.

disk number

(int) Disk size a Server of this type will have in GB.

id number

(int) Unique ID of the server_type.

memory number

(int) Memory a Server of this type will have in GB.

name string

(string) Name of the server_type.

storageType string
cores int

(int) Number of cpu cores a Server of this type will have.

cpu_type str
description str

(string) Description of the server_type.

disk int

(int) Disk size a Server of this type will have in GB.

id int

(int) Unique ID of the server_type.

memory int

(int) Memory a Server of this type will have in GB.

name str

(string) Name of the server_type.

storage_type 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.