Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi
hcloud.getServerType
Explore with Pulumi AI
Provides details about a specific Hetzner Cloud Server Type. Use this resource to get detailed information about specific Server Type.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const ds1 = hcloud.getServerType({
    name: "cx11",
});
const ds2 = hcloud.getServerType({
    id: 1,
});
import pulumi
import pulumi_hcloud as hcloud
ds1 = hcloud.get_server_type(name="cx11")
ds2 = hcloud.get_server_type(id=1)
package main
import (
	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcloud.GetServerType(ctx, &hcloud.GetServerTypeArgs{
			Name: pulumi.StringRef("cx11"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = hcloud.GetServerType(ctx, &hcloud.GetServerTypeArgs{
			Id: pulumi.IntRef(1),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() => 
{
    var ds1 = HCloud.GetServerType.Invoke(new()
    {
        Name = "cx11",
    });
    var ds2 = HCloud.GetServerType.Invoke(new()
    {
        Id = 1,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetServerTypeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var ds1 = HcloudFunctions.getServerType(GetServerTypeArgs.builder()
            .name("cx11")
            .build());
        final var ds2 = HcloudFunctions.getServerType(GetServerTypeArgs.builder()
            .id(1)
            .build());
    }
}
variables:
  ds1:
    fn::invoke:
      Function: hcloud:getServerType
      Arguments:
        name: cx11
  ds2:
    fn::invoke:
      Function: hcloud:getServerType
      Arguments:
        id: 1
Using getServerType
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServerType(args: GetServerTypeArgs, opts?: InvokeOptions): Promise<GetServerTypeResult>
function getServerTypeOutput(args: GetServerTypeOutputArgs, opts?: InvokeOptions): Output<GetServerTypeResult>def get_server_type(deprecation_announced: Optional[str] = None,
                    id: Optional[int] = None,
                    name: Optional[str] = None,
                    unavailable_after: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetServerTypeResult
def get_server_type_output(deprecation_announced: Optional[pulumi.Input[str]] = None,
                    id: Optional[pulumi.Input[int]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    unavailable_after: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetServerTypeResult]func GetServerType(ctx *Context, args *GetServerTypeArgs, opts ...InvokeOption) (*GetServerTypeResult, error)
func GetServerTypeOutput(ctx *Context, args *GetServerTypeOutputArgs, opts ...InvokeOption) GetServerTypeResultOutput> Note: This function is named GetServerType in the Go SDK.
public static class GetServerType 
{
    public static Task<GetServerTypeResult> InvokeAsync(GetServerTypeArgs args, InvokeOptions? opts = null)
    public static Output<GetServerTypeResult> Invoke(GetServerTypeInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServerTypeResult> getServerType(GetServerTypeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: hcloud:index/getServerType:getServerType
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Deprecation
Announced string - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - Id int
 - ID of the server_type.
 - Name string
 - Name of the server_type.
 - string
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- Deprecation
Announced string - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - Id int
 - ID of the server_type.
 - Name string
 - Name of the server_type.
 - string
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- deprecation
Announced String - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - id Integer
 - ID of the server_type.
 - name String
 - Name of the server_type.
 - String
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- deprecation
Announced string - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - id number
 - ID of the server_type.
 - name string
 - Name of the server_type.
 - string
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- deprecation_
announced str - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - id int
 - ID of the server_type.
 - name str
 - Name of the server_type.
 - str
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- deprecation
Announced String - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - id Number
 - ID of the server_type.
 - name String
 - Name of the server_type.
 - String
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
getServerType Result
The following output properties are available:
- Architecture string
 - (string) Architecture of the server_type.
 - Cores int
 - (int) Number of cpu cores a Server of this type will have.
 - Cpu
Type string - Deprecation
Announced string - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - 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.
 - Included
Traffic int - (int) Free traffic per month in bytes.
 - Is
Deprecated bool - (bool) Deprecation status of server type.
 - Memory int
 - (int) Memory a Server of this type will have in GB.
 - Name string
 - (string) Name of the server_type.
 - Storage
Type string - string
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- Architecture string
 - (string) Architecture of the server_type.
 - Cores int
 - (int) Number of cpu cores a Server of this type will have.
 - Cpu
Type string - Deprecation
Announced string - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - 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.
 - Included
Traffic int - (int) Free traffic per month in bytes.
 - Is
Deprecated bool - (bool) Deprecation status of server type.
 - Memory int
 - (int) Memory a Server of this type will have in GB.
 - Name string
 - (string) Name of the server_type.
 - Storage
Type string - string
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- architecture String
 - (string) Architecture of the server_type.
 - cores Integer
 - (int) Number of cpu cores a Server of this type will have.
 - cpu
Type String - deprecation
Announced String - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - description String
 - (string) Description of the server_type.
 - disk Integer
 - (int) Disk size a Server of this type will have in GB.
 - id Integer
 - (int) Unique ID of the server_type.
 - included
Traffic Integer - (int) Free traffic per month in bytes.
 - is
Deprecated Boolean - (bool) Deprecation status of server type.
 - memory Integer
 - (int) Memory a Server of this type will have in GB.
 - name String
 - (string) Name of the server_type.
 - storage
Type String - String
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- architecture string
 - (string) Architecture of the server_type.
 - cores number
 - (int) Number of cpu cores a Server of this type will have.
 - cpu
Type string - deprecation
Announced string - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - 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.
 - included
Traffic number - (int) Free traffic per month in bytes.
 - is
Deprecated boolean - (bool) Deprecation status of server type.
 - memory number
 - (int) Memory a Server of this type will have in GB.
 - name string
 - (string) Name of the server_type.
 - storage
Type string - string
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- architecture str
 - (string) Architecture of the server_type.
 - cores int
 - (int) Number of cpu cores a Server of this type will have.
 - cpu_
type str - deprecation_
announced str - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - 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.
 - included_
traffic int - (int) Free traffic per month in bytes.
 - is_
deprecated bool - (bool) Deprecation status of 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 - str
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
- architecture String
 - (string) Architecture of the server_type.
 - cores Number
 - (int) Number of cpu cores a Server of this type will have.
 - cpu
Type String - deprecation
Announced String - (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
 - 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.
 - included
Traffic Number - (int) Free traffic per month in bytes.
 - is
Deprecated Boolean - (bool) Deprecation status of server type.
 - memory Number
 - (int) Memory a Server of this type will have in GB.
 - name String
 - (string) Name of the server_type.
 - storage
Type String - String
 - (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
 
Package Details
- Repository
 - Hetzner Cloud pulumi/pulumi-hcloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
hcloudTerraform Provider.