1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getRegions
OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud

ovh.CloudProject.getRegions

Start a Neo task
Explain and create an ovh.CloudProject.getRegions resource
ovh logo
OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud

    Use this data source to get the regions of a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const regions = ovh.CloudProject.getRegions({
        serviceName: "XXXXXX",
        hasServicesUps: ["network"],
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    regions = ovh.CloudProject.get_regions(service_name="XXXXXX",
        has_services_ups=["network"])
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudproject.GetRegions(ctx, &cloudproject.GetRegionsArgs{
    			ServiceName: "XXXXXX",
    			HasServicesUps: []string{
    				"network",
    			},
    		}, 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 regions = Ovh.CloudProject.GetRegions.Invoke(new()
        {
            ServiceName = "XXXXXX",
            HasServicesUps = new[]
            {
                "network",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
    import com.pulumi.ovh.CloudProject.inputs.GetRegionsArgs;
    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 regions = CloudProjectFunctions.getRegions(GetRegionsArgs.builder()
                .serviceName("XXXXXX")
                .hasServicesUps("network")
                .build());
    
        }
    }
    
    variables:
      regions:
        fn::invoke:
          function: ovh:CloudProject:getRegions
          arguments:
            serviceName: XXXXXX
            hasServicesUps:
              - network
    

    Using getRegions

    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 getRegions(args: GetRegionsArgs, opts?: InvokeOptions): Promise<GetRegionsResult>
    function getRegionsOutput(args: GetRegionsOutputArgs, opts?: InvokeOptions): Output<GetRegionsResult>
    def get_regions(has_services_ups: Optional[Sequence[str]] = None,
                    service_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetRegionsResult
    def get_regions_output(has_services_ups: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    service_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetRegionsResult]
    func GetRegions(ctx *Context, args *GetRegionsArgs, opts ...InvokeOption) (*GetRegionsResult, error)
    func GetRegionsOutput(ctx *Context, args *GetRegionsOutputArgs, opts ...InvokeOption) GetRegionsResultOutput

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

    public static class GetRegions 
    {
        public static Task<GetRegionsResult> InvokeAsync(GetRegionsArgs args, InvokeOptions? opts = null)
        public static Output<GetRegionsResult> Invoke(GetRegionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRegionsResult> getRegions(GetRegionsArgs args, InvokeOptions options)
    public static Output<GetRegionsResult> getRegions(GetRegionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:CloudProject/getRegions:getRegions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    HasServicesUps List<string>
    List of services which has to be UP in regions. Example: "image", "instance", "network", "storage", "volume", "workflow", ... If left blank, returns all regions associated with the service_name.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    HasServicesUps []string
    List of services which has to be UP in regions. Example: "image", "instance", "network", "storage", "volume", "workflow", ... If left blank, returns all regions associated with the service_name.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    hasServicesUps List<String>
    List of services which has to be UP in regions. Example: "image", "instance", "network", "storage", "volume", "workflow", ... If left blank, returns all regions associated with the service_name.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    hasServicesUps string[]
    List of services which has to be UP in regions. Example: "image", "instance", "network", "storage", "volume", "workflow", ... If left blank, returns all regions associated with the service_name.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    has_services_ups Sequence[str]
    List of services which has to be UP in regions. Example: "image", "instance", "network", "storage", "volume", "workflow", ... If left blank, returns all regions associated with the service_name.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    hasServicesUps List<String>
    List of services which has to be UP in regions. Example: "image", "instance", "network", "storage", "volume", "workflow", ... If left blank, returns all regions associated with the service_name.

    getRegions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Names List<string>
    The list of regions associated with the project, filtered by services UP.
    ServiceName string
    HasServicesUps List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Names []string
    The list of regions associated with the project, filtered by services UP.
    ServiceName string
    HasServicesUps []string
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    The list of regions associated with the project, filtered by services UP.
    serviceName String
    hasServicesUps List<String>
    id string
    The provider-assigned unique ID for this managed resource.
    names string[]
    The list of regions associated with the project, filtered by services UP.
    serviceName string
    hasServicesUps string[]
    id str
    The provider-assigned unique ID for this managed resource.
    names Sequence[str]
    The list of regions associated with the project, filtered by services UP.
    service_name str
    has_services_ups Sequence[str]
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    The list of regions associated with the project, filtered by services UP.
    serviceName String
    hasServicesUps List<String>

    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.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud
      Meet Neo: Your AI Platform Teammate