Show / Hide Table of Contents

Class DatabaseDb

Provides a DigitalOcean database resource. When creating a new database cluster, a default database with name defaultdb will be created. Then, this resource can be used to provide additional database inside the cluster.

Example Usage

Create a new PostgreSQL database

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var postgres_example = new DigitalOcean.DatabaseCluster("postgres-example", new DigitalOcean.DatabaseClusterArgs
    {
        Engine = "pg",
        Version = "11",
        Size = "db-s-1vcpu-1gb",
        Region = "nyc1",
        NodeCount = 1,
    });
    var database_example = new DigitalOcean.DatabaseDb("database-example", new DigitalOcean.DatabaseDbArgs
    {
        ClusterId = postgres_example.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DatabaseDb
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class DatabaseDb : CustomResource

Constructors

View Source

DatabaseDb(String, DatabaseDbArgs, CustomResourceOptions)

Create a DatabaseDb resource with the given unique name, arguments, and options.

Declaration
public DatabaseDb(string name, DatabaseDbArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DatabaseDbArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ClusterId

The ID of the original source database cluster.

Declaration
public Output<string> ClusterId { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name for the database.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, DatabaseDbState, CustomResourceOptions)

Get an existing DatabaseDb resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static DatabaseDb Get(string name, Input<string> id, DatabaseDbState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DatabaseDbState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
DatabaseDb
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.