InstanceArgs

data class InstanceArgs(val config: Output<String>? = null, val deployType: Output<Int>? = null, val diskSize: Output<Int>? = null, val diskType: Output<Int>? = null, val eipMax: Output<Int>? = null, val ioMax: Output<Int>? = null, val kmsKeyId: Output<String>? = null, val name: Output<String>? = null, val paidType: Output<String>? = null, val partitionNum: Output<Int>? = null, val securityGroup: Output<String>? = null, val selectedZones: Output<List<String>>? = null, val serviceVersion: Output<String>? = null, val specType: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val topicQuota: Output<Int>? = null, val vpcId: Output<String>? = null, val vswitchId: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<InstanceArgs>

Provides an ALIKAFKA instance resource. For information about ALIKAFKA instance and how to use it, see What is ALIKAFKA instance.

NOTE: Available in 1.59.0+ NOTE: Creation or modification may took about 10-40 minutes. NOTE: Only the following regions support create alikafka pre paid instance. `cn-hangzhou`,`cn-beijing`,`cn-shenzhen`,`cn-shanghai`,`cn-qingdao`,`cn-hongkong`,`cn-huhehaote`,`cn-zhangjiakou`,`cn-chengdu`,`cn-heyuan`,`ap-southeast-1`,`ap-southeast-3`,`ap-southeast-5`,`ap-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1` NOTE: Only the following regions support create alikafka post paid instance. `cn-hangzhou`,`cn-beijing`,`cn-shenzhen`,`cn-shanghai`,`cn-qingdao`,`cn-hongkong`,`cn-huhehaote`,`cn-zhangjiakou`,`cn-chengdu`,`cn-heyuan`,`ap-southeast-1`,`ap-southeast-3`,`ap-southeast-5`,`ap-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`

Example Usage

Basic 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.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.alikafka.Instance;
import com.pulumi.alicloud.alikafka.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 instanceName = config.get("instanceName").orElse("alikafkaInstanceName");
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.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()))
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.partitionNum("50")
.diskType("1")
.diskSize("500")
.deployType("4")
.ioMax("20")
.vswitchId(defaultSwitch.id())
.securityGroup(defaultSecurityGroup.id())
.build());
}
}

Import

ALIKAFKA TOPIC can be imported using the id, e.g.

$ pulumi import alicloud:alikafka/instance:Instance instance alikafka_post-cn-123455abc

Constructors

Link copied to clipboard
fun InstanceArgs(config: Output<String>? = null, deployType: Output<Int>? = null, diskSize: Output<Int>? = null, diskType: Output<Int>? = null, eipMax: Output<Int>? = null, ioMax: Output<Int>? = null, kmsKeyId: Output<String>? = null, name: Output<String>? = null, paidType: Output<String>? = null, partitionNum: Output<Int>? = null, securityGroup: Output<String>? = null, selectedZones: Output<List<String>>? = null, serviceVersion: Output<String>? = null, specType: Output<String>? = null, tags: Output<Map<String, Any>>? = null, topicQuota: Output<Int>? = null, vpcId: Output<String>? = null, vswitchId: Output<String>? = null, zoneId: Output<String>? = null)

Functions

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

Properties

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

The basic config for this instance. The input should be json type, only the following key allowed: enable.acl, enable.vpc_sasl_ssl, kafka.log.retention.hours, kafka.message.max.bytes.

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

The deployment type of the instance. NOTE: From version 1.161.0, this attribute supports to be updated. Valid values:

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

The disk size of the instance. When modify this value, it only supports adjust to a greater value.

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

The disk type of the instance. 0: efficient cloud disk , 1: SSD.

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

The max bandwidth of the instance. It will be ignored when deploy_type = 5. When modify this value, it only supports adjust to a greater value.

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

The max value of io of the instance. When modify this value, it only support adjust to a greater value.

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

The ID of the key that is used to encrypt data on standard SSDs in the region of the instance.

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

Name of your Kafka instance. The length should between 3 and 64 characters. If not set, will use instance id as instance name.

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

The paid type of the instance. Support two type, "PrePaid": pre paid type instance, "PostPaid": post paid type instance. Default is PostPaid. When modify this value, it only support adjust from post pay to pre pay.

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

The number of partitions.

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

The ID of security group for this instance. If the security group is empty, system will create a default one.

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

The zones among which you want to deploy the instance.

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

The kafka openSource version for this instance. Only 0.10.2 or 2.2.0 is allowed, default is 0.10.2.

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

The spec type of the instance. Support two type, "normal": normal version instance, "professional": professional version instance. Default is normal. When modify this value, it only support adjust from normal to professional. Note only pre paid type instance support professional specific type.

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

A mapping of tags to assign to the resource.

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

The max num of topic can be creation of the instance. It has been deprecated from version 1.194.0 and using partition_num instead.

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

The VPC ID of the instance.

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

The ID of attaching vswitch to instance.

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

The zone ID of the instance.