1. Packages
  2. Hetzner Cloud
  3. API Docs
  4. getLocations
Hetzner Cloud v1.18.0 published on Wednesday, Mar 27, 2024 by Pulumi

hcloud.getLocations

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.18.0 published on Wednesday, Mar 27, 2024 by Pulumi

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

    Using getLocations

    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 getLocations(args: GetLocationsArgs, opts?: InvokeOptions): Promise<GetLocationsResult>
    function getLocationsOutput(args: GetLocationsOutputArgs, opts?: InvokeOptions): Output<GetLocationsResult>
    def get_locations(descriptions: Optional[Sequence[str]] = None,
                      id: Optional[str] = None,
                      location_ids: Optional[Sequence[str]] = None,
                      names: Optional[Sequence[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetLocationsResult
    def get_locations_output(descriptions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      id: Optional[pulumi.Input[str]] = None,
                      location_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetLocationsResult]
    func GetLocations(ctx *Context, args *GetLocationsArgs, opts ...InvokeOption) (*GetLocationsResult, error)
    func GetLocationsOutput(ctx *Context, args *GetLocationsOutputArgs, opts ...InvokeOption) GetLocationsResultOutput

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

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

    The following arguments are supported:

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

    Deprecated:Use locations list instead

    Id string
    LocationIds List<string>
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Names List<string>
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

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

    Deprecated:Use locations list instead

    Id string
    LocationIds []string
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Names []string
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

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

    Deprecated:Use locations list instead

    id String
    locationIds List<String>
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names List<String>
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

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

    Deprecated:Use locations list instead

    id string
    locationIds string[]
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names string[]
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

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

    Deprecated:Use locations list instead

    id str
    location_ids Sequence[str]
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names Sequence[str]
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

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

    Deprecated:Use locations list instead

    id String
    locationIds List<String>
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names List<String>
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    getLocations Result

    The following output properties are available:

    Locations List<Pulumi.HCloud.Outputs.GetLocationsLocation>
    (list) List of all locations. See data.hcloud_location for schema.
    Descriptions List<string>
    (list) List of all location descriptions. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Id string
    LocationIds List<string>
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Names List<string>
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Locations []GetLocationsLocation
    (list) List of all locations. See data.hcloud_location for schema.
    Descriptions []string
    (list) List of all location descriptions. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Id string
    LocationIds []string
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Names []string
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    locations List<GetLocationsLocation>
    (list) List of all locations. See data.hcloud_location for schema.
    descriptions List<String>
    (list) List of all location descriptions. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    id String
    locationIds List<String>
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names List<String>
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    locations GetLocationsLocation[]
    (list) List of all locations. See data.hcloud_location for schema.
    descriptions string[]
    (list) List of all location descriptions. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    id string
    locationIds string[]
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names string[]
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    locations Sequence[GetLocationsLocation]
    (list) List of all locations. See data.hcloud_location for schema.
    descriptions Sequence[str]
    (list) List of all location descriptions. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    id str
    location_ids Sequence[str]
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names Sequence[str]
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    locations List<Property Map>
    (list) List of all locations. See data.hcloud_location for schema.
    descriptions List<String>
    (list) List of all location descriptions. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    id String
    locationIds List<String>
    (list) List of unique location identifiers. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    names List<String>
    (list) List of location names. Deprecated: Use locations attribute instead.

    Deprecated:Use locations list instead

    Supporting Types

    GetLocationsLocation

    City string
    Country string
    Description string
    Id int
    Latitude double
    Longitude double
    Name string
    NetworkZone string
    City string
    Country string
    Description string
    Id int
    Latitude float64
    Longitude float64
    Name string
    NetworkZone string
    city String
    country String
    description String
    id Integer
    latitude Double
    longitude Double
    name String
    networkZone String
    city string
    country string
    description string
    id number
    latitude number
    longitude number
    name string
    networkZone string
    city String
    country String
    description String
    id Number
    latitude Number
    longitude Number
    name String
    networkZone String

    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.18.0 published on Wednesday, Mar 27, 2024 by Pulumi