Ovh

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

getCloudProjectDatabases

Use this data source to get the list of managed databases of a public cloud project.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var dbs = Ovh.GetCloudProjectDatabases.Invoke(new()
    {
        ServiceName = "XXXXXX",
        Engine = "YYYY",
    });

    return new Dictionary<string, object?>
    {
        ["clusterIds"] = dbs.Apply(getCloudProjectDatabasesResult => getCloudProjectDatabasesResult.ClusterIds),
    };
});
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 {
		dbs, err := ovh.GetCloudProjectDatabases(ctx, &GetCloudProjectDatabasesArgs{
			ServiceName: "XXXXXX",
			Engine:      "YYYY",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("clusterIds", dbs.ClusterIds)
		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.GetCloudProjectDatabasesArgs;
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 dbs = OvhFunctions.getCloudProjectDatabases(GetCloudProjectDatabasesArgs.builder()
            .serviceName("XXXXXX")
            .engine("YYYY")
            .build());

        ctx.export("clusterIds", dbs.applyValue(getCloudProjectDatabasesResult -> getCloudProjectDatabasesResult.clusterIds()));
    }
}
import pulumi
import pulumi_ovh as ovh

dbs = ovh.get_cloud_project_databases(service_name="XXXXXX",
    engine="YYYY")
pulumi.export("clusterIds", dbs.cluster_ids)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const dbs = ovh.getCloudProjectDatabases({
    serviceName: "XXXXXX",
    engine: "YYYY",
});
export const clusterIds = dbs.then(dbs => dbs.clusterIds);
variables:
  dbs:
    Fn::Invoke:
      Function: ovh:getCloudProjectDatabases
      Arguments:
        serviceName: XXXXXX
        engine: YYYY
outputs:
  clusterIds: ${dbs.clusterIds}

Using getCloudProjectDatabases

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 getCloudProjectDatabases(args: GetCloudProjectDatabasesArgs, opts?: InvokeOptions): Promise<GetCloudProjectDatabasesResult>
function getCloudProjectDatabasesOutput(args: GetCloudProjectDatabasesOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectDatabasesResult>
def get_cloud_project_databases(engine: Optional[str] = None,
                                service_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetCloudProjectDatabasesResult
def get_cloud_project_databases_output(engine: Optional[pulumi.Input[str]] = None,
                                service_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectDatabasesResult]
func GetCloudProjectDatabases(ctx *Context, args *GetCloudProjectDatabasesArgs, opts ...InvokeOption) (*GetCloudProjectDatabasesResult, error)
func GetCloudProjectDatabasesOutput(ctx *Context, args *GetCloudProjectDatabasesOutputArgs, opts ...InvokeOption) GetCloudProjectDatabasesResultOutput

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

public static class GetCloudProjectDatabases 
{
    public static Task<GetCloudProjectDatabasesResult> InvokeAsync(GetCloudProjectDatabasesArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudProjectDatabasesResult> Invoke(GetCloudProjectDatabasesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProjectDatabasesResult> getCloudProjectDatabases(GetCloudProjectDatabasesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: ovh:index/getCloudProjectDatabases:getCloudProjectDatabases
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Engine string

The database engine you want to list. To get a full list of available engine visit. public documentation.

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

Engine string

The database engine you want to list. To get a full list of available engine visit. public documentation.

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

engine String

The database engine you want to list. To get a full list of available engine visit. public documentation.

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

engine string

The database engine you want to list. To get a full list of available engine visit. public documentation.

serviceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

engine str

The database engine you want to list. To get a full list of available engine visit. public documentation.

service_name str

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

engine String

The database engine you want to list. To get a full list of available engine visit. public documentation.

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getCloudProjectDatabases Result

The following output properties are available:

ClusterIds List<string>

The list of managed databases ids of the project.

Engine string
Id string

The provider-assigned unique ID for this managed resource.

ServiceName string
ClusterIds []string

The list of managed databases ids of the project.

Engine string
Id string

The provider-assigned unique ID for this managed resource.

ServiceName string
clusterIds List<String>

The list of managed databases ids of the project.

engine String
id String

The provider-assigned unique ID for this managed resource.

serviceName String
clusterIds string[]

The list of managed databases ids of the project.

engine string
id string

The provider-assigned unique ID for this managed resource.

serviceName string
cluster_ids Sequence[str]

The list of managed databases ids of the project.

engine str
id str

The provider-assigned unique ID for this managed resource.

service_name str
clusterIds List<String>

The list of managed databases ids of the project.

engine String
id String

The provider-assigned unique ID for this managed resource.

serviceName 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.