Instance

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

Properties

Link copied to clipboard
val config: Output<String>

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>

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>

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>

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

Link copied to clipboard
val eipMax: Output<Int>

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 endPoint: Output<String>

The EndPoint to access the kafka instance.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ioMax: Output<Int>

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>?

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>

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>?

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>?

The number of partitions.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val securityGroup: Output<String>

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>>?

The zones among which you want to deploy the instance.

Link copied to clipboard
val serviceVersion: Output<String>

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>?

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 status: Output<Int>

The status of the instance. Valid values:

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

A mapping of tags to assign to the resource.

Link copied to clipboard
val topicQuota: Output<Int>

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 urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The VPC ID of the instance.

Link copied to clipboard
val vswitchId: Output<String>

The ID of attaching vswitch to instance.

Link copied to clipboard
val zoneId: Output<String>

The zone ID of the instance.