1. Packages
  2. OVH
  3. API Docs
  4. getLocation
OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud

ovh.getLocation

Explore with Pulumi AI

ovh logo
OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud

    Get available regions and their availability zones

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const paris = ovh.getLocation({
        name: "eu-west-par",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    paris = ovh.get_location(name="eu-west-par")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.GetLocation(ctx, &ovh.GetLocationArgs{
    			Name: "eu-west-par",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var paris = Ovh.GetLocation.Invoke(new()
        {
            Name = "eu-west-par",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetLocationArgs;
    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 paris = OvhFunctions.getLocation(GetLocationArgs.builder()
                .name("eu-west-par")
                .build());
    
        }
    }
    
    variables:
      paris:
        fn::invoke:
          function: ovh:getLocation
          arguments:
            name: eu-west-par
    

    Using getLocation

    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 getLocation(args: GetLocationArgs, opts?: InvokeOptions): Promise<GetLocationResult>
    function getLocationOutput(args: GetLocationOutputArgs, opts?: InvokeOptions): Output<GetLocationResult>
    def get_location(name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetLocationResult
    def get_location_output(name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetLocationResult]
    func GetLocation(ctx *Context, args *GetLocationArgs, opts ...InvokeOption) (*GetLocationResult, error)
    func GetLocationOutput(ctx *Context, args *GetLocationOutputArgs, opts ...InvokeOption) GetLocationResultOutput

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

    public static class GetLocation 
    {
        public static Task<GetLocationResult> InvokeAsync(GetLocationArgs args, InvokeOptions? opts = null)
        public static Output<GetLocationResult> Invoke(GetLocationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
    public static Output<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getLocation:getLocation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name
    Name string
    Name
    name String
    Name
    name string
    Name
    name str
    Name
    name String
    Name

    getLocation Result

    The following output properties are available:

    AvailabilityZones List<string>
    List of availability zones for the region
    CardinalPoint string
    Cardinal direction where the region is located
    CityCode string
    ISO code of the city
    CityLatitude double
    Geographical latitude of the city
    CityLongitude double
    Geographical longitude of the city
    CityName string
    Full name of the city
    Code string
    Region's short code
    CountryCode string
    ISO code of the country
    CountryName string
    Full name of the country
    GeographyCode string
    Short code representing the geographical area
    GeographyName string
    Name of the geographical area
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Location of the region
    Name string
    Name
    OpeningYear double
    Year the region was opened
    SpecificType string
    Specific typology of the region
    Type string
    General typology of the region
    AvailabilityZones []string
    List of availability zones for the region
    CardinalPoint string
    Cardinal direction where the region is located
    CityCode string
    ISO code of the city
    CityLatitude float64
    Geographical latitude of the city
    CityLongitude float64
    Geographical longitude of the city
    CityName string
    Full name of the city
    Code string
    Region's short code
    CountryCode string
    ISO code of the country
    CountryName string
    Full name of the country
    GeographyCode string
    Short code representing the geographical area
    GeographyName string
    Name of the geographical area
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Location of the region
    Name string
    Name
    OpeningYear float64
    Year the region was opened
    SpecificType string
    Specific typology of the region
    Type string
    General typology of the region
    availabilityZones List<String>
    List of availability zones for the region
    cardinalPoint String
    Cardinal direction where the region is located
    cityCode String
    ISO code of the city
    cityLatitude Double
    Geographical latitude of the city
    cityLongitude Double
    Geographical longitude of the city
    cityName String
    Full name of the city
    code String
    Region's short code
    countryCode String
    ISO code of the country
    countryName String
    Full name of the country
    geographyCode String
    Short code representing the geographical area
    geographyName String
    Name of the geographical area
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    Location of the region
    name String
    Name
    openingYear Double
    Year the region was opened
    specificType String
    Specific typology of the region
    type String
    General typology of the region
    availabilityZones string[]
    List of availability zones for the region
    cardinalPoint string
    Cardinal direction where the region is located
    cityCode string
    ISO code of the city
    cityLatitude number
    Geographical latitude of the city
    cityLongitude number
    Geographical longitude of the city
    cityName string
    Full name of the city
    code string
    Region's short code
    countryCode string
    ISO code of the country
    countryName string
    Full name of the country
    geographyCode string
    Short code representing the geographical area
    geographyName string
    Name of the geographical area
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    Location of the region
    name string
    Name
    openingYear number
    Year the region was opened
    specificType string
    Specific typology of the region
    type string
    General typology of the region
    availability_zones Sequence[str]
    List of availability zones for the region
    cardinal_point str
    Cardinal direction where the region is located
    city_code str
    ISO code of the city
    city_latitude float
    Geographical latitude of the city
    city_longitude float
    Geographical longitude of the city
    city_name str
    Full name of the city
    code str
    Region's short code
    country_code str
    ISO code of the country
    country_name str
    Full name of the country
    geography_code str
    Short code representing the geographical area
    geography_name str
    Name of the geographical area
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    Location of the region
    name str
    Name
    opening_year float
    Year the region was opened
    specific_type str
    Specific typology of the region
    type str
    General typology of the region
    availabilityZones List<String>
    List of availability zones for the region
    cardinalPoint String
    Cardinal direction where the region is located
    cityCode String
    ISO code of the city
    cityLatitude Number
    Geographical latitude of the city
    cityLongitude Number
    Geographical longitude of the city
    cityName String
    Full name of the city
    code String
    Region's short code
    countryCode String
    ISO code of the country
    countryName String
    Full name of the country
    geographyCode String
    Short code representing the geographical area
    geographyName String
    Name of the geographical area
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    Location of the region
    name String
    Name
    openingYear Number
    Year the region was opened
    specificType String
    Specific typology of the region
    type String
    General typology of the region

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v2.7.3 published on Thursday, Aug 28, 2025 by OVHcloud