Show / Hide Table of Contents

Class Account

Provides a ADB account resource and used to manage databases.

NOTE: Available in v1.71.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var creation = config.Get("creation") ?? "ADB";
    var name = config.Get("name") ?? "adbaccountmysql";
    var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
    {
        AvailableResourceCreation = creation,
    }));
    var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/16",
    });
    var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
    {
        AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
        CidrBlock = "172.16.0.0/24",
        VpcId = defaultNetwork.Id,
    });
    var cluster = new AliCloud.Adb.Cluster("cluster", new AliCloud.Adb.ClusterArgs
    {
        DbClusterCategory = "Cluster",
        DbClusterVersion = "3.0",
        DbNodeClass = "C8",
        DbNodeCount = 2,
        DbNodeStorage = 200,
        Description = name,
        PayType = "PostPaid",
        VswitchId = defaultSwitch.Id,
    });
    var account = new AliCloud.Adb.Account("account", new AliCloud.Adb.AccountArgs
    {
        AccountDescription = name,
        AccountName = "tftestnormal",
        AccountPassword = "Test12345",
        DbClusterId = cluster.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Account
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Adb
Assembly: Pulumi.AliCloud.dll
Syntax
public class Account : CustomResource

Constructors

View Source

Account(String, AccountArgs, CustomResourceOptions)

Create a Account resource with the given unique name, arguments, and options.

Declaration
public Account(string name, AccountArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

AccountArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AccountDescription

Account 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.

Declaration
public Output<string> AccountDescription { get; }
Property Value
Type Description
Output<System.String>
View Source

AccountName

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.

Declaration
public Output<string> AccountName { get; }
Property Value
Type Description
Output<System.String>
View Source

AccountPassword

Operation password. It may consist of letters, digits, or underlines, with a length of 6 to 32 characters. You have to specify one of account_password and kms_encrypted_password fields.

Declaration
public Output<string> AccountPassword { get; }
Property Value
Type Description
Output<System.String>
View Source

DbClusterId

The Id of cluster in which account belongs.

Declaration
public Output<string> DbClusterId { get; }
Property Value
Type Description
Output<System.String>
View Source

KmsEncryptedPassword

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

Declaration
public Output<string> KmsEncryptedPassword { get; }
Property Value
Type Description
Output<System.String>
View Source

KmsEncryptionContext

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.

Declaration
public Output<ImmutableDictionary<string, object>> KmsEncryptionContext { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>

Methods

View Source

Get(String, Input<String>, AccountState, CustomResourceOptions)

Get an existing Account resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Account Get(string name, Input<string> id, AccountState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

AccountState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Account
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.