1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getRegion
OVHCloud v0.40.1 published on Tuesday, Mar 26, 2024 by OVHcloud

ovh.CloudProject.getRegion

Explore with Pulumi AI

ovh logo
OVHCloud v0.40.1 published on Tuesday, Mar 26, 2024 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",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    g_ra1 = ovh.CloudProject.get_region(name="GRA1",
        service_name="XXXXXX")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      gRA1:
        fn::invoke:
          Function: ovh:CloudProject:getRegion
          Arguments:
            name: GRA1
            serviceName: XXXXXX
    

    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>
    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]
    func GetRegion(ctx *Context, args *GetRegionArgs, opts ...InvokeOption) (*GetRegionResult, error)
    func GetRegionOutput(ctx *Context, args *GetRegionOutputArgs, opts ...InvokeOption) GetRegionResultOutput

    > 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)
    }
    public static CompletableFuture<GetRegionResult> getRegion(GetRegionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:CloudProject/getRegion:getRegion
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the region associated with the public cloud project.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    The name of the region associated with the public cloud project.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    The name of the region associated with the public cloud project.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name string
    The name of the region associated with the public cloud project.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name str
    The name of the region associated with the public cloud project.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    The name of the region associated with the public cloud project.
    serviceName 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 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 string
    The name of the region associated with the public cloud project.
    Status string
    the status of the service
    Name string
    The name of the region associated with the public cloud project.
    Status string
    the status of the service
    name String
    The name of the region associated with the public cloud project.
    status String
    the status of the service
    name string
    The name of the region associated with the public cloud project.
    status string
    the status of the service
    name str
    The name of the region associated with the public cloud project.
    status str
    the status of the service
    name String
    The name of the region associated with the public cloud project.
    status 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.
    ovh logo
    OVHCloud v0.40.1 published on Tuesday, Mar 26, 2024 by OVHcloud