1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. RdsDatabase
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.RdsDatabase

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages RDS Mysql database resource within FlexibleEngine.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const instanceId = config.requireObject("instanceId");
    const test = new flexibleengine.RdsDatabase("test", {
        instanceId: instanceId,
        characterSet: "utf8",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    instance_id = config.require_object("instanceId")
    test = flexibleengine.RdsDatabase("test",
        instance_id=instance_id,
        character_set="utf8")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		instanceId := cfg.RequireObject("instanceId")
    		_, err := flexibleengine.NewRdsDatabase(ctx, "test", &flexibleengine.RdsDatabaseArgs{
    			InstanceId:   pulumi.Any(instanceId),
    			CharacterSet: pulumi.String("utf8"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var instanceId = config.RequireObject<dynamic>("instanceId");
        var test = new Flexibleengine.RdsDatabase("test", new()
        {
            InstanceId = instanceId,
            CharacterSet = "utf8",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.RdsDatabase;
    import com.pulumi.flexibleengine.RdsDatabaseArgs;
    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 config = ctx.config();
            final var instanceId = config.get("instanceId");
            var test = new RdsDatabase("test", RdsDatabaseArgs.builder()
                .instanceId(instanceId)
                .characterSet("utf8")
                .build());
    
        }
    }
    
    configuration:
      instanceId:
        type: dynamic
    resources:
      test:
        type: flexibleengine:RdsDatabase
        properties:
          instanceId: ${instanceId}
          characterSet: utf8
    

    Create RdsDatabase Resource

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

    Constructor syntax

    new RdsDatabase(name: string, args: RdsDatabaseArgs, opts?: CustomResourceOptions);
    @overload
    def RdsDatabase(resource_name: str,
                    args: RdsDatabaseArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def RdsDatabase(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    character_set: Optional[str] = None,
                    instance_id: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None,
                    rds_database_id: Optional[str] = None,
                    region: Optional[str] = None,
                    timeouts: Optional[RdsDatabaseTimeoutsArgs] = None)
    func NewRdsDatabase(ctx *Context, name string, args RdsDatabaseArgs, opts ...ResourceOption) (*RdsDatabase, error)
    public RdsDatabase(string name, RdsDatabaseArgs args, CustomResourceOptions? opts = null)
    public RdsDatabase(String name, RdsDatabaseArgs args)
    public RdsDatabase(String name, RdsDatabaseArgs args, CustomResourceOptions options)
    
    type: flexibleengine:RdsDatabase
    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 RdsDatabaseArgs
    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 RdsDatabaseArgs
    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 RdsDatabaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RdsDatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RdsDatabaseArgs
    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 rdsDatabaseResource = new Flexibleengine.RdsDatabase("rdsDatabaseResource", new()
    {
        CharacterSet = "string",
        InstanceId = "string",
        Description = "string",
        Name = "string",
        RdsDatabaseId = "string",
        Region = "string",
        Timeouts = new Flexibleengine.Inputs.RdsDatabaseTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := flexibleengine.NewRdsDatabase(ctx, "rdsDatabaseResource", &flexibleengine.RdsDatabaseArgs{
    	CharacterSet:  pulumi.String("string"),
    	InstanceId:    pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	RdsDatabaseId: pulumi.String("string"),
    	Region:        pulumi.String("string"),
    	Timeouts: &flexibleengine.RdsDatabaseTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var rdsDatabaseResource = new RdsDatabase("rdsDatabaseResource", RdsDatabaseArgs.builder()
        .characterSet("string")
        .instanceId("string")
        .description("string")
        .name("string")
        .rdsDatabaseId("string")
        .region("string")
        .timeouts(RdsDatabaseTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    rds_database_resource = flexibleengine.RdsDatabase("rdsDatabaseResource",
        character_set="string",
        instance_id="string",
        description="string",
        name="string",
        rds_database_id="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const rdsDatabaseResource = new flexibleengine.RdsDatabase("rdsDatabaseResource", {
        characterSet: "string",
        instanceId: "string",
        description: "string",
        name: "string",
        rdsDatabaseId: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: flexibleengine:RdsDatabase
    properties:
        characterSet: string
        description: string
        instanceId: string
        name: string
        rdsDatabaseId: string
        region: string
        timeouts:
            create: string
            delete: string
            update: string
    

    RdsDatabase 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 RdsDatabase resource accepts the following input properties:

    CharacterSet string
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    InstanceId string
    Specifies the RDS instance ID. Changing this will create a new resource.
    Description string
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    Name string
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    RdsDatabaseId string
    The resource ID of database which is formatted <instance_id>/<database_name>.
    Region string
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    Timeouts RdsDatabaseTimeouts
    CharacterSet string
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    InstanceId string
    Specifies the RDS instance ID. Changing this will create a new resource.
    Description string
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    Name string
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    RdsDatabaseId string
    The resource ID of database which is formatted <instance_id>/<database_name>.
    Region string
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    Timeouts RdsDatabaseTimeoutsArgs
    characterSet String
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    instanceId String
    Specifies the RDS instance ID. Changing this will create a new resource.
    description String
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    name String
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rdsDatabaseId String
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region String
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts RdsDatabaseTimeouts
    characterSet string
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    instanceId string
    Specifies the RDS instance ID. Changing this will create a new resource.
    description string
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    name string
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rdsDatabaseId string
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region string
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts RdsDatabaseTimeouts
    character_set str
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    instance_id str
    Specifies the RDS instance ID. Changing this will create a new resource.
    description str
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    name str
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rds_database_id str
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region str
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts RdsDatabaseTimeoutsArgs
    characterSet String
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    instanceId String
    Specifies the RDS instance ID. Changing this will create a new resource.
    description String
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    name String
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rdsDatabaseId String
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region String
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RdsDatabase Resource

    Get an existing RdsDatabase 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?: RdsDatabaseState, opts?: CustomResourceOptions): RdsDatabase
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            character_set: Optional[str] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            name: Optional[str] = None,
            rds_database_id: Optional[str] = None,
            region: Optional[str] = None,
            timeouts: Optional[RdsDatabaseTimeoutsArgs] = None) -> RdsDatabase
    func GetRdsDatabase(ctx *Context, name string, id IDInput, state *RdsDatabaseState, opts ...ResourceOption) (*RdsDatabase, error)
    public static RdsDatabase Get(string name, Input<string> id, RdsDatabaseState? state, CustomResourceOptions? opts = null)
    public static RdsDatabase get(String name, Output<String> id, RdsDatabaseState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:RdsDatabase    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:
    CharacterSet string
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    Description string
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    InstanceId string
    Specifies the RDS instance ID. Changing this will create a new resource.
    Name string
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    RdsDatabaseId string
    The resource ID of database which is formatted <instance_id>/<database_name>.
    Region string
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    Timeouts RdsDatabaseTimeouts
    CharacterSet string
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    Description string
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    InstanceId string
    Specifies the RDS instance ID. Changing this will create a new resource.
    Name string
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    RdsDatabaseId string
    The resource ID of database which is formatted <instance_id>/<database_name>.
    Region string
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    Timeouts RdsDatabaseTimeoutsArgs
    characterSet String
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    description String
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    instanceId String
    Specifies the RDS instance ID. Changing this will create a new resource.
    name String
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rdsDatabaseId String
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region String
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts RdsDatabaseTimeouts
    characterSet string
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    description string
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    instanceId string
    Specifies the RDS instance ID. Changing this will create a new resource.
    name string
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rdsDatabaseId string
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region string
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts RdsDatabaseTimeouts
    character_set str
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    description str
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    instance_id str
    Specifies the RDS instance ID. Changing this will create a new resource.
    name str
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rds_database_id str
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region str
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts RdsDatabaseTimeoutsArgs
    characterSet String
    Specifies the character set used by the database, For example utf8, gbk, ascii, etc. Changing this will create a new resource.
    description String
    Specifies the database description. The value can contain 0 to 512 characters. This parameter takes effect only for DB instances whose kernel versions are at least 5.6.51.3, 5.7.33.1, or 8.0.21.4.
    instanceId String
    Specifies the RDS instance ID. Changing this will create a new resource.
    name String
    Specifies the database name. The database name contains 1 to 64 characters. The name can only consist of lowercase letters, digits, hyphens (-), underscores (_) and dollar signs ($). The total number of hyphens (-) and dollar signs ($) cannot exceed 10. RDS for MySQL 8.0 does not support dollar signs ($). Changing this will create a new resource.
    rdsDatabaseId String
    The resource ID of database which is formatted <instance_id>/<database_name>.
    region String
    Specifies the region in which to create the RDS database resource. If omitted, the provider-level region will be used. Changing this will create a new RDS database resource.
    timeouts Property Map

    Supporting Types

    RdsDatabaseTimeouts, RdsDatabaseTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    RDS database can be imported using the instance id and database name, e.g.

    $ pulumi import flexibleengine:index/rdsDatabase:RdsDatabase database_1 instance_id/database_name
    

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud