OVHCloud v1.1.0 published on Thursday, Nov 21, 2024 by OVHcloud
ovh.CloudProject.getRegion
Explore with Pulumi AI
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.
- Service
Name 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.
- Service
Name 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.
- service
Name 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.
- service
Name 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.
- service
Name 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:
- Continent
Code string - the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
- Datacenter
Location 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
- Service
Name string - Services
List<Get
Region Service> - The list of public cloud services running within the region
- Continent
Code string - the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
- Datacenter
Location 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
- Service
Name string - Services
[]Get
Region Service - The list of public cloud services running within the region
- continent
Code String - the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
- datacenter
Location 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
- service
Name String - services
List<Get
Region Service> - The list of public cloud services running within the region
- continent
Code string - the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
- datacenter
Location 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
- service
Name string - services
Get
Region Service[] - 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.
Get Region Service] - The list of public cloud services running within the region
- continent
Code String - the code of the geographic continent the region is running. E.g.: EU for Europe, US for America...
- datacenter
Location 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
- service
Name String - services List<Property Map>
- The list of public cloud services running within the region
Supporting Types
GetRegionService
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.