AccountArgs

data class AccountArgs(val accountDescription: Output<String>? = null, val accountName: Output<String>? = null, val accountPassword: Output<String>? = null, val accountType: Output<String>? = null, val dbInstanceId: Output<String>? = null, val description: Output<String>? = null, val instanceId: Output<String>? = null, val kmsEncryptedPassword: Output<String>? = null, val kmsEncryptionContext: Output<Map<String, Any>>? = null, val name: Output<String>? = null, val password: Output<String>? = null, val resetPermissionFlag: Output<Boolean>? = null, val type: Output<String>? = null) : ConvertibleToJava<AccountArgs>

Provides an RDS account resource and used to manage databases.

DEPRECATED: This resource has been deprecated from version 1.120.0. Please use new resource alicloud_rds_account.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
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.Account;
import com.pulumi.alicloud.rds.AccountArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var creation = config.get("creation").orElse("Rds");
final var name = config.get("name").orElse("dbaccountmysql");
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation(creation)
.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.zones()[0].id()))
.vswitchName(name)
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.engine("MySQL")
.engineVersion("5.6")
.instanceType("rds.mysql.s1.small")
.instanceStorage("10")
.vswitchId(defaultSwitch.id())
.instanceName(name)
.build());
var account = new Account("account", AccountArgs.builder()
.instanceId(instance.id())
.password("Test12345")
.build());
}
}

Import

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

$ pulumi import alicloud:rds/account:Account example "rm-12345:tf_account"

Constructors

Link copied to clipboard
fun AccountArgs(accountDescription: Output<String>? = null, accountName: Output<String>? = null, accountPassword: Output<String>? = null, accountType: Output<String>? = null, dbInstanceId: Output<String>? = null, description: Output<String>? = null, instanceId: Output<String>? = null, kmsEncryptedPassword: Output<String>? = null, kmsEncryptionContext: Output<Map<String, Any>>? = null, name: Output<String>? = null, password: Output<String>? = null, resetPermissionFlag: Output<Boolean>? = null, type: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AccountArgs

Properties

Link copied to clipboard
val accountDescription: Output<String>? = null
Link copied to clipboard
val accountName: Output<String>? = null
Link copied to clipboard
val accountPassword: Output<String>? = null
Link copied to clipboard
val accountType: Output<String>? = null
Link copied to clipboard
val dbInstanceId: Output<String>? = null
Link copied to clipboard
val description: Output<String>? = null

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.

Link copied to clipboard
val instanceId: Output<String>? = null

The Id of instance in which account belongs.

Link copied to clipboard
val kmsEncryptedPassword: Output<String>? = null

An KMS encrypts password used to a db account. If the password is filled in, this field will be ignored.

Link copied to clipboard
val kmsEncryptionContext: Output<Map<String, Any>>? = null

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.

Link copied to clipboard
val name: Output<String>? = null

Operation account requiring a uniqueness check. It may consist of lower case letters, numbers, and underlines, and must start with a letter and have no more than 16 characters.

Link copied to clipboard
val password: Output<String>? = null

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.

Link copied to clipboard
val resetPermissionFlag: Output<Boolean>? = null
Link copied to clipboard
val type: Output<String>? = null

Privilege type of account. The SQLServer engine does not support create high privilege accounts.