alicloud.rds.RdsAccount
Explore with Pulumi AI
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, Any]] = 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", "any" },
},
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.Map{
"string": pulumi.Any("any"),
},
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", "any"))
.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": "any",
},
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: "any",
},
resetPermissionFlag: false,
});
type: alicloud:rds:RdsAccount
properties:
accountDescription: string
accountName: string
accountPassword: string
accountType: string
dbInstanceId: string
kmsEncryptedPassword: string
kmsEncryptionContext:
string: any
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
The RdsAccount resource accepts the following input properties:
- Account
Description 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.
- Account
Name 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.
- Account
Password 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
andkms_encrypted_password
fields. - Account
Type string - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - Db
Instance stringId - The Id of instance in which account belongs.
- Description string
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - Instance
Id string - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - Kms
Encrypted stringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - Kms
Encryption Dictionary<string, object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - Name string
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - Password string
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - Reset
Permission boolFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- Account
Description 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.
- Account
Name 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.
- Account
Password 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
andkms_encrypted_password
fields. - Account
Type string - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - Db
Instance stringId - The Id of instance in which account belongs.
- Description string
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - Instance
Id string - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - Kms
Encrypted stringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - Kms
Encryption map[string]interface{}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - Name string
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - Password string
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - Reset
Permission boolFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- account
Description 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.
- account
Name 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.
- account
Password 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
andkms_encrypted_password
fields. - account
Type String - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db
Instance StringId - The Id of instance in which account belongs.
- description String
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance
Id String - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms
Encrypted StringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms
Encryption Map<String,Object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name String
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password String
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset
Permission BooleanFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- account
Description 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.
- account
Name 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.
- account
Password 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
andkms_encrypted_password
fields. - account
Type string - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db
Instance stringId - The Id of instance in which account belongs.
- description string
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance
Id string - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms
Encrypted stringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms
Encryption {[key: string]: any}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name string
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password string
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset
Permission booleanFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- 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
andkms_encrypted_password
fields. - account_
type str - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db_
instance_ strid - The Id of instance in which account belongs.
- description str
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance_
id str - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms_
encrypted_ strpassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms_
encryption_ Mapping[str, Any]context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name str
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password str
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset_
permission_ boolflag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- account
Description 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.
- account
Name 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.
- account
Password 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
andkms_encrypted_password
fields. - account
Type String - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db
Instance StringId - The Id of instance in which account belongs.
- description String
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance
Id String - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms
Encrypted StringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms
Encryption Map<Any>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name String
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password String
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset
Permission BooleanFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
Outputs
All input properties are implicitly available as output properties. Additionally, the RdsAccount resource produces the following output properties:
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.
- Account
Description 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.
- Account
Name 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.
- Account
Password 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
andkms_encrypted_password
fields. - Account
Type string - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - Db
Instance stringId - The Id of instance in which account belongs.
- Description string
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - Instance
Id string - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - Kms
Encrypted stringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - Kms
Encryption Dictionary<string, object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - Name string
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - Password string
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - Reset
Permission boolFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- Account
Description 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.
- Account
Name 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.
- Account
Password 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
andkms_encrypted_password
fields. - Account
Type string - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - Db
Instance stringId - The Id of instance in which account belongs.
- Description string
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - Instance
Id string - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - Kms
Encrypted stringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - Kms
Encryption map[string]interface{}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - Name string
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - Password string
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - Reset
Permission boolFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- account
Description 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.
- account
Name 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.
- account
Password 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
andkms_encrypted_password
fields. - account
Type String - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db
Instance StringId - The Id of instance in which account belongs.
- description String
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance
Id String - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms
Encrypted StringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms
Encryption Map<String,Object>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name String
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password String
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset
Permission BooleanFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- account
Description 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.
- account
Name 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.
- account
Password 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
andkms_encrypted_password
fields. - account
Type string - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db
Instance stringId - The Id of instance in which account belongs.
- description string
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance
Id string - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms
Encrypted stringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms
Encryption {[key: string]: any}Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name string
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password string
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset
Permission booleanFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- 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
andkms_encrypted_password
fields. - account_
type str - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db_
instance_ strid - The Id of instance in which account belongs.
- description str
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance_
id str - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms_
encrypted_ strpassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms_
encryption_ Mapping[str, Any]context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name str
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password str
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset_
permission_ boolflag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
- account
Description 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.
- account
Name 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.
- account
Password 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
andkms_encrypted_password
fields. - account
Type String - Privilege type of account. Default to
Normal
.Normal
: Common privilege.Super
: High privilege. - db
Instance StringId - The Id of instance in which account belongs.
- description String
- The attribute has been deprecated from 1.120.0 and using
account_description
instead. - instance
Id String - The attribute has been deprecated from 1.120.0 and using
db_instance_id
instead. - kms
Encrypted StringPassword - An KMS encrypts password used to a db account. If the
account_password
is filled in, this field will be ignored. - kms
Encryption Map<Any>Context - An KMS encryption context used to decrypt
kms_encrypted_password
before creating or updating a db account withkms_encrypted_password
. See Encryption Context. It is valid whenkms_encrypted_password
is set. - name String
- The attribute has been deprecated from 1.120.0 and using
account_name
instead. - password String
- The attribute has been deprecated from 1.120.0 and using
account_password
instead. - reset
Permission BooleanFlag - Resets permissions flag of the privileged account. Default to
false
. Set it totrue
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.
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.