InstanceArgs

data class InstanceArgs(val account: Output<String>? = null, val autoRenew: Output<Boolean>? = null, val coldStorageSize: Output<Int>? = null, val coreDiskSize: Output<Int>? = null, val coreDiskType: Output<String>? = null, val coreInstanceQuantity: Output<Int>? = null, val coreInstanceType: Output<String>? = null, val deletionProtection: Output<Boolean>? = null, val duration: Output<Int>? = null, val engine: Output<String>? = null, val engineVersion: Output<String>? = null, val immediateDeleteFlag: Output<Boolean>? = null, val ipWhite: Output<String>? = null, val maintainEndTime: Output<String>? = null, val maintainStartTime: Output<String>? = null, val masterInstanceType: Output<String>? = null, val name: Output<String>? = null, val password: Output<String>? = null, val payType: Output<String>? = null, val securityGroups: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<InstanceArgs>

Provides a HBase instance resource supports replica set instances only. The HBase provides stable, reliable, and automatic scalable database services. It offers a full range of database solutions, such as disaster recovery, backup, recovery, monitoring, and alarms. You can see detail product introduction here

NOTE: Available since v1.67.0. NOTE: The following regions don't support create Classic network HBase instance. `cn-hangzhou`,`cn-shanghai`,`cn-qingdao`,`cn-beijing`,`cn-shenzhen`,`ap-southeast-1a`,..... The official website mark more regions. or you can call DescribeRegions NOTE: Create HBase instance or change instance type and storage would cost 15 minutes. Please make full preparation

Example Usage

Create a hbase instance

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.hbase.getZones({});
const defaultGetNetworks = alicloud.vpc.getNetworks({
nameRegex: "^default-NODELETING$",
});
const defaultGetSwitches = Promise.all([defaultGetNetworks, _default])&#46;then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
vpcId: defaultGetNetworks.ids?.[0],
zoneId: _default.zones?.[1]?.id,
}));
const defaultInstance = new alicloud.hbase.Instance("default", {
name: name,
zoneId: _default.then(_default => _default.zones?.[1]?.id),
vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
engine: "hbaseue",
engineVersion: "2.0",
masterInstanceType: "hbase.sn2.2xlarge",
coreInstanceType: "hbase.sn2.2xlarge",
coreInstanceQuantity: 2,
coreDiskType: "cloud_efficiency",
coreDiskSize: 400,
payType: "PostPaid",
coldStorageSize: 0,
deletionProtection: false,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.hbase.get_zones()
default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
zone_id=default.zones[1].id)
default_instance = alicloud.hbase.Instance("default",
name=name,
zone_id=default.zones[1].id,
vswitch_id=default_get_switches.ids[0],
vpc_id=default_get_networks.ids[0],
engine="hbaseue",
engine_version="2.0",
master_instance_type="hbase.sn2.2xlarge",
core_instance_type="hbase.sn2.2xlarge",
core_instance_quantity=2,
core_disk_type="cloud_efficiency",
core_disk_size=400,
pay_type="PostPaid",
cold_storage_size=0,
deletion_protection=False)
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.Hbase.GetZones.Invoke();
var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
{
NameRegex = "^default-NODELETING$",
});
var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
{
VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
});
var defaultInstance = new AliCloud.Hbase.Instance("default", new()
{
Name = name,
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[1]?.Id)),
VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
Engine = "hbaseue",
EngineVersion = "2.0",
MasterInstanceType = "hbase.sn2.2xlarge",
CoreInstanceType = "hbase.sn2.2xlarge",
CoreInstanceQuantity = 2,
CoreDiskType = "cloud_efficiency",
CoreDiskSize = 400,
PayType = "PostPaid",
ColdStorageSize = 0,
DeletionProtection = false,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbase"
"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 := hbase.GetZones(ctx, &hbase.GetZonesArgs{}, nil)
if err != nil {
return err
}
defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
NameRegex: pulumi.StringRef("^default-NODELETING$"),
}, nil)
if err != nil {
return err
}
defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
VpcId: pulumi.StringRef(defaultGetNetworks.Ids[0]),
ZoneId: pulumi.StringRef(_default.Zones[1].Id),
}, nil)
if err != nil {
return err
}
_, err = hbase.NewInstance(ctx, "default", &hbase.InstanceArgs{
Name: pulumi.String(name),
ZoneId: pulumi.String(_default.Zones[1].Id),
VswitchId: pulumi.String(defaultGetSwitches.Ids[0]),
VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
Engine: pulumi.String("hbaseue"),
EngineVersion: pulumi.String("2.0"),
MasterInstanceType: pulumi.String("hbase.sn2.2xlarge"),
CoreInstanceType: pulumi.String("hbase.sn2.2xlarge"),
CoreInstanceQuantity: pulumi.Int(2),
CoreDiskType: pulumi.String("cloud_efficiency"),
CoreDiskSize: pulumi.Int(400),
PayType: pulumi.String("PostPaid"),
ColdStorageSize: pulumi.Int(0),
DeletionProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.hbase.HbaseFunctions;
import com.pulumi.alicloud.hbase.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.hbase.Instance;
import com.pulumi.alicloud.hbase.InstanceArgs;
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 = HbaseFunctions.getZones(GetZonesArgs.builder()
.build());
final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
.nameRegex("^default-NODELETING$")
.build());
final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
.vpcId(defaultGetNetworks.ids()[0])
.zoneId(default_.zones()[1].id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.name(name)
.zoneId(default_.zones()[1].id())
.vswitchId(defaultGetSwitches.ids()[0])
.vpcId(defaultGetNetworks.ids()[0])
.engine("hbaseue")
.engineVersion("2.0")
.masterInstanceType("hbase.sn2.2xlarge")
.coreInstanceType("hbase.sn2.2xlarge")
.coreInstanceQuantity(2)
.coreDiskType("cloud_efficiency")
.coreDiskSize(400)
.payType("PostPaid")
.coldStorageSize(0)
.deletionProtection(false)
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultInstance:
type: alicloud:hbase:Instance
name: default
properties:
name: ${name}
zoneId: ${default.zones[1].id}
vswitchId: ${defaultGetSwitches.ids[0]}
vpcId: ${defaultGetNetworks.ids[0]}
engine: hbaseue
engineVersion: '2.0'
masterInstanceType: hbase.sn2.2xlarge
coreInstanceType: hbase.sn2.2xlarge
coreInstanceQuantity: 2
coreDiskType: cloud_efficiency
coreDiskSize: 400
payType: PostPaid
coldStorageSize: 0
deletionProtection: 'false'
variables:
default:
fn::invoke:
function: alicloud:hbase:getZones
arguments: {}
defaultGetNetworks:
fn::invoke:
function: alicloud:vpc:getNetworks
arguments:
nameRegex: ^default-NODELETING$
defaultGetSwitches:
fn::invoke:
function: alicloud:vpc:getSwitches
arguments:
vpcId: ${defaultGetNetworks.ids[0]}
zoneId: ${default.zones[1].id}

this is a example for class netType instance. you can find more detail with the examples/hbase dir.

Import

HBase can be imported using the id, e.g.

$ pulumi import alicloud:hbase/instance:Instance example hb-wz96815u13k659fvd

Constructors

Link copied to clipboard
constructor(account: Output<String>? = null, autoRenew: Output<Boolean>? = null, coldStorageSize: Output<Int>? = null, coreDiskSize: Output<Int>? = null, coreDiskType: Output<String>? = null, coreInstanceQuantity: Output<Int>? = null, coreInstanceType: Output<String>? = null, deletionProtection: Output<Boolean>? = null, duration: Output<Int>? = null, engine: Output<String>? = null, engineVersion: Output<String>? = null, immediateDeleteFlag: Output<Boolean>? = null, ipWhite: Output<String>? = null, maintainEndTime: Output<String>? = null, maintainStartTime: Output<String>? = null, masterInstanceType: Output<String>? = null, name: Output<String>? = null, password: Output<String>? = null, payType: Output<String>? = null, securityGroups: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)

Properties

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

The account of the cluster web ui. Size 0-128.

Link copied to clipboard
val autoRenew: Output<Boolean>? = null

Valid values are true, false, system default to false, valid when pay_type = PrePaid.

Link copied to clipboard
val coldStorageSize: Output<Int>? = null

0 or 800, 100000000, step:10-GB increments. 0 means is_cold_storage = false. 800, 100000000 means is_cold_storage = true.

Link copied to clipboard
val coreDiskSize: Output<Int>? = null

User-defined HBase instance one core node's storage. Valid when engine=hbase/hbaseue. Bds engine no need core_disk_size, space.Unit: GB. Value range:

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

Valid values are cloud_ssd, cloud_essd_pl1, cloud_efficiency, local_hdd_pro, local_ssd_pro,``, local_disk size is fixed. When engine=bds, no need to set disk type(or empty string).

Link copied to clipboard
val coreInstanceQuantity: Output<Int>? = null

Default=2, 1-200. If core_instance_quantity 1, this is cluster's instance. If core_instance_quantity = 1, this is a single instance.

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

Instance specification. See Instance specifications, or you can call describeInstanceType api.

Link copied to clipboard
val deletionProtection: Output<Boolean>? = null

The switch of delete protection. True: delete protect, False: no delete protect. You must set false when you want to delete cluster.

Link copied to clipboard
val duration: Output<Int>? = null

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, valid when pay_type = PrePaid, unit: month. 12, 24, 36 mean 1, 2, 3 years.

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

Valid values are "hbase/hbaseue/bds". The following types are supported after v1.73.0: hbaseue and bds. Single hbase instance need to set engine=hbase, core_instance_quantity=1.

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

HBase major version. hbase:1.1/2.0, hbaseue:2.0, bds:1.0, unsupport other engine temporarily. Value options can refer to the latest docs CreateInstance.

Link copied to clipboard
val immediateDeleteFlag: Output<Boolean>? = null

The switch of delete immediate. True: delete immediate, False: delete delay. You will not found the cluster no matter set true or false.

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

The white ip list of the cluster.

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

The end time of the operation and maintenance time period of the instance, in the format of HH:mmZ (UTC time), for example 04:00Z.

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

The start time of the operation and maintenance time period of the instance, in the format of HH:mmZ (UTC time), for example 02:00Z.

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

Instance specification. See Instance specifications, or you can call describeInstanceType api.

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

HBase instance name. Length must be 2-128 characters long. Only Chinese characters, English letters, numbers, period (.), underline (_), or dash (-) are permitted.

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

The password of the cluster web ui account. Size 0-128.

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

Valid values are PrePaid, PostPaid, System default to PostPaid. You can also convert PostPaid to PrePaid. And support convert PrePaid to PostPaid from 1.115.0+.

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

The security group resource of the cluster.

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

A mapping of tags to assign to the resource.

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

The id of the VPC.

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

If vswitch_id is not empty, that mean net_type = vpc and has a same region. If vswitch_id is empty, net_type=classic. Intl site not support classic network.

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

The Zone to launch the HBase instance. If vswitch_id is not empty, this zone_id can be "" or consistent.

Functions

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