Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

getCloudProjectRegions

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var regions = Ovh.GetCloudProjectRegions.Invoke(new()
    {
        HasServicesUps = new[]
        {
            "network",
        },
        ServiceName = "XXXXXX",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ovh.GetCloudProjectRegions(ctx, &GetCloudProjectRegionsArgs{
			HasServicesUps: []string{
				"network",
			},
			ServiceName: "XXXXXX",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetCloudProjectRegionsArgs;
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 = OvhFunctions.getCloudProjectRegions(GetCloudProjectRegionsArgs.builder()
            .hasServicesUps("network")
            .serviceName("XXXXXX")
            .build());

    }
}
import pulumi
import pulumi_ovh as ovh

regions = ovh.get_cloud_project_regions(has_services_ups=["network"],
    service_name="XXXXXX")
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const regions = pulumi.output(ovh.getCloudProjectRegions({
    hasServicesUps: ["network"],
    serviceName: "XXXXXX",
}));
variables:
  regions:
    Fn::Invoke:
      Function: ovh:getCloudProjectRegions
      Arguments:
        hasServicesUps:
          - network
        serviceName: XXXXXX

Using getCloudProjectRegions

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 getCloudProjectRegions(args: GetCloudProjectRegionsArgs, opts?: InvokeOptions): Promise<GetCloudProjectRegionsResult>
function getCloudProjectRegionsOutput(args: GetCloudProjectRegionsOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectRegionsResult>
def get_cloud_project_regions(has_services_ups: Optional[Sequence[str]] = None,
                              service_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCloudProjectRegionsResult
def get_cloud_project_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[GetCloudProjectRegionsResult]
func GetCloudProjectRegions(ctx *Context, args *GetCloudProjectRegionsArgs, opts ...InvokeOption) (*GetCloudProjectRegionsResult, error)
func GetCloudProjectRegionsOutput(ctx *Context, args *GetCloudProjectRegionsOutputArgs, opts ...InvokeOption) GetCloudProjectRegionsResultOutput

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

public static class GetCloudProjectRegions 
{
    public static Task<GetCloudProjectRegionsResult> InvokeAsync(GetCloudProjectRegionsArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudProjectRegionsResult> Invoke(GetCloudProjectRegionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProjectRegionsResult> getCloudProjectRegions(GetCloudProjectRegionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: ovh:index/getCloudProjectRegions:getCloudProjectRegions
  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.

getCloudProjectRegions 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
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.