hcloud logo
Hetzner Cloud v1.10.3, Mar 8 23

hcloud.getDatacenters

Provides a list of available Hetzner Cloud Datacenters. This resource may be useful to create highly available infrastructure, distributed across several datacenters.

Using getDatacenters

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 getDatacenters(args: GetDatacentersArgs, opts?: InvokeOptions): Promise<GetDatacentersResult>
function getDatacentersOutput(args: GetDatacentersOutputArgs, opts?: InvokeOptions): Output<GetDatacentersResult>
def get_datacenters(datacenter_ids: Optional[Sequence[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetDatacentersResult
def get_datacenters_output(datacenter_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetDatacentersResult]
func GetDatacenters(ctx *Context, args *GetDatacentersArgs, opts ...InvokeOption) (*GetDatacentersResult, error)
func GetDatacentersOutput(ctx *Context, args *GetDatacentersOutputArgs, opts ...InvokeOption) GetDatacentersResultOutput

> Note: This function is named GetDatacenters in the Go SDK.

public static class GetDatacenters 
{
    public static Task<GetDatacentersResult> InvokeAsync(GetDatacentersArgs args, InvokeOptions? opts = null)
    public static Output<GetDatacentersResult> Invoke(GetDatacentersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatacentersResult> getDatacenters(GetDatacentersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: hcloud:index/getDatacenters:getDatacenters
  arguments:
    # arguments dictionary

The following arguments are supported:

DatacenterIds List<string>

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

DatacenterIds []string

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenterIds List<String>

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenterIds string[]

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenter_ids Sequence[str]

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenterIds List<String>

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

getDatacenters Result

The following output properties are available:

Datacenters List<Pulumi.HCloud.Outputs.GetDatacentersDatacenter>

(list) List of all datacenters. See data.hcloud_datacenter for schema.

Descriptions List<string>

(list) List of all datacenter descriptions.

Deprecated:

Use datacenters list instead

Id string

The provider-assigned unique ID for this managed resource.

Names List<string>

(list) List of datacenter names.

Deprecated:

Use datacenters list instead

DatacenterIds List<string>

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

Datacenters []GetDatacentersDatacenter

(list) List of all datacenters. See data.hcloud_datacenter for schema.

Descriptions []string

(list) List of all datacenter descriptions.

Deprecated:

Use datacenters list instead

Id string

The provider-assigned unique ID for this managed resource.

Names []string

(list) List of datacenter names.

Deprecated:

Use datacenters list instead

DatacenterIds []string

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenters List<GetDatacentersDatacenter>

(list) List of all datacenters. See data.hcloud_datacenter for schema.

descriptions List<String>

(list) List of all datacenter descriptions.

Deprecated:

Use datacenters list instead

id String

The provider-assigned unique ID for this managed resource.

names List<String>

(list) List of datacenter names.

Deprecated:

Use datacenters list instead

datacenterIds List<String>

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenters GetDatacentersDatacenter[]

(list) List of all datacenters. See data.hcloud_datacenter for schema.

descriptions string[]

(list) List of all datacenter descriptions.

Deprecated:

Use datacenters list instead

id string

The provider-assigned unique ID for this managed resource.

names string[]

(list) List of datacenter names.

Deprecated:

Use datacenters list instead

datacenterIds string[]

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenters Sequence[GetDatacentersDatacenter]

(list) List of all datacenters. See data.hcloud_datacenter for schema.

descriptions Sequence[str]

(list) List of all datacenter descriptions.

Deprecated:

Use datacenters list instead

id str

The provider-assigned unique ID for this managed resource.

names Sequence[str]

(list) List of datacenter names.

Deprecated:

Use datacenters list instead

datacenter_ids Sequence[str]

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

datacenters List<Property Map>

(list) List of all datacenters. See data.hcloud_datacenter for schema.

descriptions List<String>

(list) List of all datacenter descriptions.

Deprecated:

Use datacenters list instead

id String

The provider-assigned unique ID for this managed resource.

names List<String>

(list) List of datacenter names.

Deprecated:

Use datacenters list instead

datacenterIds List<String>

(list) List of unique datacenter identifiers.

Deprecated:

Use datacenters list instead

Supporting Types

GetDatacentersDatacenter

AvailableServerTypeIds List<int>
Description string
Id int
Location Dictionary<string, object>
Name string
SupportedServerTypeIds List<int>
AvailableServerTypeIds []int
Description string
Id int
Location map[string]interface{}
Name string
SupportedServerTypeIds []int
availableServerTypeIds List<Integer>
description String
id Integer
location Map<String,Object>
name String
supportedServerTypeIds List<Integer>
availableServerTypeIds number[]
description string
id number
location {[key: string]: any}
name string
supportedServerTypeIds number[]
available_server_type_ids Sequence[int]
description str
id int
location Mapping[str, Any]
name str
supported_server_type_ids Sequence[int]
availableServerTypeIds List<Number>
description String
id Number
location Map<Any>
name String
supportedServerTypeIds List<Number>

Package Details

Repository
Hetzner Cloud pulumi/pulumi-hcloud
License
Apache-2.0
Notes

This Pulumi package is based on the hcloud Terraform Provider.