1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getRegion
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.getRegion

Explore with Pulumi AI

OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

Use this data source to retrieve information about a region associated with a public cloud project. The region must be associated with the project.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const gRA1 = ovh.CloudProject.getRegion({
    name: "GRA1",
    serviceName: "XXXXXX",
});
Copy
import pulumi
import pulumi_ovh as ovh

g_ra1 = ovh.CloudProject.get_region(name="GRA1",
    service_name="XXXXXX")
Copy
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.GetRegion(ctx, &cloudproject.GetRegionArgs{
			Name:        "GRA1",
			ServiceName: "XXXXXX",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var gRA1 = Ovh.CloudProject.GetRegion.Invoke(new()
    {
        Name = "GRA1",
        ServiceName = "XXXXXX",
    });

});
Copy
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.GetRegionArgs;
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 gRA1 = CloudProjectFunctions.getRegion(GetRegionArgs.builder()
            .name("GRA1")
            .serviceName("XXXXXX")
            .build());

    }
}
Copy
variables:
  gRA1:
    fn::invoke:
      function: ovh:CloudProject:getRegion
      arguments:
        name: GRA1
        serviceName: XXXXXX
Copy

Using getRegion

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 getRegion(args: GetRegionArgs, opts?: InvokeOptions): Promise<GetRegionResult>
function getRegionOutput(args: GetRegionOutputArgs, opts?: InvokeOptions): Output<GetRegionResult>
Copy
def get_region(name: Optional[str] = None,
               service_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetRegionResult
def get_region_output(name: Optional[pulumi.Input[str]] = None,
               service_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetRegionResult]
Copy
func GetRegion(ctx *Context, args *GetRegionArgs, opts ...InvokeOption) (*GetRegionResult, error)
func GetRegionOutput(ctx *Context, args *GetRegionOutputArgs, opts ...InvokeOption) GetRegionResultOutput
Copy

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

public static class GetRegion 
{
    public static Task<GetRegionResult> InvokeAsync(GetRegionArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionResult> Invoke(GetRegionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRegionResult> getRegion(GetRegionArgs args, InvokeOptions options)
public static Output<GetRegionResult> getRegion(GetRegionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProject/getRegion:getRegion
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name
This property is required.
Changes to this property will trigger replacement.
string
The name of the region associated with the public cloud project.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
Name
This property is required.
Changes to this property will trigger replacement.
string
The name of the region associated with the public cloud project.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name
This property is required.
Changes to this property will trigger replacement.
String
The name of the region associated with the public cloud project.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name
This property is required.
Changes to this property will trigger replacement.
string
The name of the region associated with the public cloud project.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name
This property is required.
Changes to this property will trigger replacement.
str
The name of the region associated with the public cloud project.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
name
This property is required.
Changes to this property will trigger replacement.
String
The name of the region associated with the public cloud project.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getRegion Result

The following output properties are available:

ContinentCode string
the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
DatacenterLocation string
The location code of the datacenter. E.g.: "GRA", meaning Gravelines, for region "GRA1"
Id string
The provider-assigned unique ID for this managed resource.
Name string
the name of the public cloud service
ServiceName string
Services List<GetRegionService>
The list of public cloud services running within the region
ContinentCode string
the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
DatacenterLocation string
The location code of the datacenter. E.g.: "GRA", meaning Gravelines, for region "GRA1"
Id string
The provider-assigned unique ID for this managed resource.
Name string
the name of the public cloud service
ServiceName string
Services []GetRegionService
The list of public cloud services running within the region
continentCode String
the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
datacenterLocation String
The location code of the datacenter. E.g.: "GRA", meaning Gravelines, for region "GRA1"
id String
The provider-assigned unique ID for this managed resource.
name String
the name of the public cloud service
serviceName String
services List<GetRegionService>
The list of public cloud services running within the region
continentCode string
the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
datacenterLocation string
The location code of the datacenter. E.g.: "GRA", meaning Gravelines, for region "GRA1"
id string
The provider-assigned unique ID for this managed resource.
name string
the name of the public cloud service
serviceName string
services GetRegionService[]
The list of public cloud services running within the region
continent_code str
the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
datacenter_location str
The location code of the datacenter. E.g.: "GRA", meaning Gravelines, for region "GRA1"
id str
The provider-assigned unique ID for this managed resource.
name str
the name of the public cloud service
service_name str
services Sequence[cloudproject.GetRegionService]
The list of public cloud services running within the region
continentCode String
the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
datacenterLocation String
The location code of the datacenter. E.g.: "GRA", meaning Gravelines, for region "GRA1"
id String
The provider-assigned unique ID for this managed resource.
name String
the name of the public cloud service
serviceName String
services List<Property Map>
The list of public cloud services running within the region

Supporting Types

GetRegionService

Name This property is required. string
The name of the region associated with the public cloud project.
Status This property is required. string
the status of the service
Name This property is required. string
The name of the region associated with the public cloud project.
Status This property is required. string
the status of the service
name This property is required. String
The name of the region associated with the public cloud project.
status This property is required. String
the status of the service
name This property is required. string
The name of the region associated with the public cloud project.
status This property is required. string
the status of the service
name This property is required. str
The name of the region associated with the public cloud project.
status This property is required. str
the status of the service
name This property is required. String
The name of the region associated with the public cloud project.
status This property is required. String
the status of the service

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud