1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. adb
  5. Account
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.97.0
published on Saturday, Mar 14, 2026 by Pulumi

    Provides a AnalyticDB for MySQL (ADB) Account resource.

    For information about AnalyticDB for MySQL (ADB) Account and how to use it, see What is Account.

    NOTE: Available since v1.71.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform_example";
    const _default = alicloud.adb.getZones({});
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.ids?.[0],
    }));
    const cluster = new alicloud.adb.DBCluster("cluster", {
        dbClusterCategory: "MixedStorage",
        mode: "flexible",
        computeResource: "8Core32GB",
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        description: name,
    });
    const defaultAccount = new alicloud.adb.Account("default", {
        dbClusterId: cluster.id,
        accountName: name,
        accountPassword: "tf_example123",
        accountDescription: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform_example"
    default = alicloud.adb.get_zones()
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=default.ids[0])
    cluster = alicloud.adb.DBCluster("cluster",
        db_cluster_category="MixedStorage",
        mode="flexible",
        compute_resource="8Core32GB",
        vswitch_id=default_get_switches.ids[0],
        description=name)
    default_account = alicloud.adb.Account("default",
        db_cluster_id=cluster.id,
        account_name=name,
        account_password="tf_example123",
        account_description=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/adb"
    	"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 := "terraform_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := adb.GetZones(ctx, &adb.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(_default.Ids[0]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := adb.NewDBCluster(ctx, "cluster", &adb.DBClusterArgs{
    			DbClusterCategory: pulumi.String("MixedStorage"),
    			Mode:              pulumi.String("flexible"),
    			ComputeResource:   pulumi.String("8Core32GB"),
    			VswitchId:         pulumi.String(defaultGetSwitches.Ids[0]),
    			Description:       pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = adb.NewAccount(ctx, "default", &adb.AccountArgs{
    			DbClusterId:        cluster.ID(),
    			AccountName:        pulumi.String(name),
    			AccountPassword:    pulumi.String("tf_example123"),
    			AccountDescription: pulumi.String(name),
    		})
    		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") ?? "terraform_example";
        var @default = AliCloud.Adb.GetZones.Invoke();
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Ids[0]),
        });
    
        var cluster = new AliCloud.Adb.DBCluster("cluster", new()
        {
            DbClusterCategory = "MixedStorage",
            Mode = "flexible",
            ComputeResource = "8Core32GB",
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            Description = name,
        });
    
        var defaultAccount = new AliCloud.Adb.Account("default", new()
        {
            DbClusterId = cluster.Id,
            AccountName = name,
            AccountPassword = "tf_example123",
            AccountDescription = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.adb.AdbFunctions;
    import com.pulumi.alicloud.adb.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.adb.DBCluster;
    import com.pulumi.alicloud.adb.DBClusterArgs;
    import com.pulumi.alicloud.adb.Account;
    import com.pulumi.alicloud.adb.AccountArgs;
    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("terraform_example");
            final var default = AdbFunctions.getZones(GetZonesArgs.builder()
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.ids()[0])
                .zoneId(default_.ids()[0])
                .build());
    
            var cluster = new DBCluster("cluster", DBClusterArgs.builder()
                .dbClusterCategory("MixedStorage")
                .mode("flexible")
                .computeResource("8Core32GB")
                .vswitchId(defaultGetSwitches.ids()[0])
                .description(name)
                .build());
    
            var defaultAccount = new Account("defaultAccount", AccountArgs.builder()
                .dbClusterId(cluster.id())
                .accountName(name)
                .accountPassword("tf_example123")
                .accountDescription(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform_example
    resources:
      cluster:
        type: alicloud:adb:DBCluster
        properties:
          dbClusterCategory: MixedStorage
          mode: flexible
          computeResource: 8Core32GB
          vswitchId: ${defaultGetSwitches.ids[0]}
          description: ${name}
      defaultAccount:
        type: alicloud:adb:Account
        name: default
        properties:
          dbClusterId: ${cluster.id}
          accountName: ${name}
          accountPassword: tf_example123
          accountDescription: ${name}
    variables:
      default:
        fn::invoke:
          function: alicloud:adb:getZones
          arguments: {}
      defaultGetNetworks:
        fn::invoke:
          function: alicloud:vpc:getNetworks
          arguments:
            nameRegex: ^default-NODELETING$
      defaultGetSwitches:
        fn::invoke:
          function: alicloud:vpc:getSwitches
          arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.ids[0]}
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create Account Resource

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

    Constructor syntax

    new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
    @overload
    def Account(resource_name: str,
                args: AccountArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Account(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                account_name: Optional[str] = None,
                db_cluster_id: Optional[str] = None,
                account_description: Optional[str] = None,
                account_password: Optional[str] = None,
                account_type: Optional[str] = None,
                kms_encrypted_password: Optional[str] = None,
                kms_encryption_context: Optional[Mapping[str, str]] = None,
                tags: Optional[Mapping[str, str]] = None)
    func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
    public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
    public Account(String name, AccountArgs args)
    public Account(String name, AccountArgs args, CustomResourceOptions options)
    
    type: alicloud:adb:Account
    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 AccountArgs
    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 AccountArgs
    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 AccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountArgs
    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 accountResource = new AliCloud.Adb.Account("accountResource", new()
    {
        AccountName = "string",
        DbClusterId = "string",
        AccountDescription = "string",
        AccountPassword = "string",
        AccountType = "string",
        KmsEncryptedPassword = "string",
        KmsEncryptionContext = 
        {
            { "string", "string" },
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := adb.NewAccount(ctx, "accountResource", &adb.AccountArgs{
    	AccountName:          pulumi.String("string"),
    	DbClusterId:          pulumi.String("string"),
    	AccountDescription:   pulumi.String("string"),
    	AccountPassword:      pulumi.String("string"),
    	AccountType:          pulumi.String("string"),
    	KmsEncryptedPassword: pulumi.String("string"),
    	KmsEncryptionContext: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var accountResource = new com.pulumi.alicloud.adb.Account("accountResource", com.pulumi.alicloud.adb.AccountArgs.builder()
        .accountName("string")
        .dbClusterId("string")
        .accountDescription("string")
        .accountPassword("string")
        .accountType("string")
        .kmsEncryptedPassword("string")
        .kmsEncryptionContext(Map.of("string", "string"))
        .tags(Map.of("string", "string"))
        .build());
    
    account_resource = alicloud.adb.Account("accountResource",
        account_name="string",
        db_cluster_id="string",
        account_description="string",
        account_password="string",
        account_type="string",
        kms_encrypted_password="string",
        kms_encryption_context={
            "string": "string",
        },
        tags={
            "string": "string",
        })
    
    const accountResource = new alicloud.adb.Account("accountResource", {
        accountName: "string",
        dbClusterId: "string",
        accountDescription: "string",
        accountPassword: "string",
        accountType: "string",
        kmsEncryptedPassword: "string",
        kmsEncryptionContext: {
            string: "string",
        },
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:adb:Account
    properties:
        accountDescription: string
        accountName: string
        accountPassword: string
        accountType: string
        dbClusterId: string
        kmsEncryptedPassword: string
        kmsEncryptionContext:
            string: string
        tags:
            string: string
    

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

    AccountName string
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    DbClusterId string
    The cluster ID of the data warehouse edition.
    AccountDescription string
    The description of the account.
    AccountPassword string
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    AccountType string
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    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.
    Tags Dictionary<string, string>
    The tag of the resource.
    AccountName string
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    DbClusterId string
    The cluster ID of the data warehouse edition.
    AccountDescription string
    The description of the account.
    AccountPassword string
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    AccountType string
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    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.
    Tags map[string]string
    The tag of the resource.
    accountName String
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    dbClusterId String
    The cluster ID of the data warehouse edition.
    accountDescription String
    The description of the account.
    accountPassword String
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    accountType String
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    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.
    tags Map<String,String>
    The tag of the resource.
    accountName string
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    dbClusterId string
    The cluster ID of the data warehouse edition.
    accountDescription string
    The description of the account.
    accountPassword string
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    accountType string
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    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.
    tags {[key: string]: string}
    The tag of the resource.
    account_name str
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    db_cluster_id str
    The cluster ID of the data warehouse edition.
    account_description str
    The description of the account.
    account_password str
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    account_type str
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    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.
    tags Mapping[str, str]
    The tag of the resource.
    accountName String
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    dbClusterId String
    The cluster ID of the data warehouse edition.
    accountDescription String
    The description of the account.
    accountPassword String
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    accountType String
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    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.
    tags Map<String>
    The tag of the resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    (Available since v1.273.0) The status of the account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    (Available since v1.273.0) The status of the account.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    (Available since v1.273.0) The status of the account.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    (Available since v1.273.0) The status of the account.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    (Available since v1.273.0) The status of the account.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    (Available since v1.273.0) The status of the account.

    Look up Existing Account Resource

    Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account
    @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_cluster_id: Optional[str] = None,
            kms_encrypted_password: Optional[str] = None,
            kms_encryption_context: Optional[Mapping[str, str]] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> Account
    func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
    public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
    public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:adb:Account    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountDescription string
    The description of the account.
    AccountName string
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    AccountPassword string
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    AccountType string
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    DbClusterId string
    The cluster ID of the data warehouse edition.
    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.
    Status string
    (Available since v1.273.0) The status of the account.
    Tags Dictionary<string, string>
    The tag of the resource.
    AccountDescription string
    The description of the account.
    AccountName string
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    AccountPassword string
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    AccountType string
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    DbClusterId string
    The cluster ID of the data warehouse edition.
    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.
    Status string
    (Available since v1.273.0) The status of the account.
    Tags map[string]string
    The tag of the resource.
    accountDescription String
    The description of the account.
    accountName String
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    accountPassword String
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    accountType String
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    dbClusterId String
    The cluster ID of the data warehouse edition.
    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.
    status String
    (Available since v1.273.0) The status of the account.
    tags Map<String,String>
    The tag of the resource.
    accountDescription string
    The description of the account.
    accountName string
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    accountPassword string
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    accountType string
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    dbClusterId string
    The cluster ID of the data warehouse edition.
    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.
    status string
    (Available since v1.273.0) The status of the account.
    tags {[key: string]: string}
    The tag of the resource.
    account_description str
    The description of the account.
    account_name str
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    account_password str
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    account_type str
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    db_cluster_id str
    The cluster ID of the data warehouse edition.
    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.
    status str
    (Available since v1.273.0) The status of the account.
    tags Mapping[str, str]
    The tag of the resource.
    accountDescription String
    The description of the account.
    accountName String
    The name of the database account. The name must meet the following requirements:

    • Start with a lowercase letter and end with a lowercase letter or a digit.
    • Contain only lowercase letters, digits, and underscores (_).
    • Its length must be between 2 and 16 characters.
    • Cannot be a reserved name, such as root, admin, or opsadmin.
    accountPassword String
    The password of the database account. The password must meet the following requirements:

    • It must consist of uppercase letters, lowercase letters, digits, and special characters.
    • The allowed special characters are: (!), (@), (#), ($), (%), (^), (&), (*), (()), (_), (+), (-), (=).
    • Its length must be between 8 and 32 characters.
    accountType String
    The type of the account. Valid values:

    • Super (default): A privileged account. You can create only one privileged account for a cluster.
    dbClusterId String
    The cluster ID of the data warehouse edition.
    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.
    status String
    (Available since v1.273.0) The status of the account.
    tags Map<String>
    The tag of the resource.

    Import

    AnalyticDB for MySQL (ADB) Account can be imported using the id, e.g.

    $ pulumi import alicloud:adb/account:Account example <db_cluster_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
    Viewing docs for Alibaba Cloud v3.97.0
    published on Saturday, Mar 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.