1. Packages
  2. Hetzner Cloud
  3. API Docs
  4. getDatacenters
Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi

hcloud.getDatacenters

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi

    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,
                        descriptions: Optional[Sequence[str]] = None,
                        id: Optional[str] = None,
                        names: Optional[Sequence[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDatacentersResult
    def get_datacenters_output(datacenter_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        descriptions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        names: 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 attribute instead.

    Deprecated: Use datacenters list instead

    Descriptions List<string>
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Id string
    Names List<string>
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    DatacenterIds []string
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Descriptions []string
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Id string
    Names []string
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenterIds List<String>
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions List<String>
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id String
    names List<String>
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenterIds string[]
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions string[]
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id string
    names string[]
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenter_ids Sequence[str]
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions Sequence[str]
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id str
    names Sequence[str]
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenterIds List<String>
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions List<String>
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id String
    names List<String>
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    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.
    DatacenterIds List<string>
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Descriptions List<string>
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Id string
    Names List<string>
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Datacenters []GetDatacentersDatacenter
    (list) List of all datacenters. See data.hcloud_datacenter for schema.
    DatacenterIds []string
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Descriptions []string
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Id string
    Names []string
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenters List<GetDatacentersDatacenter>
    (list) List of all datacenters. See data.hcloud_datacenter for schema.
    datacenterIds List<String>
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions List<String>
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id String
    names List<String>
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenters GetDatacentersDatacenter[]
    (list) List of all datacenters. See data.hcloud_datacenter for schema.
    datacenterIds string[]
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions string[]
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id string
    names string[]
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenters Sequence[GetDatacentersDatacenter]
    (list) List of all datacenters. See data.hcloud_datacenter for schema.
    datacenter_ids Sequence[str]
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions Sequence[str]
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id str
    names Sequence[str]
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    datacenters List<Property Map>
    (list) List of all datacenters. See data.hcloud_datacenter for schema.
    datacenterIds List<String>
    (list) List of unique datacenter identifiers. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    descriptions List<String>
    (list) List of all datacenter descriptions. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    id String
    names List<String>
    (list) List of datacenter names. Deprecated: Use datacenters attribute instead.

    Deprecated: Use datacenters list instead

    Supporting Types

    GetDatacentersDatacenter

    AvailableServerTypeIds List<int>
    Description string
    Id int
    Location Dictionary<string, string>
    Name string
    SupportedServerTypeIds List<int>
    AvailableServerTypeIds []int
    Description string
    Id int
    Location map[string]string
    Name string
    SupportedServerTypeIds []int
    availableServerTypeIds List<Integer>
    description String
    id Integer
    location Map<String,String>
    name String
    supportedServerTypeIds List<Integer>
    availableServerTypeIds number[]
    description string
    id number
    location {[key: string]: string}
    name string
    supportedServerTypeIds number[]
    available_server_type_ids Sequence[int]
    description str
    id int
    location Mapping[str, str]
    name str
    supported_server_type_ids Sequence[int]
    availableServerTypeIds List<Number>
    description String
    id Number
    location Map<String>
    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.
    hcloud logo
    Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi