1. Packages
  2. DigitalOcean
  3. API Docs
  4. getDatabaseCluster
DigitalOcean v4.24.0 published on Friday, Nov 17, 2023 by Pulumi

digitalocean.getDatabaseCluster

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.24.0 published on Friday, Nov 17, 2023 by Pulumi

    Provides information on a DigitalOcean database cluster resource.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = DigitalOcean.GetDatabaseCluster.Invoke(new()
        {
            Name = "example-cluster",
        });
    
        return new Dictionary<string, object?>
        {
            ["databaseOutput"] = example.Apply(getDatabaseClusterResult => getDatabaseClusterResult.Uri),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := digitalocean.LookupDatabaseCluster(ctx, &digitalocean.LookupDatabaseClusterArgs{
    			Name: "example-cluster",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("databaseOutput", example.Uri)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetDatabaseClusterArgs;
    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 example = DigitaloceanFunctions.getDatabaseCluster(GetDatabaseClusterArgs.builder()
                .name("example-cluster")
                .build());
    
            ctx.export("databaseOutput", example.applyValue(getDatabaseClusterResult -> getDatabaseClusterResult.uri()));
        }
    }
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.get_database_cluster(name="example-cluster")
    pulumi.export("databaseOutput", example.uri)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = digitalocean.getDatabaseCluster({
        name: "example-cluster",
    });
    export const databaseOutput = example.then(example => example.uri);
    
    variables:
      example:
        fn::invoke:
          Function: digitalocean:getDatabaseCluster
          Arguments:
            name: example-cluster
    outputs:
      databaseOutput: ${example.uri}
    

    Using getDatabaseCluster

    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 getDatabaseCluster(args: GetDatabaseClusterArgs, opts?: InvokeOptions): Promise<GetDatabaseClusterResult>
    function getDatabaseClusterOutput(args: GetDatabaseClusterOutputArgs, opts?: InvokeOptions): Output<GetDatabaseClusterResult>
    def get_database_cluster(name: Optional[str] = None,
                             tags: Optional[Sequence[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> GetDatabaseClusterResult
    def get_database_cluster_output(name: Optional[pulumi.Input[str]] = None,
                             tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseClusterResult]
    func LookupDatabaseCluster(ctx *Context, args *LookupDatabaseClusterArgs, opts ...InvokeOption) (*LookupDatabaseClusterResult, error)
    func LookupDatabaseClusterOutput(ctx *Context, args *LookupDatabaseClusterOutputArgs, opts ...InvokeOption) LookupDatabaseClusterResultOutput

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

    public static class GetDatabaseCluster 
    {
        public static Task<GetDatabaseClusterResult> InvokeAsync(GetDatabaseClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseClusterResult> Invoke(GetDatabaseClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseClusterResult> getDatabaseCluster(GetDatabaseClusterArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: digitalocean:index/getDatabaseCluster:getDatabaseCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    The name of the database cluster.

    Tags List<string>
    Name string

    The name of the database cluster.

    Tags []string
    name String

    The name of the database cluster.

    tags List<String>
    name string

    The name of the database cluster.

    tags string[]
    name str

    The name of the database cluster.

    tags Sequence[str]
    name String

    The name of the database cluster.

    tags List<String>

    getDatabaseCluster Result

    The following output properties are available:

    Database string

    Name of the cluster's default database.

    Engine string

    Database engine used by the cluster (ex. pg for PostreSQL).

    Host string

    Database cluster's hostname.

    Id string

    The provider-assigned unique ID for this managed resource.

    MaintenanceWindows List<Pulumi.DigitalOcean.Outputs.GetDatabaseClusterMaintenanceWindow>

    Defines when the automatic maintenance should be performed for the database cluster.

    Name string
    NodeCount int

    Number of nodes that will be included in the cluster.

    Password string

    Password for the cluster's default user.

    Port int

    Network port that the database cluster is listening on.

    PrivateHost string

    Same as host, but only accessible from resources within the account and in the same region.

    PrivateNetworkUuid string

    The ID of the VPC where the database cluster is located.

    PrivateUri string

    Same as uri, but only accessible from resources within the account and in the same region.

    ProjectId string

    The ID of the project that the database cluster is assigned to.

    Region string

    DigitalOcean region where the cluster will reside.

    Size string

    Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

    StorageSizeMib string
    Uri string

    The full URI for connecting to the database cluster.

    Urn string

    The uniform resource name of the database cluster.

    User string

    Username for the cluster's default user.

    Version string

    Engine version used by the cluster (ex. 11 for PostgreSQL 11).

    Tags List<string>
    Database string

    Name of the cluster's default database.

    Engine string

    Database engine used by the cluster (ex. pg for PostreSQL).

    Host string

    Database cluster's hostname.

    Id string

    The provider-assigned unique ID for this managed resource.

    MaintenanceWindows []GetDatabaseClusterMaintenanceWindow

    Defines when the automatic maintenance should be performed for the database cluster.

    Name string
    NodeCount int

    Number of nodes that will be included in the cluster.

    Password string

    Password for the cluster's default user.

    Port int

    Network port that the database cluster is listening on.

    PrivateHost string

    Same as host, but only accessible from resources within the account and in the same region.

    PrivateNetworkUuid string

    The ID of the VPC where the database cluster is located.

    PrivateUri string

    Same as uri, but only accessible from resources within the account and in the same region.

    ProjectId string

    The ID of the project that the database cluster is assigned to.

    Region string

    DigitalOcean region where the cluster will reside.

    Size string

    Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

    StorageSizeMib string
    Uri string

    The full URI for connecting to the database cluster.

    Urn string

    The uniform resource name of the database cluster.

    User string

    Username for the cluster's default user.

    Version string

    Engine version used by the cluster (ex. 11 for PostgreSQL 11).

    Tags []string
    database String

    Name of the cluster's default database.

    engine String

    Database engine used by the cluster (ex. pg for PostreSQL).

    host String

    Database cluster's hostname.

    id String

    The provider-assigned unique ID for this managed resource.

    maintenanceWindows List<GetDatabaseClusterMaintenanceWindow>

    Defines when the automatic maintenance should be performed for the database cluster.

    name String
    nodeCount Integer

    Number of nodes that will be included in the cluster.

    password String

    Password for the cluster's default user.

    port Integer

    Network port that the database cluster is listening on.

    privateHost String

    Same as host, but only accessible from resources within the account and in the same region.

    privateNetworkUuid String

    The ID of the VPC where the database cluster is located.

    privateUri String

    Same as uri, but only accessible from resources within the account and in the same region.

    projectId String

    The ID of the project that the database cluster is assigned to.

    region String

    DigitalOcean region where the cluster will reside.

    size String

    Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

    storageSizeMib String
    uri String

    The full URI for connecting to the database cluster.

    urn String

    The uniform resource name of the database cluster.

    user String

    Username for the cluster's default user.

    version String

    Engine version used by the cluster (ex. 11 for PostgreSQL 11).

    tags List<String>
    database string

    Name of the cluster's default database.

    engine string

    Database engine used by the cluster (ex. pg for PostreSQL).

    host string

    Database cluster's hostname.

    id string

    The provider-assigned unique ID for this managed resource.

    maintenanceWindows GetDatabaseClusterMaintenanceWindow[]

    Defines when the automatic maintenance should be performed for the database cluster.

    name string
    nodeCount number

    Number of nodes that will be included in the cluster.

    password string

    Password for the cluster's default user.

    port number

    Network port that the database cluster is listening on.

    privateHost string

    Same as host, but only accessible from resources within the account and in the same region.

    privateNetworkUuid string

    The ID of the VPC where the database cluster is located.

    privateUri string

    Same as uri, but only accessible from resources within the account and in the same region.

    projectId string

    The ID of the project that the database cluster is assigned to.

    region string

    DigitalOcean region where the cluster will reside.

    size string

    Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

    storageSizeMib string
    uri string

    The full URI for connecting to the database cluster.

    urn string

    The uniform resource name of the database cluster.

    user string

    Username for the cluster's default user.

    version string

    Engine version used by the cluster (ex. 11 for PostgreSQL 11).

    tags string[]
    database str

    Name of the cluster's default database.

    engine str

    Database engine used by the cluster (ex. pg for PostreSQL).

    host str

    Database cluster's hostname.

    id str

    The provider-assigned unique ID for this managed resource.

    maintenance_windows Sequence[GetDatabaseClusterMaintenanceWindow]

    Defines when the automatic maintenance should be performed for the database cluster.

    name str
    node_count int

    Number of nodes that will be included in the cluster.

    password str

    Password for the cluster's default user.

    port int

    Network port that the database cluster is listening on.

    private_host str

    Same as host, but only accessible from resources within the account and in the same region.

    private_network_uuid str

    The ID of the VPC where the database cluster is located.

    private_uri str

    Same as uri, but only accessible from resources within the account and in the same region.

    project_id str

    The ID of the project that the database cluster is assigned to.

    region str

    DigitalOcean region where the cluster will reside.

    size str

    Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

    storage_size_mib str
    uri str

    The full URI for connecting to the database cluster.

    urn str

    The uniform resource name of the database cluster.

    user str

    Username for the cluster's default user.

    version str

    Engine version used by the cluster (ex. 11 for PostgreSQL 11).

    tags Sequence[str]
    database String

    Name of the cluster's default database.

    engine String

    Database engine used by the cluster (ex. pg for PostreSQL).

    host String

    Database cluster's hostname.

    id String

    The provider-assigned unique ID for this managed resource.

    maintenanceWindows List<Property Map>

    Defines when the automatic maintenance should be performed for the database cluster.

    name String
    nodeCount Number

    Number of nodes that will be included in the cluster.

    password String

    Password for the cluster's default user.

    port Number

    Network port that the database cluster is listening on.

    privateHost String

    Same as host, but only accessible from resources within the account and in the same region.

    privateNetworkUuid String

    The ID of the VPC where the database cluster is located.

    privateUri String

    Same as uri, but only accessible from resources within the account and in the same region.

    projectId String

    The ID of the project that the database cluster is assigned to.

    region String

    DigitalOcean region where the cluster will reside.

    size String

    Database droplet size associated with the cluster (ex. db-s-1vcpu-1gb).

    storageSizeMib String
    uri String

    The full URI for connecting to the database cluster.

    urn String

    The uniform resource name of the database cluster.

    user String

    Username for the cluster's default user.

    version String

    Engine version used by the cluster (ex. 11 for PostgreSQL 11).

    tags List<String>

    Supporting Types

    GetDatabaseClusterMaintenanceWindow

    Day string

    The day of the week on which to apply maintenance updates.

    Hour string

    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    Day string

    The day of the week on which to apply maintenance updates.

    Hour string

    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    day String

    The day of the week on which to apply maintenance updates.

    hour String

    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    day string

    The day of the week on which to apply maintenance updates.

    hour string

    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    day str

    The day of the week on which to apply maintenance updates.

    hour str

    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    day String

    The day of the week on which to apply maintenance updates.

    hour String

    The hour in UTC at which maintenance updates will be applied in 24 hour format.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the digitalocean Terraform Provider.

    digitalocean logo
    DigitalOcean v4.24.0 published on Friday, Nov 17, 2023 by Pulumi