Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Use this data source to get the list of managed databases of a public cloud project.
Example Usage
To get the list of database clusters service for a given engine:
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const dbs = ovh.CloudProjectDatabase.getDatabases({
serviceName: "XXXXXX",
engine: "YYYY",
});
export const clusterIds = dbs.then(dbs => dbs.clusterIds);
import pulumi
import pulumi_ovh as ovh
dbs = ovh.CloudProjectDatabase.get_databases(service_name="XXXXXX",
engine="YYYY")
pulumi.export("clusterIds", dbs.cluster_ids)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudprojectdatabase"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dbs, err := cloudprojectdatabase.GetDatabases(ctx, &cloudprojectdatabase.GetDatabasesArgs{
ServiceName: "XXXXXX",
Engine: "YYYY",
}, nil)
if err != nil {
return err
}
ctx.Export("clusterIds", dbs.ClusterIds)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var dbs = Ovh.CloudProjectDatabase.GetDatabases.Invoke(new()
{
ServiceName = "XXXXXX",
Engine = "YYYY",
});
return new Dictionary<string, object?>
{
["clusterIds"] = dbs.Apply(getDatabasesResult => getDatabasesResult.ClusterIds),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetDatabasesArgs;
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 = CloudProjectDatabaseFunctions.getDatabases(GetDatabasesArgs.builder()
.serviceName("XXXXXX")
.engine("YYYY")
.build());
ctx.export("clusterIds", dbs.clusterIds());
}
}
variables:
dbs:
fn::invoke:
function: ovh:CloudProjectDatabase:getDatabases
arguments:
serviceName: XXXXXX
engine: YYYY
outputs:
clusterIds: ${dbs.clusterIds}
Using getDatabases
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 getDatabases(args: GetDatabasesArgs, opts?: InvokeOptions): Promise<GetDatabasesResult>
function getDatabasesOutput(args: GetDatabasesOutputArgs, opts?: InvokeOptions): Output<GetDatabasesResult>def get_databases(engine: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabasesResult
def get_databases_output(engine: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabasesResult]func GetDatabases(ctx *Context, args *GetDatabasesArgs, opts ...InvokeOption) (*GetDatabasesResult, error)
func GetDatabasesOutput(ctx *Context, args *GetDatabasesOutputArgs, opts ...InvokeOption) GetDatabasesResultOutput> Note: This function is named GetDatabases in the Go SDK.
public static class GetDatabases
{
public static Task<GetDatabasesResult> InvokeAsync(GetDatabasesArgs args, InvokeOptions? opts = null)
public static Output<GetDatabasesResult> Invoke(GetDatabasesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
public static Output<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
fn::invoke:
function: ovh:CloudProjectDatabase/getDatabases:getDatabases
arguments:
# arguments dictionaryThe following arguments are supported:
- Engine string
- The database engine you want to list. To get a full list of available engine visit: public documentation.
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- Engine string
- The database engine you want to list. To get a full list of available engine visit: public documentation.
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- engine String
- The database engine you want to list. To get a full list of available engine visit: public documentation.
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- engine string
- The database engine you want to list. To get a full list of available engine visit: public documentation.
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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_SERVICEenvironment variable is used.
- engine String
- The database engine you want to list. To get a full list of available engine visit: public documentation.
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
getDatabases Result
The following output properties are available:
- Cluster
Ids List<string> - The list of managed databases ids of the project.
- Engine string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - See Argument Reference above.
- Cluster
Ids []string - The list of managed databases ids of the project.
- Engine string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Name string - See Argument Reference above.
- cluster
Ids List<String> - The list of managed databases ids of the project.
- engine String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - See Argument Reference above.
- cluster
Ids string[] - The list of managed databases ids of the project.
- engine string
- See Argument Reference above.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Name string - See Argument Reference above.
- cluster_
ids Sequence[str] - The list of managed databases ids of the project.
- engine str
- See Argument Reference above.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
name str - See Argument Reference above.
- cluster
Ids List<String> - The list of managed databases ids of the project.
- engine String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Name String - See Argument Reference above.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
