1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. rdsmysql
  6. Database
Viewing docs for volcenginecc v0.0.35
published on Thursday, May 14, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.35
published on Thursday, May 14, 2026 by Volcengine

    Database

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      databaseDemo:
        type: volcenginecc:rdsmysql:Database
        name: DatabaseDemo
        properties:
          characterSetName: utf8
          databasePrivileges:
            - account_name: a***
              account_privilege: ReadOnly
              host: '%'
          description: Demo Example
          instanceId: mysql-779***
          name: rdstest
    
    Example coming soon!
    

    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,
                 instance_id: Optional[str] = None,
                 name: Optional[str] = None,
                 character_set_name: Optional[str] = None,
                 database_privileges: Optional[Sequence[DatabaseDatabasePrivilegeArgs]] = None,
                 description: 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:rdsmysql:Database
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "volcenginecc_rdsmysql_database" "name" {
        # resource properties
    }

    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 databaseResource = new Volcenginecc.Rdsmysql.Database("databaseResource", new()
    {
        InstanceId = "string",
        Name = "string",
        CharacterSetName = "string",
        DatabasePrivileges = new[]
        {
            new Volcenginecc.Rdsmysql.Inputs.DatabaseDatabasePrivilegeArgs
            {
                AccountName = "string",
                AccountPrivilege = "string",
                Host = "string",
            },
        },
        Description = "string",
    });
    
    example, err := rdsmysql.NewDatabase(ctx, "databaseResource", &rdsmysql.DatabaseArgs{
    	InstanceId:       pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	CharacterSetName: pulumi.String("string"),
    	DatabasePrivileges: rdsmysql.DatabaseDatabasePrivilegeArray{
    		&rdsmysql.DatabaseDatabasePrivilegeArgs{
    			AccountName:      pulumi.String("string"),
    			AccountPrivilege: pulumi.String("string"),
    			Host:             pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    })
    
    resource "volcenginecc_rdsmysql_database" "databaseResource" {
      instance_id        = "string"
      name               = "string"
      character_set_name = "string"
      database_privileges {
        account_name      = "string"
        account_privilege = "string"
        host              = "string"
      }
      description = "string"
    }
    
    var databaseResource = new com.volcengine.volcenginecc.rdsmysql.Database("databaseResource", com.volcengine.volcenginecc.rdsmysql.DatabaseArgs.builder()
        .instanceId("string")
        .name("string")
        .characterSetName("string")
        .databasePrivileges(DatabaseDatabasePrivilegeArgs.builder()
            .accountName("string")
            .accountPrivilege("string")
            .host("string")
            .build())
        .description("string")
        .build());
    
    database_resource = volcenginecc.rdsmysql.Database("databaseResource",
        instance_id="string",
        name="string",
        character_set_name="string",
        database_privileges=[{
            "account_name": "string",
            "account_privilege": "string",
            "host": "string",
        }],
        description="string")
    
    const databaseResource = new volcenginecc.rdsmysql.Database("databaseResource", {
        instanceId: "string",
        name: "string",
        characterSetName: "string",
        databasePrivileges: [{
            accountName: "string",
            accountPrivilege: "string",
            host: "string",
        }],
        description: "string",
    });
    
    type: volcenginecc:rdsmysql:Database
    properties:
        characterSetName: string
        databasePrivileges:
            - accountName: string
              accountPrivilege: string
              host: string
        description: string
        instanceId: string
        name: 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:

    InstanceId string
    Database instance ID.
    Name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    CharacterSetName string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    DatabasePrivileges List<Volcengine.DatabaseDatabasePrivilege>
    Description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    InstanceId string
    Database instance ID.
    Name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    CharacterSetName string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    DatabasePrivileges []DatabaseDatabasePrivilegeArgs
    Description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instance_id string
    Database instance ID.
    name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    character_set_name string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    database_privileges list(object)
    description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instanceId String
    Database instance ID.
    name String
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    characterSetName String
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    databasePrivileges List<DatabaseDatabasePrivilege>
    description String
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instanceId string
    Database instance ID.
    name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    characterSetName string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    databasePrivileges DatabaseDatabasePrivilege[]
    description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instance_id str
    Database instance ID.
    name str
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    character_set_name str
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    database_privileges Sequence[DatabaseDatabasePrivilegeArgs]
    description str
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instanceId String
    Database instance ID.
    name String
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    characterSetName String
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    databasePrivileges List<Property Map>
    description String
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Database status. Values: Unavailable (not available), Available (available).
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Database status. Values: Unavailable (not available), Available (available).
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Database status. Values: Unavailable (not available), Available (available).
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Database status. Values: Unavailable (not available), Available (available).
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Database status. Values: Unavailable (not available), Available (available).
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Database status. Values: Unavailable (not available), Available (available).
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Database status. Values: Unavailable (not available), Available (available).

    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,
            character_set_name: Optional[str] = None,
            database_privileges: Optional[Sequence[DatabaseDatabasePrivilegeArgs]] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            name: Optional[str] = None,
            status: 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:rdsmysql:Database    get:      id: ${id}
    import {
      to = volcenginecc_rdsmysql_database.example
      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:
    CharacterSetName string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    DatabasePrivileges List<Volcengine.DatabaseDatabasePrivilege>
    Description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    InstanceId string
    Database instance ID.
    Name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    Status string
    Database status. Values: Unavailable (not available), Available (available).
    CharacterSetName string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    DatabasePrivileges []DatabaseDatabasePrivilegeArgs
    Description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    InstanceId string
    Database instance ID.
    Name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    Status string
    Database status. Values: Unavailable (not available), Available (available).
    character_set_name string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    database_privileges list(object)
    description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instance_id string
    Database instance ID.
    name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    status string
    Database status. Values: Unavailable (not available), Available (available).
    characterSetName String
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    databasePrivileges List<DatabaseDatabasePrivilege>
    description String
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instanceId String
    Database instance ID.
    name String
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    status String
    Database status. Values: Unavailable (not available), Available (available).
    characterSetName string
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    databasePrivileges DatabaseDatabasePrivilege[]
    description string
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instanceId string
    Database instance ID.
    name string
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    status string
    Database status. Values: Unavailable (not available), Available (available).
    character_set_name str
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    database_privileges Sequence[DatabaseDatabasePrivilegeArgs]
    description str
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instance_id str
    Database instance ID.
    name str
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    status str
    Database status. Values: Unavailable (not available), Available (available).
    characterSetName String
    Database character set. Supported character sets: utf8, utf8mb4 (default), latin1, ascii.
    databasePrivileges List<Property Map>
    description String
    Database description, up to 256 characters. This field is optional. If not set, or if set with a description length of 0, the description will be empty.
    instanceId String
    Database instance ID.
    name String
    Database name. Naming rules: must be unique; length must be 2–64 characters; must start with a letter and end with a letter or number; can contain letters, numbers, underscores (_), or hyphens (-); certain reserved words, such as root and admin, cannot be used.
    status String
    Database status. Values: Unavailable (not available), Available (available).

    Supporting Types

    DatabaseDatabasePrivilege, DatabaseDatabasePrivilegeArgs

    AccountName string
    Database account name.
    AccountPrivilege string
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    Host string
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.
    AccountName string
    Database account name.
    AccountPrivilege string
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    Host string
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.
    account_name string
    Database account name.
    account_privilege string
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    host string
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.
    accountName String
    Database account name.
    accountPrivilege String
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    host String
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.
    accountName string
    Database account name.
    accountPrivilege string
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    host string
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.
    account_name str
    Database account name.
    account_privilege str
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    host str
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.
    accountName String
    Database account name.
    accountPrivilege String
    Granted account privilege type. Values: ReadWrite (read and write privileges), ReadOnly (read-only privileges), DDLOnly (DDL privileges only), DMLOnly (DML privileges only), Custom (custom privileges).
    host String
    The specified database account can access the database from the IP address. Default value: %. If Host is set to %, the account can access the database from any IP address. If Host is set to 192.10.10.%, the account can access the database from IP addresses between 192.10.10.0 and 192.10.10.255. The specified Host must be added to the instance's allowlist.

    Import

    $ pulumi import volcenginecc:rdsmysql/database:Database example "instance_id|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.35
    published on Thursday, May 14, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.