Ovh

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

getCloudProjectDatabase

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

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var db = Ovh.GetCloudProjectDatabase.Invoke(new()
    {
        ServiceName = "XXXXXX",
        Engine = "YYYY",
        ClusterId = "ZZZZ",
    });

    return new Dictionary<string, object?>
    {
        ["clusterId"] = db.Apply(getCloudProjectDatabaseResult => getCloudProjectDatabaseResult.ClusterId),
    };
});
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 {
		db, err := ovh.LookupCloudProjectDatabase(ctx, &GetCloudProjectDatabaseArgs{
			ServiceName: "XXXXXX",
			Engine:      "YYYY",
			ClusterId:   "ZZZZ",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("clusterId", db.ClusterId)
		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.GetCloudProjectDatabaseArgs;
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 = OvhFunctions.getCloudProjectDatabase(GetCloudProjectDatabaseArgs.builder()
            .serviceName("XXXXXX")
            .engine("YYYY")
            .clusterId("ZZZZ")
            .build());

        ctx.export("clusterId", db.applyValue(getCloudProjectDatabaseResult -> getCloudProjectDatabaseResult.clusterId()));
    }
}
import pulumi
import pulumi_ovh as ovh

db = ovh.get_cloud_project_database(service_name="XXXXXX",
    engine="YYYY",
    cluster_id="ZZZZ")
pulumi.export("clusterId", db.cluster_id)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const db = ovh.getCloudProjectDatabase({
    serviceName: "XXXXXX",
    engine: "YYYY",
    clusterId: "ZZZZ",
});
export const clusterId = db.then(db => db.clusterId);
variables:
  db:
    Fn::Invoke:
      Function: ovh:getCloudProjectDatabase
      Arguments:
        serviceName: XXXXXX
        engine: YYYY
        clusterId: ZZZZ
outputs:
  clusterId: ${db.clusterId}

Using getCloudProjectDatabase

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 getCloudProjectDatabase(args: GetCloudProjectDatabaseArgs, opts?: InvokeOptions): Promise<GetCloudProjectDatabaseResult>
function getCloudProjectDatabaseOutput(args: GetCloudProjectDatabaseOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectDatabaseResult>
def get_cloud_project_database(cluster_id: Optional[str] = None,
                               engine: Optional[str] = None,
                               service_name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetCloudProjectDatabaseResult
def get_cloud_project_database_output(cluster_id: Optional[pulumi.Input[str]] = None,
                               engine: Optional[pulumi.Input[str]] = None,
                               service_name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectDatabaseResult]
func LookupCloudProjectDatabase(ctx *Context, args *LookupCloudProjectDatabaseArgs, opts ...InvokeOption) (*LookupCloudProjectDatabaseResult, error)
func LookupCloudProjectDatabaseOutput(ctx *Context, args *LookupCloudProjectDatabaseOutputArgs, opts ...InvokeOption) LookupCloudProjectDatabaseResultOutput

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

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

The following arguments are supported:

ClusterId string

Cluster ID

Engine string

The database engine you want to get information. 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.

ClusterId string

Cluster ID

Engine string

The database engine you want to get information. 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.

clusterId String

Cluster ID

engine String

The database engine you want to get information. 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.

clusterId string

Cluster ID

engine string

The database engine you want to get information. 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.

cluster_id str

Cluster ID

engine str

The database engine you want to get information. 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.

clusterId String

Cluster ID

engine String

The database engine you want to get information. 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.

getCloudProjectDatabase Result

The following output properties are available:

BackupTime string

Time on which backups start every day.

ClusterId string
CreatedAt string

Date of the creation of the cluster.

Description string

See Argument Reference above.

Endpoints List<Lbrlabs.PulumiPackage.Ovh.Outputs.GetCloudProjectDatabaseEndpoint>

List of all endpoints objects of the service.

Engine string

See Argument Reference above.

Flavor string

See Argument Reference above.

Id string

The provider-assigned unique ID for this managed resource.

MaintenanceTime string

Time on which maintenances can start every day.

NetworkType string

Type of network of the cluster.

Nodes List<Lbrlabs.PulumiPackage.Ovh.Outputs.GetCloudProjectDatabaseNode>

See Argument Reference above.

Plan string

See Argument Reference above.

ServiceName string

See Argument Reference above.

Status string

Current status of the cluster.

Version string

See Argument Reference above.

BackupTime string

Time on which backups start every day.

ClusterId string
CreatedAt string

Date of the creation of the cluster.

Description string

See Argument Reference above.

Endpoints []GetCloudProjectDatabaseEndpoint

List of all endpoints objects of the service.

Engine string

See Argument Reference above.

Flavor string

See Argument Reference above.

Id string

The provider-assigned unique ID for this managed resource.

MaintenanceTime string

Time on which maintenances can start every day.

NetworkType string

Type of network of the cluster.

Nodes []GetCloudProjectDatabaseNode

See Argument Reference above.

Plan string

See Argument Reference above.

ServiceName string

See Argument Reference above.

Status string

Current status of the cluster.

Version string

See Argument Reference above.

backupTime String

Time on which backups start every day.

clusterId String
createdAt String

Date of the creation of the cluster.

description String

See Argument Reference above.

endpoints List<GetCloudProjectDatabaseEndpoint>

List of all endpoints objects of the service.

engine String

See Argument Reference above.

flavor String

See Argument Reference above.

id String

The provider-assigned unique ID for this managed resource.

maintenanceTime String

Time on which maintenances can start every day.

networkType String

Type of network of the cluster.

nodes List<GetCloudProjectDatabaseNode>

See Argument Reference above.

plan String

See Argument Reference above.

serviceName String

See Argument Reference above.

status String

Current status of the cluster.

version String

See Argument Reference above.

backupTime string

Time on which backups start every day.

clusterId string
createdAt string

Date of the creation of the cluster.

description string

See Argument Reference above.

endpoints GetCloudProjectDatabaseEndpoint[]

List of all endpoints objects of the service.

engine string

See Argument Reference above.

flavor string

See Argument Reference above.

id string

The provider-assigned unique ID for this managed resource.

maintenanceTime string

Time on which maintenances can start every day.

networkType string

Type of network of the cluster.

nodes GetCloudProjectDatabaseNode[]

See Argument Reference above.

plan string

See Argument Reference above.

serviceName string

See Argument Reference above.

status string

Current status of the cluster.

version string

See Argument Reference above.

backup_time str

Time on which backups start every day.

cluster_id str
created_at str

Date of the creation of the cluster.

description str

See Argument Reference above.

endpoints Sequence[GetCloudProjectDatabaseEndpoint]

List of all endpoints objects of the service.

engine str

See Argument Reference above.

flavor str

See Argument Reference above.

id str

The provider-assigned unique ID for this managed resource.

maintenance_time str

Time on which maintenances can start every day.

network_type str

Type of network of the cluster.

nodes Sequence[GetCloudProjectDatabaseNode]

See Argument Reference above.

plan str

See Argument Reference above.

service_name str

See Argument Reference above.

status str

Current status of the cluster.

version str

See Argument Reference above.

backupTime String

Time on which backups start every day.

clusterId String
createdAt String

Date of the creation of the cluster.

description String

See Argument Reference above.

endpoints List<Property Map>

List of all endpoints objects of the service.

engine String

See Argument Reference above.

flavor String

See Argument Reference above.

id String

The provider-assigned unique ID for this managed resource.

maintenanceTime String

Time on which maintenances can start every day.

networkType String

Type of network of the cluster.

nodes List<Property Map>

See Argument Reference above.

plan String

See Argument Reference above.

serviceName String

See Argument Reference above.

status String

Current status of the cluster.

version String

See Argument Reference above.

Supporting Types

GetCloudProjectDatabaseEndpoint

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.

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

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

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

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

sslMode String

SSL mode used to connect to the service if the SSL is enabled.

uri String

URI of the endpoint.

GetCloudProjectDatabaseNode

NetworkId string
Region string
SubnetId string
NetworkId string
Region string
SubnetId string
networkId String
region String
subnetId String
networkId string
region string
subnetId string
networkId String
region String
subnetId 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.