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

flexibleengine.RdsAccount

Explore with Pulumi AI

Manages RDS Mysql account 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.RdsAccount("test", {
    instanceId: instanceId,
    password: "Test@12345678",
});
Copy
import pulumi
import pulumi_flexibleengine as flexibleengine

config = pulumi.Config()
instance_id = config.require_object("instanceId")
test = flexibleengine.RdsAccount("test",
    instance_id=instance_id,
    password="Test@12345678")
Copy
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.NewRdsAccount(ctx, "test", &flexibleengine.RdsAccountArgs{
			InstanceId: pulumi.Any(instanceId),
			Password:   pulumi.String("Test@12345678"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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.RdsAccount("test", new()
    {
        InstanceId = instanceId,
        Password = "Test@12345678",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.RdsAccount;
import com.pulumi.flexibleengine.RdsAccountArgs;
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 RdsAccount("test", RdsAccountArgs.builder()
            .instanceId(instanceId)
            .password("Test@12345678")
            .build());

    }
}
Copy
configuration:
  instanceId:
    type: dynamic
resources:
  test:
    type: flexibleengine:RdsAccount
    properties:
      instanceId: ${instanceId}
      password: Test@12345678
Copy

Create RdsAccount Resource

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

Constructor syntax

new RdsAccount(name: string, args: RdsAccountArgs, opts?: CustomResourceOptions);
@overload
def RdsAccount(resource_name: str,
               args: RdsAccountArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def RdsAccount(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               instance_id: Optional[str] = None,
               password: Optional[str] = None,
               description: Optional[str] = None,
               hosts: Optional[Sequence[str]] = None,
               name: Optional[str] = None,
               rds_account_id: Optional[str] = None,
               region: Optional[str] = None,
               timeouts: Optional[RdsAccountTimeoutsArgs] = None)
func NewRdsAccount(ctx *Context, name string, args RdsAccountArgs, opts ...ResourceOption) (*RdsAccount, error)
public RdsAccount(string name, RdsAccountArgs args, CustomResourceOptions? opts = null)
public RdsAccount(String name, RdsAccountArgs args)
public RdsAccount(String name, RdsAccountArgs args, CustomResourceOptions options)
type: flexibleengine:RdsAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RdsAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RdsAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RdsAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RdsAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RdsAccountArgs
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 rdsAccountResource = new Flexibleengine.RdsAccount("rdsAccountResource", new()
{
    InstanceId = "string",
    Password = "string",
    Description = "string",
    Hosts = new[]
    {
        "string",
    },
    Name = "string",
    RdsAccountId = "string",
    Region = "string",
    Timeouts = new Flexibleengine.Inputs.RdsAccountTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := flexibleengine.NewRdsAccount(ctx, "rdsAccountResource", &flexibleengine.RdsAccountArgs{
InstanceId: pulumi.String("string"),
Password: pulumi.String("string"),
Description: pulumi.String("string"),
Hosts: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
RdsAccountId: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &.RdsAccountTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var rdsAccountResource = new RdsAccount("rdsAccountResource", RdsAccountArgs.builder()
    .instanceId("string")
    .password("string")
    .description("string")
    .hosts("string")
    .name("string")
    .rdsAccountId("string")
    .region("string")
    .timeouts(RdsAccountTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
rds_account_resource = flexibleengine.RdsAccount("rdsAccountResource",
    instance_id="string",
    password="string",
    description="string",
    hosts=["string"],
    name="string",
    rds_account_id="string",
    region="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const rdsAccountResource = new flexibleengine.RdsAccount("rdsAccountResource", {
    instanceId: "string",
    password: "string",
    description: "string",
    hosts: ["string"],
    name: "string",
    rdsAccountId: "string",
    region: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: flexibleengine:RdsAccount
properties:
    description: string
    hosts:
        - string
    instanceId: string
    name: string
    password: string
    rdsAccountId: string
    region: string
    timeouts:
        create: string
        delete: string
        update: string
Copy

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

InstanceId This property is required. string
Specifies the rds instance id. Changing this will create a new resource.
Password This property is required. string
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
Description string
Specifies remarks of the DB account.
Hosts List<string>
Specifies the IP addresses that are allowed to access your DB instance.
Name string
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
RdsAccountId string
The resource ID of account which is formatted <instance_id>/<account_name>.
Region string
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
Timeouts RdsAccountTimeouts
InstanceId This property is required. string
Specifies the rds instance id. Changing this will create a new resource.
Password This property is required. string
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
Description string
Specifies remarks of the DB account.
Hosts []string
Specifies the IP addresses that are allowed to access your DB instance.
Name string
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
RdsAccountId string
The resource ID of account which is formatted <instance_id>/<account_name>.
Region string
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
Timeouts RdsAccountTimeoutsArgs
instanceId This property is required. String
Specifies the rds instance id. Changing this will create a new resource.
password This property is required. String
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
description String
Specifies remarks of the DB account.
hosts List<String>
Specifies the IP addresses that are allowed to access your DB instance.
name String
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
rdsAccountId String
The resource ID of account which is formatted <instance_id>/<account_name>.
region String
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts RdsAccountTimeouts
instanceId This property is required. string
Specifies the rds instance id. Changing this will create a new resource.
password This property is required. string
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
description string
Specifies remarks of the DB account.
hosts string[]
Specifies the IP addresses that are allowed to access your DB instance.
name string
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
rdsAccountId string
The resource ID of account which is formatted <instance_id>/<account_name>.
region string
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts RdsAccountTimeouts
instance_id This property is required. str
Specifies the rds instance id. Changing this will create a new resource.
password This property is required. str
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
description str
Specifies remarks of the DB account.
hosts Sequence[str]
Specifies the IP addresses that are allowed to access your DB instance.
name str
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
rds_account_id str
The resource ID of account which is formatted <instance_id>/<account_name>.
region str
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts RdsAccountTimeoutsArgs
instanceId This property is required. String
Specifies the rds instance id. Changing this will create a new resource.
password This property is required. String
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
description String
Specifies remarks of the DB account.
hosts List<String>
Specifies the IP addresses that are allowed to access your DB instance.
name String
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
rdsAccountId String
The resource ID of account which is formatted <instance_id>/<account_name>.
region String
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the RdsAccount 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 RdsAccount Resource

Get an existing RdsAccount 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?: RdsAccountState, opts?: CustomResourceOptions): RdsAccount
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        hosts: Optional[Sequence[str]] = None,
        instance_id: Optional[str] = None,
        name: Optional[str] = None,
        password: Optional[str] = None,
        rds_account_id: Optional[str] = None,
        region: Optional[str] = None,
        timeouts: Optional[RdsAccountTimeoutsArgs] = None) -> RdsAccount
func GetRdsAccount(ctx *Context, name string, id IDInput, state *RdsAccountState, opts ...ResourceOption) (*RdsAccount, error)
public static RdsAccount Get(string name, Input<string> id, RdsAccountState? state, CustomResourceOptions? opts = null)
public static RdsAccount get(String name, Output<String> id, RdsAccountState state, CustomResourceOptions options)
resources:  _:    type: flexibleengine:RdsAccount    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
Specifies remarks of the DB account.
Hosts List<string>
Specifies the IP addresses that are allowed to access your DB instance.
InstanceId string
Specifies the rds instance id. Changing this will create a new resource.
Name string
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
Password string
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
RdsAccountId string
The resource ID of account which is formatted <instance_id>/<account_name>.
Region string
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
Timeouts RdsAccountTimeouts
Description string
Specifies remarks of the DB account.
Hosts []string
Specifies the IP addresses that are allowed to access your DB instance.
InstanceId string
Specifies the rds instance id. Changing this will create a new resource.
Name string
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
Password string
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
RdsAccountId string
The resource ID of account which is formatted <instance_id>/<account_name>.
Region string
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
Timeouts RdsAccountTimeoutsArgs
description String
Specifies remarks of the DB account.
hosts List<String>
Specifies the IP addresses that are allowed to access your DB instance.
instanceId String
Specifies the rds instance id. Changing this will create a new resource.
name String
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
password String
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
rdsAccountId String
The resource ID of account which is formatted <instance_id>/<account_name>.
region String
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts RdsAccountTimeouts
description string
Specifies remarks of the DB account.
hosts string[]
Specifies the IP addresses that are allowed to access your DB instance.
instanceId string
Specifies the rds instance id. Changing this will create a new resource.
name string
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
password string
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
rdsAccountId string
The resource ID of account which is formatted <instance_id>/<account_name>.
region string
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts RdsAccountTimeouts
description str
Specifies remarks of the DB account.
hosts Sequence[str]
Specifies the IP addresses that are allowed to access your DB instance.
instance_id str
Specifies the rds instance id. Changing this will create a new resource.
name str
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
password str
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
rds_account_id str
The resource ID of account which is formatted <instance_id>/<account_name>.
region str
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts RdsAccountTimeoutsArgs
description String
Specifies remarks of the DB account.
hosts List<String>
Specifies the IP addresses that are allowed to access your DB instance.
instanceId String
Specifies the rds instance id. Changing this will create a new resource.
name String
Specifies the username of the db account. Only lowercase letters, digits, hyphens (-), and userscores (_) are allowed. Changing this will create a new resource.

  • If the database version is MySQL 5.6, the username consists of 1 to 16 characters.
  • If the database version is MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
password String
Specifies the password of the db account. The parameter must be 8 to 32 characters long and contain only letters(case-sensitive), digits, and special characters(~!@#$%^*-_=+?,()&). The value must be different from name or name spelled backwards.
rdsAccountId String
The resource ID of account which is formatted <instance_id>/<account_name>.
region String
Specifies the region in which to create the RDS account resource. If omitted, the provider-level region will be used. Changing this will create a new RDS account resource.
timeouts Property Map

Supporting Types

RdsAccountTimeouts
, RdsAccountTimeoutsArgs

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 account can be imported using the instance id and account name, e.g.:

$ pulumi import flexibleengine:index/rdsAccount:RdsAccount user_1 instance_id/account_name
Copy

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.