1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. rds
  5. RdsAccount
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.rds.RdsAccount

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 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 defaultZones = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "5.6",
    });
    const defaultInstanceClasses = defaultZones.then(defaultZones => alicloud.rds.getInstanceClasses({
        zoneId: defaultZones.ids?.[0],
        engine: "MySQL",
        engineVersion: "5.6",
    }));
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: name,
        cidrBlock: "172.16.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: defaultZones.then(defaultZones => defaultZones.ids?.[0]),
        vswitchName: name,
    });
    const defaultInstance = new alicloud.rds.Instance("defaultInstance", {
        engine: "MySQL",
        engineVersion: "5.6",
        instanceType: defaultInstanceClasses.then(defaultInstanceClasses => defaultInstanceClasses.instanceClasses?.[0]?.instanceClass),
        instanceStorage: 10,
        vswitchId: defaultSwitch.id,
        instanceName: name,
    });
    const defaultRdsAccount = new alicloud.rds.RdsAccount("defaultRdsAccount", {
        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_zones = alicloud.rds.get_zones(engine="MySQL",
        engine_version="5.6")
    default_instance_classes = alicloud.rds.get_instance_classes(zone_id=default_zones.ids[0],
        engine="MySQL",
        engine_version="5.6")
    default_network = alicloud.vpc.Network("defaultNetwork",
        vpc_name=name,
        cidr_block="172.16.0.0/16")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default_zones.ids[0],
        vswitch_name=name)
    default_instance = alicloud.rds.Instance("defaultInstance",
        engine="MySQL",
        engine_version="5.6",
        instance_type=default_instance_classes.instance_classes[0].instance_class,
        instance_storage=10,
        vswitch_id=default_switch.id,
        instance_name=name)
    default_rds_account = alicloud.rds.RdsAccount("defaultRdsAccount",
        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
    		}
    		defaultZones, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:        pulumi.StringRef(defaultZones.Ids[0]),
    			Engine:        pulumi.StringRef("MySQL"),
    			EngineVersion: pulumi.StringRef("5.6"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			VpcId:       defaultNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/24"),
    			ZoneId:      pulumi.String(defaultZones.Ids[0]),
    			VswitchName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "defaultInstance", &rds.InstanceArgs{
    			Engine:          pulumi.String("MySQL"),
    			EngineVersion:   pulumi.String("5.6"),
    			InstanceType:    pulumi.String(defaultInstanceClasses.InstanceClasses[0].InstanceClass),
    			InstanceStorage: pulumi.Int(10),
    			VswitchId:       defaultSwitch.ID(),
    			InstanceName:    pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rds.NewRdsAccount(ctx, "defaultRdsAccount", &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 defaultZones = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var defaultInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Ids[0]),
            Engine = "MySQL",
            EngineVersion = "5.6",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = name,
            CidrBlock = "172.16.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Ids[0]),
            VswitchName = name,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("defaultInstance", new()
        {
            Engine = "MySQL",
            EngineVersion = "5.6",
            InstanceType = defaultInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
            InstanceStorage = 10,
            VswitchId = defaultSwitch.Id,
            InstanceName = name,
        });
    
        var defaultRdsAccount = new AliCloud.Rds.RdsAccount("defaultRdsAccount", 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 defaultZones = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("5.6")
                .build());
    
            final var defaultInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.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(defaultZones.applyValue(getZonesResult -> getZonesResult.ids()[0]))
                .vswitchName(name)
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .engine("MySQL")
                .engineVersion("5.6")
                .instanceType(defaultInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].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
        properties:
          vpcName: ${name}
          cidrBlock: 172.16.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${defaultZones.ids[0]}
          vswitchName: ${name}
      defaultInstance:
        type: alicloud:rds:Instance
        properties:
          engine: MySQL
          engineVersion: '5.6'
          instanceType: ${defaultInstanceClasses.instanceClasses[0].instanceClass}
          instanceStorage: '10'
          vswitchId: ${defaultSwitch.id}
          instanceName: ${name}
      defaultRdsAccount:
        type: alicloud:rds:RdsAccount
        properties:
          dbInstanceId: ${defaultInstance.id}
          accountName: ${name}
          accountPassword: Example1234
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '5.6'
      defaultInstanceClasses:
        fn::invoke:
          Function: alicloud:rds:getInstanceClasses
          Arguments:
            zoneId: ${defaultZones.ids[0]}
            engine: MySQL
            engineVersion: '5.6'
    

    Create RdsAccount Resource

    new RdsAccount(name: string, args?: RdsAccountArgs, opts?: CustomResourceOptions);
    @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, Any]] = None,
                   name: Optional[str] = None,
                   password: Optional[str] = None,
                   reset_permission_flag: Optional[bool] = None,
                   type: Optional[str] = None)
    @overload
    def RdsAccount(resource_name: str,
                   args: Optional[RdsAccountArgs] = None,
                   opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The RdsAccount resource accepts the following input properties:

    AccountDescription string
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    AccountName string
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    AccountPassword string
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    AccountType string
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    DbInstanceId string
    The Id of instance in which account belongs.
    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, object>
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    AccountName string
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    AccountPassword string
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    AccountType string
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    DbInstanceId string
    The Id of instance in which account belongs.
    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]interface{}
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    accountName String
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    accountPassword String
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    accountType String
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    dbInstanceId String
    The Id of instance in which account belongs.
    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,Object>
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    accountName string
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    accountPassword string
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    accountType string
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    dbInstanceId string
    The Id of instance in which account belongs.
    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]: any}
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    account_name str
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    account_password str
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    account_type str
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    db_instance_id str
    The Id of instance in which account belongs.
    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, Any]
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    accountName String
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    accountPassword String
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    accountType String
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    dbInstanceId String
    The Id of instance in which account belongs.
    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<Any>
    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, Any]] = 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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    AccountName string
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    AccountPassword string
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    AccountType string
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    DbInstanceId string
    The Id of instance in which account belongs.
    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, object>
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    AccountName string
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    AccountPassword string
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    AccountType string
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    DbInstanceId string
    The Id of instance in which account belongs.
    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]interface{}
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    accountName String
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    accountPassword String
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    accountType String
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    dbInstanceId String
    The Id of instance in which account belongs.
    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,Object>
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    accountName string
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    accountPassword string
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    accountType string
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    dbInstanceId string
    The Id of instance in which account belongs.
    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]: any}
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    account_name str
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    account_password str
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    account_type str
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    db_instance_id str
    The Id of instance in which account belongs.
    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, Any]
    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
    Database description. It cannot begin with https://. It must start with a Chinese character or English letter. It can include Chinese and English characters, underlines (_), hyphens (-), and numbers. The length may be 2-256 characters.
    accountName String
    Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and end with letters or numbers, The length must be 2-63 characters for PostgreSQL, otherwise the length must be 2-32 characters.
    accountPassword String
    Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of password and kms_encrypted_password fields.
    accountType String
    Privilege type of account. Default to Normal. Normal: Common privilege. Super: High privilege.
    dbInstanceId String
    The Id of instance in which account belongs.
    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<Any>
    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>
    

    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.51.0 published on Saturday, Mar 23, 2024 by Pulumi