Show / Hide Table of Contents

Class Account

Provides a kvstore account resource and used to manage databases.

NOTE: Available in 1.66.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var creation = config.Get("creation") ?? "KVStore";
    var name = config.Get("name") ?? "kvstoreinstancevpc";
    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 defaultInstance = new AliCloud.KVStore.Instance("defaultInstance", new AliCloud.KVStore.InstanceArgs
    {
        EngineVersion = "4.0",
        InstanceClass = "redis.master.small.default",
        InstanceName = name,
        InstanceType = "Redis",
        PrivateIp = "172.16.0.10",
        SecurityIps = 
        {
            "10.0.0.1",
        },
        VswitchId = defaultSwitch.Id,
    });
    var account = new AliCloud.KVStore.Account("account", new AliCloud.KVStore.AccountArgs
    {
        AccountName = "tftestnormal",
        AccountPassword = "Test12345",
        InstanceId = defaultInstance.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.KVStore
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

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

AccountPrivilege

The privilege of account access database. Valid values:

  • RoleReadOnly: This value is only for Redis and Memcache
  • RoleReadWrite: This value is only for Redis and Memcache
  • RoleRepl: This value supports instance to read, write, and open SYNC / PSYNC commands. Only for Redis which engine version is 4.0 and architecture type is standard
Declaration
public Output<string> AccountPrivilege { get; }
Property Value
Type Description
Output<System.String>
View Source

AccountType

Privilege type of account.

  • Normal: Common privilege. Default to Normal.
Declaration
public Output<string> AccountType { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

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.

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

InstanceId

The Id of instance in which account belongs. (The engine version of instance must be 4.0 or 4.0+)

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

KmsEncryptedPassword

An KMS encrypts password used to a KVStore 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 KVStore 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.