1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. RdsAccount
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.rds.RdsAccount

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a RDS Account resource.

    For information about RDS Account and how to use it, see What is Account.

    NOTE: Available since v1.120.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf_example";
    const default = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "5.6",
    });
    const defaultGetInstanceClasses = _default.then(_default => alicloud.rds.getInstanceClasses({
        zoneId: _default.ids?.[0],
        engine: "MySQL",
        engineVersion: "5.6",
    }));
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.ids?.[0]),
        vswitchName: name,
    });
    const defaultInstance = new alicloud.rds.Instance("default", {
        engine: "MySQL",
        engineVersion: "5.6",
        instanceType: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[1]?.instanceClass),
        instanceStorage: 10,
        vswitchId: defaultSwitch.id,
        instanceName: name,
    });
    const defaultRdsAccount = new alicloud.rds.RdsAccount("default", {
        dbInstanceId: defaultInstance.id,
        accountName: name,
        accountPassword: "Example1234",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf_example"
    default = alicloud.rds.get_zones(engine="MySQL",
        engine_version="5.6")
    default_get_instance_classes = alicloud.rds.get_instance_classes(zone_id=default.ids[0],
        engine="MySQL",
        engine_version="5.6")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.ids[0],
        vswitch_name=name)
    default_instance = alicloud.rds.Instance("default",
        engine="MySQL",
        engine_version="5.6",
        instance_type=default_get_instance_classes.instance_classes[1].instance_class,
        instance_storage=10,
        vswitch_id=default_switch.id,
        instance_name=name)
    default_rds_account = alicloud.rds.RdsAccount("default",
        db_instance_id=default_instance.id,
        account_name=name,
        account_password="Example1234")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"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, "")
    		name := "tf_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:        pulumi.StringRef(_default.Ids[0]),
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(_default.Ids[0]),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "default", &rds.InstanceArgs{
    			Engine:          pulumi.String("MySQL"),
    			EngineVersion:   pulumi.String("5.6"),
    			InstanceType:    pulumi.String(defaultGetInstanceClasses.InstanceClasses[1].InstanceClass),
    			InstanceStorage: pulumi.Int(10),
    			VswitchId:       defaultSwitch.ID(),
    			InstanceName:    pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds.NewRdsAccount(ctx, "default", &rds.RdsAccountArgs{
    			DbInstanceId:    defaultInstance.ID(),
    			AccountName:     pulumi.String(name),
    			AccountPassword: pulumi.String("Example1234"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf_example";
        var @default = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var defaultGetInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[0]),
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Ids[0])),
            VswitchName = name,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("default", new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
            InstanceType = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[1]?.InstanceClass),
            InstanceStorage = 10,
            VswitchId = defaultSwitch.Id,
            InstanceName = name,
        });
    
        var defaultRdsAccount = new AliCloud.Rds.RdsAccount("default", new()
        {
            DbInstanceId = defaultInstance.Id,
            AccountName = name,
            AccountPassword = "Example1234",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.rds.inputs.GetInstanceClassesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.RdsAccount;
    import com.pulumi.alicloud.rds.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 name = config.get("name").orElse("tf_example");
            final var default = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .build());
    
            final var defaultGetInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(default_.ids()[0])
                .engine("MySQL")
                .engineVersion("5.6")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.ids()[0])
                .vswitchName(name)
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .instanceType(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[1].instanceClass()))
                .instanceStorage("10")
                .vswitchId(defaultSwitch.id())
                .instanceName(name)
                .build());
    
            var defaultRdsAccount = new RdsAccount("defaultRdsAccount", RdsAccountArgs.builder()
                .dbInstanceId(defaultInstance.id())
                .accountName(name)
                .accountPassword("Example1234")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf_example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.ids[0]}
          vswitchName: ${name}
      defaultInstance:
        type: alicloud:rds:Instance
        name: default
        properties:
          engine: MySQL
          engineVersion: '5.6'
          instanceType: ${defaultGetInstanceClasses.instanceClasses[1].instanceClass}
          instanceStorage: '10'
          vswitchId: ${defaultSwitch.id}
          instanceName: ${name}
      defaultRdsAccount:
        type: alicloud:rds:RdsAccount
        name: default
        properties:
          dbInstanceId: ${defaultInstance.id}
          accountName: ${name}
          accountPassword: Example1234
    variables:
      default:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '5.6'
      defaultGetInstanceClasses:
        fn::invoke:
          Function: alicloud:rds:getInstanceClasses
          Arguments:
            zoneId: ${default.ids[0]}
            engine: MySQL
            engineVersion: '5.6'
    

    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: Optional[RdsAccountArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def RdsAccount(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_description: Optional[str] = None,
                   account_name: Optional[str] = None,
                   account_password: Optional[str] = None,
                   account_type: Optional[str] = None,
                   db_instance_id: Optional[str] = None,
                   description: Optional[str] = None,
                   instance_id: Optional[str] = None,
                   kms_encrypted_password: Optional[str] = None,
                   kms_encryption_context: Optional[Mapping[str, str]] = None,
                   name: Optional[str] = None,
                   password: Optional[str] = None,
                   reset_permission_flag: Optional[bool] = None,
                   type: Optional[str] = None)
    func NewRdsAccount(ctx *Context, name string, args *RdsAccountArgs, opts ...ResourceOption) (*RdsAccount, error)
    public RdsAccount(string name, RdsAccountArgs? args = null, CustomResourceOptions? opts = null)
    public RdsAccount(String name, RdsAccountArgs args)
    public RdsAccount(String name, RdsAccountArgs args, CustomResourceOptions options)
    
    type: alicloud:rds:RdsAccount
    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 RdsAccountArgs
    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 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 string
    The unique name of the resource.
    args RdsAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RdsAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 AliCloud.Rds.RdsAccount("rdsAccountResource", new()
    {
        AccountDescription = "string",
        AccountName = "string",
        AccountPassword = "string",
        AccountType = "string",
        DbInstanceId = "string",
        KmsEncryptedPassword = "string",
        KmsEncryptionContext = 
        {
            { "string", "string" },
        },
        ResetPermissionFlag = false,
    });
    
    example, err := rds.NewRdsAccount(ctx, "rdsAccountResource", &rds.RdsAccountArgs{
    	AccountDescription:   pulumi.String("string"),
    	AccountName:          pulumi.String("string"),
    	AccountPassword:      pulumi.String("string"),
    	AccountType:          pulumi.String("string"),
    	DbInstanceId:         pulumi.String("string"),
    	KmsEncryptedPassword: pulumi.String("string"),
    	KmsEncryptionContext: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ResetPermissionFlag: pulumi.Bool(false),
    })
    
    var rdsAccountResource = new RdsAccount("rdsAccountResource", RdsAccountArgs.builder()
        .accountDescription("string")
        .accountName("string")
        .accountPassword("string")
        .accountType("string")
        .dbInstanceId("string")
        .kmsEncryptedPassword("string")
        .kmsEncryptionContext(Map.of("string", "string"))
        .resetPermissionFlag(false)
        .build());
    
    rds_account_resource = alicloud.rds.RdsAccount("rdsAccountResource",
        account_description="string",
        account_name="string",
        account_password="string",
        account_type="string",
        db_instance_id="string",
        kms_encrypted_password="string",
        kms_encryption_context={
            "string": "string",
        },
        reset_permission_flag=False)
    
    const rdsAccountResource = new alicloud.rds.RdsAccount("rdsAccountResource", {
        accountDescription: "string",
        accountName: "string",
        accountPassword: "string",
        accountType: "string",
        dbInstanceId: "string",
        kmsEncryptedPassword: "string",
        kmsEncryptionContext: {
            string: "string",
        },
        resetPermissionFlag: false,
    });
    
    type: alicloud:rds:RdsAccount
    properties:
        accountDescription: string
        accountName: string
        accountPassword: string
        accountType: string
        dbInstanceId: string
        kmsEncryptedPassword: string
        kmsEncryptionContext:
            string: string
        resetPermissionFlag: false
    

    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:

    AccountDescription string

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    AccountName string
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    AccountPassword string
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    AccountType string

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    DbInstanceId string
    The ID of the instance.
    Description string
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    InstanceId string
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    KmsEncryptedPassword string
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    KmsEncryptionContext Dictionary<string, string>
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    Name string
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    Password string
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    ResetPermissionFlag bool
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    Type string

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    AccountDescription string

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    AccountName string
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    AccountPassword string
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    AccountType string

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    DbInstanceId string
    The ID of the instance.
    Description string
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    InstanceId string
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    KmsEncryptedPassword string
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    KmsEncryptionContext map[string]string
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    Name string
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    Password string
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    ResetPermissionFlag bool
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    Type string

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    accountDescription String

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    accountName String
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    accountPassword String
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    accountType String

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    dbInstanceId String
    The ID of the instance.
    description String
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instanceId String
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kmsEncryptedPassword String
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kmsEncryptionContext Map<String,String>
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name String
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password String
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    resetPermissionFlag Boolean
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    type String

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    accountDescription string

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    accountName string
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    accountPassword string
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    accountType string

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    dbInstanceId string
    The ID of the instance.
    description string
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instanceId string
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kmsEncryptedPassword string
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kmsEncryptionContext {[key: string]: string}
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name string
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password string
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    resetPermissionFlag boolean
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    type string

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    account_description str

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    account_name str
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    account_password str
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    account_type str

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    db_instance_id str
    The ID of the instance.
    description str
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instance_id str
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kms_encrypted_password str
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kms_encryption_context Mapping[str, str]
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name str
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password str
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    reset_permission_flag bool
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    type str

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    accountDescription String

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    accountName String
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    accountPassword String
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    accountType String

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    dbInstanceId String
    The ID of the instance.
    description String
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instanceId String
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kmsEncryptedPassword String
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kmsEncryptionContext Map<String>
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name String
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password String
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    resetPermissionFlag Boolean
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    type String

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    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.
    Status string
    The status of the resource. Valid values: Available, Unavailable.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource. Valid values: Available, Unavailable.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource. Valid values: Available, Unavailable.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource. Valid values: Available, Unavailable.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource. Valid values: Available, Unavailable.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource. Valid values: Available, Unavailable.

    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,
            account_description: Optional[str] = None,
            account_name: Optional[str] = None,
            account_password: Optional[str] = None,
            account_type: Optional[str] = None,
            db_instance_id: Optional[str] = None,
            description: Optional[str] = None,
            instance_id: Optional[str] = None,
            kms_encrypted_password: Optional[str] = None,
            kms_encryption_context: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            reset_permission_flag: Optional[bool] = None,
            status: Optional[str] = None,
            type: Optional[str] = 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)
    Resource lookup is not supported in YAML
    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:
    AccountDescription string

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    AccountName string
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    AccountPassword string
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    AccountType string

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    DbInstanceId string
    The ID of the instance.
    Description string
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    InstanceId string
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    KmsEncryptedPassword string
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    KmsEncryptionContext Dictionary<string, string>
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    Name string
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    Password string
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    ResetPermissionFlag bool
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    Status string
    The status of the resource. Valid values: Available, Unavailable.
    Type string

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    AccountDescription string

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    AccountName string
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    AccountPassword string
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    AccountType string

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    DbInstanceId string
    The ID of the instance.
    Description string
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    InstanceId string
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    KmsEncryptedPassword string
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    KmsEncryptionContext map[string]string
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    Name string
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    Password string
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    ResetPermissionFlag bool
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    Status string
    The status of the resource. Valid values: Available, Unavailable.
    Type string

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    accountDescription String

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    accountName String
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    accountPassword String
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    accountType String

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    dbInstanceId String
    The ID of the instance.
    description String
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instanceId String
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kmsEncryptedPassword String
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kmsEncryptionContext Map<String,String>
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name String
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password String
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    resetPermissionFlag Boolean
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    status String
    The status of the resource. Valid values: Available, Unavailable.
    type String

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    accountDescription string

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    accountName string
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    accountPassword string
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    accountType string

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    dbInstanceId string
    The ID of the instance.
    description string
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instanceId string
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kmsEncryptedPassword string
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kmsEncryptionContext {[key: string]: string}
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name string
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password string
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    resetPermissionFlag boolean
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    status string
    The status of the resource. Valid values: Available, Unavailable.
    type string

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    account_description str

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    account_name str
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    account_password str
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    account_type str

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    db_instance_id str
    The ID of the instance.
    description str
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instance_id str
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kms_encrypted_password str
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kms_encryption_context Mapping[str, str]
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name str
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password str
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    reset_permission_flag bool
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    status str
    The status of the resource. Valid values: Available, Unavailable.
    type str

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    accountDescription String

    The description of the account. The value must be 2 to 256 characters in length. The value can contain letters, digits, underscores (_), and hyphens (-), and must start with a letter.

    NOTE: The name cannot start with http:// or https://.

    accountName String
    The name of the database account.

    • The name must be unique.
    • The name can contain lowercase letters, digits, and underscores (_). For MySQL databases, the name can contain uppercase letters.
    • The name must start with a letter and end with a letter or digit.
    • For MySQL databases, the name of the privileged account cannot be the same as that of the standard account. For example, if the name of the privileged account is Test1, the name of the standard account cannot be test1.
    • The length of the value must meet the following requirements:
    • If the instance runs MySQL 5.7 or MySQL 8.0, the value must be 2 to 32 characters in length.
    • If the instance runs MySQL 5.6, the value must be 2 to 16 characters in length.
    • If the instance runs SQL Server, the value must be 2 to 64 characters in length.
    • If the instance runs PostgreSQL with cloud disks, the value must be 2 to 63 characters in length.
    • If the instance runs PostgreSQL with local disks, the value must be 2 to 16 characters in length.
    • If the instance runs MariaDB, the value must be 2 to 16 characters in length.
    • For more information about invalid characters, See Forbidden keywords.
    accountPassword String
    The password of the account.

    • The value must be 8 to 32 characters in length.
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
    • Special characters include ! @ # $ % ^ & * ( ) _ + - =
    accountType String

    The account type. Valid values:

    • Normal: standard account (default).
    • Super: privileged account.
    • Sysadmin: system admin account. The account type is available only for ApsaraDB RDS for SQL Server instances.

    NOTE: Before you create a system admin account, check whether the RDS instance meets all prerequisites. For more information, See Create a system admin account.

    dbInstanceId String
    The ID of the instance.
    description String
    The attribute has been deprecated from 1.120.0 and using account_description instead.

    Deprecated: Field 'description' has been deprecated from provider version 1.120.0. New field 'account_description' instead.

    instanceId String
    The attribute has been deprecated from 1.120.0 and using db_instance_id instead.

    Deprecated: Field 'instance_id' has been deprecated from provider version 1.120.0. New field 'db_instance_id' instead.

    kmsEncryptedPassword String
    An KMS encrypts password used to a db account. If the account_password is filled in, this field will be ignored.
    kmsEncryptionContext Map<String>
    An KMS encryption context used to decrypt kms_encrypted_password before creating or updating a db account with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set.
    name String
    The attribute has been deprecated from 1.120.0 and using account_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'account_name' instead.

    password String
    The attribute has been deprecated from 1.120.0 and using account_password instead.

    Deprecated: Field 'password' has been deprecated from provider version 1.120.0. New field 'account_password' instead.

    resetPermissionFlag Boolean
    Resets permissions flag of the privileged account. Default to false. Set it to true can resets permissions of the privileged account.
    status String
    The status of the resource. Valid values: Available, Unavailable.
    type String

    The attribute has been deprecated from 1.120.0 and using account_type instead.

    NOTE: Only MySQL engine is supported resets permissions of the privileged account.

    Deprecated: Field 'type' has been deprecated from provider version 1.120.0. New field 'account_type' instead.

    Import

    RDS Account can be imported using the id, e.g.

    $ pulumi import alicloud:rds/rdsAccount:RdsAccount example <db_instance_id>:<account_name>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi