Show / Hide Table of Contents

Class Database

Provides a PolarDB database resource. A DB database deployed in a DB cluster. A DB cluster can own multiple databases.

NOTE: Available in v1.66.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var cluster = new AliCloud.PolarDB.Cluster("cluster", new AliCloud.PolarDB.ClusterArgs
    {
        DbNodeClass = @var.Clusterclass,
        DbType = "MySQL",
        DbVersion = "8.0",
        Description = "testDB",
        PayType = "PostPaid",
        VswitchId = "polar.mysql.x4.large",
    });
    var @default = new AliCloud.PolarDB.Database("default", new AliCloud.PolarDB.DatabaseArgs
    {
        DbClusterId = cluster.Id,
        DbName = "tftestdatabase",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Database
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.AliCloud.PolarDB
Assembly: Pulumi.AliCloud.dll
Syntax
public class Database : CustomResource

Constructors

View Source

Database(String, DatabaseArgs, CustomResourceOptions)

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

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

The unique name of the resource

DatabaseArgs 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

CharacterSetName

Character set. The value range is limited to the following: [ utf8, gbk, latin1, utf8mb4, Chinese_PRC_CI_AS, Chinese_PRC_CS_AS, SQL_Latin1_General_CP1_CI_AS, SQL_Latin1_General_CP1_CS_AS, Chinese_PRC_BIN ], default is "utf8" (utf8mb4 only supports versions 5.5 and 5.6).

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

DbClusterId

The Id of cluster that can run database.

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

DbDescription

Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.

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

DbName

Name of the database requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letterand have no more than 64 characters.

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

Methods

View Source

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

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

Declaration
public static Database Get(string name, Input<string> id, DatabaseState 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.

DatabaseState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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