1. Packages
  2. Volcenginecc Provider
  3. API Docs
  4. rdspostgresql
  5. Database
Viewing docs for volcenginecc v0.0.29
published on Thursday, Apr 2, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.29
published on Thursday, Apr 2, 2026 by Volcengine

    The database is an independent database within a PostgreSQL instance, used to store and manage data.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
    
    const rDSPostgreSQLDatabaseDemo = new volcenginecc.rdspostgresql.Database("RDSPostgreSQLDatabaseDemo", {
        instanceId: "postgres-8d1fcxxxxxx",
        dbName: "ccapi-terraform-1001",
        characterSetName: "utf8",
        owner: "test-1",
        collate: "C",
        cType: "C.UTF-8",
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    r_ds_postgre_sql_database_demo = volcenginecc.rdspostgresql.Database("RDSPostgreSQLDatabaseDemo",
        instance_id="postgres-8d1fcxxxxxx",
        db_name="ccapi-terraform-1001",
        character_set_name="utf8",
        owner="test-1",
        collate="C",
        c_type="C.UTF-8")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/rdspostgresql"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rdspostgresql.NewDatabase(ctx, "RDSPostgreSQLDatabaseDemo", &rdspostgresql.DatabaseArgs{
    			InstanceId:       pulumi.String("postgres-8d1fcxxxxxx"),
    			DbName:           pulumi.String("ccapi-terraform-1001"),
    			CharacterSetName: pulumi.String("utf8"),
    			Owner:            pulumi.String("test-1"),
    			Collate:          pulumi.String("C"),
    			CType:            pulumi.String("C.UTF-8"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var rDSPostgreSQLDatabaseDemo = new Volcenginecc.Rdspostgresql.Database("RDSPostgreSQLDatabaseDemo", new()
        {
            InstanceId = "postgres-8d1fcxxxxxx",
            DbName = "ccapi-terraform-1001",
            CharacterSetName = "utf8",
            Owner = "test-1",
            Collate = "C",
            CType = "C.UTF-8",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.volcengine.volcenginecc.rdspostgresql.Database;
    import com.volcengine.volcenginecc.rdspostgresql.DatabaseArgs;
    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) {
            var rDSPostgreSQLDatabaseDemo = new Database("rDSPostgreSQLDatabaseDemo", DatabaseArgs.builder()
                .instanceId("postgres-8d1fcxxxxxx")
                .dbName("ccapi-terraform-1001")
                .characterSetName("utf8")
                .owner("test-1")
                .collate("C")
                .cType("C.UTF-8")
                .build());
    
        }
    }
    
    resources:
      rDSPostgreSQLDatabaseDemo:
        type: volcenginecc:rdspostgresql:Database
        name: RDSPostgreSQLDatabaseDemo
        properties:
          instanceId: postgres-8d1fcxxxxxx
          dbName: ccapi-terraform-1001
          characterSetName: utf8
          owner: test-1
          collate: C
          cType: C.UTF-8
    

    Create Database Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
    @overload
    def Database(resource_name: str,
                 args: DatabaseArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Database(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 db_name: Optional[str] = None,
                 instance_id: Optional[str] = None,
                 c_type: Optional[str] = None,
                 character_set_name: Optional[str] = None,
                 collate: Optional[str] = None,
                 owner: Optional[str] = None)
    func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
    public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
    public Database(String name, DatabaseArgs args)
    public Database(String name, DatabaseArgs args, CustomResourceOptions options)
    
    type: volcenginecc:rdspostgresql:Database
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var volcengineccDatabaseResource = new Volcenginecc.Rdspostgresql.Database("volcengineccDatabaseResource", new()
    {
        DbName = "string",
        InstanceId = "string",
        CType = "string",
        CharacterSetName = "string",
        Collate = "string",
        Owner = "string",
    });
    
    example, err := rdspostgresql.NewDatabase(ctx, "volcengineccDatabaseResource", &rdspostgresql.DatabaseArgs{
    	DbName:           pulumi.String("string"),
    	InstanceId:       pulumi.String("string"),
    	CType:            pulumi.String("string"),
    	CharacterSetName: pulumi.String("string"),
    	Collate:          pulumi.String("string"),
    	Owner:            pulumi.String("string"),
    })
    
    var volcengineccDatabaseResource = new com.volcengine.volcenginecc.rdspostgresql.Database("volcengineccDatabaseResource", com.volcengine.volcenginecc.rdspostgresql.DatabaseArgs.builder()
        .dbName("string")
        .instanceId("string")
        .cType("string")
        .characterSetName("string")
        .collate("string")
        .owner("string")
        .build());
    
    volcenginecc_database_resource = volcenginecc.rdspostgresql.Database("volcengineccDatabaseResource",
        db_name="string",
        instance_id="string",
        c_type="string",
        character_set_name="string",
        collate="string",
        owner="string")
    
    const volcengineccDatabaseResource = new volcenginecc.rdspostgresql.Database("volcengineccDatabaseResource", {
        dbName: "string",
        instanceId: "string",
        cType: "string",
        characterSetName: "string",
        collate: "string",
        owner: "string",
    });
    
    type: volcenginecc:rdspostgresql:Database
    properties:
        cType: string
        characterSetName: string
        collate: string
        dbName: string
        instanceId: string
        owner: string
    

    Database Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Database resource accepts the following input properties:

    DbName string
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    InstanceId string
    Instance ID
    CType string
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    CharacterSetName string
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    Collate string
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    Owner string
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    DbName string
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    InstanceId string
    Instance ID
    CType string
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    CharacterSetName string
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    Collate string
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    Owner string
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    dbName String
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    instanceId String
    Instance ID
    cType String
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    characterSetName String
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate String
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    owner String
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    dbName string
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    instanceId string
    Instance ID
    cType string
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    characterSetName string
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate string
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    owner string
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    db_name str
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    instance_id str
    Instance ID
    c_type str
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    character_set_name str
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate str
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    owner str
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    dbName String
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    instanceId String
    Instance ID
    cType String
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    characterSetName String
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate String
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    owner String
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

    DbStatus string
    Database status: Unavailable: Not available. Available: Available.
    Id string
    The provider-assigned unique ID for this managed resource.
    DbStatus string
    Database status: Unavailable: Not available. Available: Available.
    Id string
    The provider-assigned unique ID for this managed resource.
    dbStatus String
    Database status: Unavailable: Not available. Available: Available.
    id String
    The provider-assigned unique ID for this managed resource.
    dbStatus string
    Database status: Unavailable: Not available. Available: Available.
    id string
    The provider-assigned unique ID for this managed resource.
    db_status str
    Database status: Unavailable: Not available. Available: Available.
    id str
    The provider-assigned unique ID for this managed resource.
    dbStatus String
    Database status: Unavailable: Not available. Available: Available.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Database Resource

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

    public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            c_type: Optional[str] = None,
            character_set_name: Optional[str] = None,
            collate: Optional[str] = None,
            db_name: Optional[str] = None,
            db_status: Optional[str] = None,
            instance_id: Optional[str] = None,
            owner: Optional[str] = None) -> Database
    func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
    public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
    public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:rdspostgresql:Database    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CType string
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    CharacterSetName string
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    Collate string
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    DbName string
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    DbStatus string
    Database status: Unavailable: Not available. Available: Available.
    InstanceId string
    Instance ID
    Owner string
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    CType string
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    CharacterSetName string
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    Collate string
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    DbName string
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    DbStatus string
    Database status: Unavailable: Not available. Available: Available.
    InstanceId string
    Instance ID
    Owner string
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    cType String
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    characterSetName String
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate String
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    dbName String
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    dbStatus String
    Database status: Unavailable: Not available. Available: Available.
    instanceId String
    Instance ID
    owner String
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    cType string
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    characterSetName string
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate string
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    dbName string
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    dbStatus string
    Database status: Unavailable: Not available. Available: Available.
    instanceId string
    Instance ID
    owner string
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    c_type str
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    character_set_name str
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate str
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    db_name str
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    db_status str
    Database status: Unavailable: Not available. Available: Available.
    instance_id str
    Instance ID
    owner str
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser
    cType String
    Character classification. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    characterSetName String
    Database character set. Supported character sets: utf8 (default), latin1, ascii
    collate String
    Collation. Supported values: C (default), C.UTF-8, enUS.utf8, zhCN.utf8, and POSIX
    dbName String
    Database name. Naming rules: Length must be 2–63 characters. Can contain letters, numbers, underscores, or hyphens. Must start with a letter and end with a letter or number. Reserved keywords are not allowed. For a list of all disabled keywords, see Disabled Keywords.
    dbStatus String
    Database status: Unavailable: Not available. Available: Available.
    instanceId String
    Instance ID
    owner String
    Database owner. Note: Read-only instance accounts, high-privilege accounts with DDL permissions disabled, or regular accounts with DDL permissions disabled cannot be set as the database owner. If no value is provided or the value is empty, this field defaults to rds superuser

    Import

    $ pulumi import volcenginecc:rdspostgresql/database:Database example "instance_id|db_name"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.29
    published on Thursday, Apr 2, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.