ovh.CloudProjectDatabase.getDatabase
Use this data source to get the managed database of a public cloud project.
Example Usage
To get information of a database cluster service
using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var db = Ovh.CloudProjectDatabase.GetDatabase.Invoke(new()
{
ServiceName = "XXXXXX",
Engine = "YYYY",
Id = "ZZZZ",
});
return new Dictionary<string, object?>
{
["clusterId"] = db.Apply(getDatabaseResult => getDatabaseResult.Id),
};
});
package main
import (
"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/CloudProjectDatabase"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
db, err := CloudProjectDatabase.GetDatabase(ctx, &cloudprojectdatabase.GetDatabaseArgs{
ServiceName: "XXXXXX",
Engine: "YYYY",
Id: "ZZZZ",
}, nil)
if err != nil {
return err
}
ctx.Export("clusterId", db.Id)
return nil
})
}
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.GetDatabaseArgs;
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 db = CloudProjectDatabaseFunctions.getDatabase(GetDatabaseArgs.builder()
.serviceName("XXXXXX")
.engine("YYYY")
.id("ZZZZ")
.build());
ctx.export("clusterId", db.applyValue(getDatabaseResult -> getDatabaseResult.id()));
}
}
import pulumi
import pulumi_ovh as ovh
db = ovh.CloudProjectDatabase.get_database(service_name="XXXXXX",
engine="YYYY",
id="ZZZZ")
pulumi.export("clusterId", db.id)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const db = ovh.CloudProjectDatabase.getDatabase({
serviceName: "XXXXXX",
engine: "YYYY",
id: "ZZZZ",
});
export const clusterId = db.then(db => db.id);
variables:
db:
fn::invoke:
Function: ovh:CloudProjectDatabase:getDatabase
Arguments:
serviceName: XXXXXX
engine: YYYY
id: ZZZZ
outputs:
clusterId: ${db.id}
Using getDatabase
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 getDatabase(args: GetDatabaseArgs, opts?: InvokeOptions): Promise<GetDatabaseResult>
function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: InvokeOptions): Output<GetDatabaseResult>
def get_database(engine: Optional[str] = None,
id: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseResult
def get_database_output(engine: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseResult]
func GetDatabase(ctx *Context, args *GetDatabaseArgs, opts ...InvokeOption) (*GetDatabaseResult, error)
func GetDatabaseOutput(ctx *Context, args *GetDatabaseOutputArgs, opts ...InvokeOption) GetDatabaseResultOutput
> Note: This function is named GetDatabase
in the Go SDK.
public static class GetDatabase
{
public static Task<GetDatabaseResult> InvokeAsync(GetDatabaseArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseResult> Invoke(GetDatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabaseResult> getDatabase(GetDatabaseArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:CloudProjectDatabase/getDatabase:getDatabase
arguments:
# arguments dictionary
The following arguments are supported:
- Engine string
The database engine you want to get information. To get a full list of available engine visit: public documentation.
- Id string
Cluster ID
- Service
Name 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 get information. To get a full list of available engine visit: public documentation.
- Id string
Cluster ID
- Service
Name 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 get information. To get a full list of available engine visit: public documentation.
- id String
Cluster ID
- service
Name 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 get information. To get a full list of available engine visit: public documentation.
- id string
Cluster ID
- service
Name 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 get information. To get a full list of available engine visit: public documentation.
- id str
Cluster ID
- 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 get information. To get a full list of available engine visit: public documentation.
- id String
Cluster ID
- service
Name String The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICE
environment variable is used.
getDatabase Result
The following output properties are available:
- Backup
Time string Time on which backups start every day.
- Created
At string Date of the creation of the cluster.
- Description string
Small description of the database service.
- Disk
Size int The disk size (in GB) of the database service.
- Disk
Type string The disk type of the database service.
- Endpoints
List<Lbrlabs.
Pulumi Package. Ovh. Cloud Project Database. Outputs. Get Database Endpoint> List of all endpoints objects of the service.
- Engine string
See Argument Reference above.
- Flavor string
A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- Id string
See Argument Reference above.
- Kafka
Rest boolApi Defines whether the REST API is enabled on a kafka cluster.
- Maintenance
Time string Time on which maintenances can start every day.
- Network
Type string Type of network of the cluster.
- Nodes
List<Lbrlabs.
Pulumi Package. Ovh. Cloud Project Database. Outputs. Get Database Node> List of nodes object.
- Opensearch
Acls boolEnabled - Plan string
Plan of the cluster.
- Service
Name string See Argument Reference above.
- Status string
Current status of the cluster.
- Version string
The version of the engine in which the service should be deployed
- Backup
Time string Time on which backups start every day.
- Created
At string Date of the creation of the cluster.
- Description string
Small description of the database service.
- Disk
Size int The disk size (in GB) of the database service.
- Disk
Type string The disk type of the database service.
- Endpoints
[]Get
Database Endpoint List of all endpoints objects of the service.
- Engine string
See Argument Reference above.
- Flavor string
A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- Id string
See Argument Reference above.
- Kafka
Rest boolApi Defines whether the REST API is enabled on a kafka cluster.
- Maintenance
Time string Time on which maintenances can start every day.
- Network
Type string Type of network of the cluster.
- Nodes
[]Get
Database Node List of nodes object.
- Opensearch
Acls boolEnabled - Plan string
Plan of the cluster.
- Service
Name string See Argument Reference above.
- Status string
Current status of the cluster.
- Version string
The version of the engine in which the service should be deployed
- backup
Time String Time on which backups start every day.
- created
At String Date of the creation of the cluster.
- description String
Small description of the database service.
- disk
Size Integer The disk size (in GB) of the database service.
- disk
Type String The disk type of the database service.
- endpoints
List<Get
Database Endpoint> List of all endpoints objects of the service.
- engine String
See Argument Reference above.
- flavor String
A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id String
See Argument Reference above.
- kafka
Rest BooleanApi Defines whether the REST API is enabled on a kafka cluster.
- maintenance
Time String Time on which maintenances can start every day.
- network
Type String Type of network of the cluster.
- nodes
List<Get
Database Node> List of nodes object.
- opensearch
Acls BooleanEnabled - plan String
Plan of the cluster.
- service
Name String See Argument Reference above.
- status String
Current status of the cluster.
- version String
The version of the engine in which the service should be deployed
- backup
Time string Time on which backups start every day.
- created
At string Date of the creation of the cluster.
- description string
Small description of the database service.
- disk
Size number The disk size (in GB) of the database service.
- disk
Type string The disk type of the database service.
- endpoints
Get
Database Endpoint[] List of all endpoints objects of the service.
- engine string
See Argument Reference above.
- flavor string
A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id string
See Argument Reference above.
- kafka
Rest booleanApi Defines whether the REST API is enabled on a kafka cluster.
- maintenance
Time string Time on which maintenances can start every day.
- network
Type string Type of network of the cluster.
- nodes
Get
Database Node[] List of nodes object.
- opensearch
Acls booleanEnabled - plan string
Plan of the cluster.
- service
Name string See Argument Reference above.
- status string
Current status of the cluster.
- version string
The version of the engine in which the service should be deployed
- backup_
time str Time on which backups start every day.
- created_
at str Date of the creation of the cluster.
- description str
Small description of the database service.
- disk_
size int The disk size (in GB) of the database service.
- disk_
type str The disk type of the database service.
- endpoints
Get
Database Endpoint] List of all endpoints objects of the service.
- engine str
See Argument Reference above.
- flavor str
A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id str
See Argument Reference above.
- kafka_
rest_ boolapi Defines whether the REST API is enabled on a kafka cluster.
- maintenance_
time str Time on which maintenances can start every day.
- network_
type str Type of network of the cluster.
- nodes
Get
Database Node] List of nodes object.
- opensearch_
acls_ boolenabled - plan str
Plan of the cluster.
- service_
name str See Argument Reference above.
- status str
Current status of the cluster.
- version str
The version of the engine in which the service should be deployed
- backup
Time String Time on which backups start every day.
- created
At String Date of the creation of the cluster.
- description String
Small description of the database service.
- disk
Size Number The disk size (in GB) of the database service.
- disk
Type String The disk type of the database service.
- endpoints List<Property Map>
List of all endpoints objects of the service.
- engine String
See Argument Reference above.
- flavor String
A valid OVHcloud public cloud database flavor name in which the nodes will be started.
- id String
See Argument Reference above.
- kafka
Rest BooleanApi Defines whether the REST API is enabled on a kafka cluster.
- maintenance
Time String Time on which maintenances can start every day.
- network
Type String Type of network of the cluster.
- nodes List<Property Map>
List of nodes object.
- opensearch
Acls BooleanEnabled - plan String
Plan of the cluster.
- service
Name String See Argument Reference above.
- status String
Current status of the cluster.
- version String
The version of the engine in which the service should be deployed
Supporting Types
GetDatabaseEndpoint
- Component string
Type of component the URI relates to.
- Domain string
Domain of the cluster.
- Path string
Path of the endpoint.
- Port int
Connection port for the endpoint.
- Scheme string
Scheme used to generate the URI.
- Ssl bool
Defines whether the endpoint uses SSL.
- Ssl
Mode string SSL mode used to connect to the service if the SSL is enabled.
- Uri string
URI of the endpoint.
- Component string
Type of component the URI relates to.
- Domain string
Domain of the cluster.
- Path string
Path of the endpoint.
- Port int
Connection port for the endpoint.
- Scheme string
Scheme used to generate the URI.
- Ssl bool
Defines whether the endpoint uses SSL.
- Ssl
Mode string SSL mode used to connect to the service if the SSL is enabled.
- Uri string
URI of the endpoint.
- component String
Type of component the URI relates to.
- domain String
Domain of the cluster.
- path String
Path of the endpoint.
- port Integer
Connection port for the endpoint.
- scheme String
Scheme used to generate the URI.
- ssl Boolean
Defines whether the endpoint uses SSL.
- ssl
Mode String SSL mode used to connect to the service if the SSL is enabled.
- uri String
URI of the endpoint.
- component string
Type of component the URI relates to.
- domain string
Domain of the cluster.
- path string
Path of the endpoint.
- port number
Connection port for the endpoint.
- scheme string
Scheme used to generate the URI.
- ssl boolean
Defines whether the endpoint uses SSL.
- ssl
Mode string SSL mode used to connect to the service if the SSL is enabled.
- uri string
URI of the endpoint.
- component str
Type of component the URI relates to.
- domain str
Domain of the cluster.
- path str
Path of the endpoint.
- port int
Connection port for the endpoint.
- scheme str
Scheme used to generate the URI.
- ssl bool
Defines whether the endpoint uses SSL.
- ssl_
mode str SSL mode used to connect to the service if the SSL is enabled.
- uri str
URI of the endpoint.
- component String
Type of component the URI relates to.
- domain String
Domain of the cluster.
- path String
Path of the endpoint.
- port Number
Connection port for the endpoint.
- scheme String
Scheme used to generate the URI.
- ssl Boolean
Defines whether the endpoint uses SSL.
- ssl
Mode String SSL mode used to connect to the service if the SSL is enabled.
- uri String
URI of the endpoint.
GetDatabaseNode
- network_
id str Private network id in which the node should be deployed. It's the regional openstackId of the private network
- region str
Public cloud region in which the node should be deployed.
- subnet_
id str Private subnet ID in which the node is.
Package Details
- Repository
- ovh lbrlabs/pulumi-ovh
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
ovh
Terraform Provider.