Account

class Account : KotlinCustomResource

Provides a Click House Account resource. For information about Click House Account and how to use it, see What is Account.

NOTE: Available since v1.134.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.clickhouse.ClickhouseFunctions;
import com.pulumi.alicloud.clickhouse.inputs.GetRegionsArgs;
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.clickhouse.DbCluster;
import com.pulumi.alicloud.clickhouse.DbClusterArgs;
import com.pulumi.alicloud.clickhouse.Account;
import com.pulumi.alicloud.clickhouse.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 name = config.get("name").orElse("tf-example");
final var defaultRegions = ClickhouseFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].zoneIds()[0].zoneId()))
.build());
var defaultDbCluster = new DbCluster("defaultDbCluster", DbClusterArgs.builder()
.dbClusterVersion("22.8.5.29")
.category("Basic")
.dbClusterClass("S8")
.dbClusterNetworkType("vpc")
.dbNodeGroupCount("1")
.paymentType("PayAsYouGo")
.dbNodeStorage("500")
.storageType("cloud_essd")
.vswitchId(defaultSwitch.id())
.vpcId(defaultNetwork.id())
.build());
var defaultAccount = new Account("defaultAccount", AccountArgs.builder()
.dbClusterId(defaultDbCluster.id())
.accountDescription("tf-example-description")
.accountName("examplename")
.accountPassword("Example1234")
.build());
}
}

Import

Click House Account can be imported using the id, e.g.

$ pulumi import alicloud:clickhouse/account:Account example <db_cluster_id>:<account_name>

Properties

Link copied to clipboard

In Chinese, English letter. May contain Chinese and English characters, lowercase letters, numbers, and underscores (_), the dash (-). Cannot start with http:// and https:// at the beginning. Length is from 2 to 256 characters.

Link copied to clipboard
val accountName: Output<String>

Account name: lowercase letters, numbers, underscores, lowercase letter; length no more than 16 characters.

Link copied to clipboard
val accountPassword: Output<String>

The account password: uppercase letters, lowercase letters, lowercase letters, numbers, and special characters (special character! #$%^& author (s):_+-=) in a length of 8-32 bit.

Link copied to clipboard
val allowDatabases: Output<String>

The list of databases to which you want to grant permissions. Separate databases with commas (,).

Link copied to clipboard

The list of dictionaries to which you want to grant permissions. Separate dictionaries with commas (,).

Link copied to clipboard
val dbClusterId: Output<String>

The db cluster id.

Link copied to clipboard
val ddlAuthority: Output<Boolean>

Specifies whether to grant DDL permissions to the database account. Valid values: true and false.

Link copied to clipboard
val dmlAuthority: Output<String>

Specifies whether to grant DML permissions to the database account. Valid values: all and readOnly,modify.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the resource. Valid Status: Creating,Available,Deleting.

Link copied to clipboard
val totalDatabases: Output<String>

The list of all databases. Separate databases with commas (,).

Link copied to clipboard

The list of all dictionaries. Separate dictionaries with commas (,).

Link copied to clipboard
val type: Output<String>

The type of the database account. Valid values: Normal or Super.

Link copied to clipboard
val urn: Output<String>