Instance

Provides an ALIKAFKA instance resource.

NOTE: Available in 1.59.0+

NOTE: ALIKAFKA instance resource only support create post pay instance. 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,ap-southeast-1,ap-south-1,ap-southeast-5]

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,ap-southeast-1]

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var instanceName = config.Get("instanceName") ?? "alikafkaInstanceName";
        var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
        {
            AvailableResourceCreation = "VSwitch",
        }));
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
        {
            CidrBlock = "172.16.0.0/12",
        });
        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.AliKafka.Instance("defaultInstance", new AliCloud.AliKafka.InstanceArgs
        {
            DeployType = 4,
            DiskSize = 500,
            DiskType = 1,
            IoMax = 20,
            TopicQuota = 50,
            VswitchId = defaultSwitch.Id,
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
instance_name = config.get("instanceName")
if instance_name is None:
    instance_name = "alikafkaInstanceName"
default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/12")
default_switch = alicloud.vpc.Switch("defaultSwitch",
    availability_zone=default_zones.zones[0]["id"],
    cidr_block="172.16.0.0/24",
    vpc_id=default_network.id)
default_instance = alicloud.alikafka.Instance("defaultInstance",
    deploy_type="4",
    disk_size="500",
    disk_type="1",
    io_max="20",
    topic_quota="50",
    vswitch_id=default_switch.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const instanceName = config.get("instanceName") || "alikafkaInstanceName";

const defaultZones = pulumi.output(alicloud.getZones({
    availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
    cidrBlock: "172.16.0.0/12",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
    availabilityZone: defaultZones.zones[0].id,
    cidrBlock: "172.16.0.0/24",
    vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.alikafka.Instance("default", {
    deployType: 4,
    diskSize: 500,
    diskType: 1,
    ioMax: 20,
    topicQuota: 50,
    vswitchId: defaultSwitch.id,
});

Create a Instance Resource

def Instance(resource_name, opts=None, deploy_type=None, disk_size=None, disk_type=None, eip_max=None, io_max=None, name=None, paid_type=None, spec_type=None, tags=None, topic_quota=None, vswitch_id=None, __props__=None);
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Instance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Instance resource accepts the following input properties:

DeployType int

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

DiskSize int

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

DiskType int

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

IoMax int

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

TopicQuota int

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

VswitchId string

The ID of attaching vswitch to instance.

EipMax int

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

Name string

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

PaidType 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.

SpecType 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.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

DeployType int

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

DiskSize int

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

DiskType int

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

IoMax int

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

TopicQuota int

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

VswitchId string

The ID of attaching vswitch to instance.

EipMax int

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

Name string

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

PaidType 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.

SpecType 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.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

deployType number

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

diskSize number

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

diskType number

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

ioMax number

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

topicQuota number

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

vswitchId string

The ID of attaching vswitch to instance.

eipMax number

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

name string

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

paidType 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.

specType 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.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

deploy_type float

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

disk_size float

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

disk_type float

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

io_max float

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

topic_quota float

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

vswitch_id str

The ID of attaching vswitch to instance.

eip_max float

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

name str

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

str

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.

spec_type str

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.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
VpcId string

The ID of attaching VPC to instance.

ZoneId string

The Zone to launch the kafka instance.

Id string
The provider-assigned unique ID for this managed resource.
VpcId string

The ID of attaching VPC to instance.

ZoneId string

The Zone to launch the kafka instance.

id string
The provider-assigned unique ID for this managed resource.
vpcId string

The ID of attaching VPC to instance.

zoneId string

The Zone to launch the kafka instance.

id str
The provider-assigned unique ID for this managed resource.
vpc_id str

The ID of attaching VPC to instance.

zone_id str

The Zone to launch the kafka instance.

Look up an Existing Instance Resource

Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
static get(resource_name, id, opts=None, deploy_type=None, disk_size=None, disk_type=None, eip_max=None, io_max=None, name=None, paid_type=None, spec_type=None, tags=None, topic_quota=None, vpc_id=None, vswitch_id=None, zone_id=None, __props__=None);
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

DeployType int

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

DiskSize int

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

DiskType int

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

EipMax int

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

IoMax int

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

Name string

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

PaidType 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.

SpecType 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.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

TopicQuota int

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

VpcId string

The ID of attaching VPC to instance.

VswitchId string

The ID of attaching vswitch to instance.

ZoneId string

The Zone to launch the kafka instance.

DeployType int

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

DiskSize int

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

DiskType int

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

EipMax int

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

IoMax int

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

Name string

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

PaidType 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.

SpecType 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.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

TopicQuota int

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

VpcId string

The ID of attaching VPC to instance.

VswitchId string

The ID of attaching vswitch to instance.

ZoneId string

The Zone to launch the kafka instance.

deployType number

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

diskSize number

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

diskType number

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

eipMax number

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

ioMax number

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

name string

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

paidType 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.

specType 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.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

topicQuota number

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

vpcId string

The ID of attaching VPC to instance.

vswitchId string

The ID of attaching vswitch to instance.

zoneId string

The Zone to launch the kafka instance.

deploy_type float

The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.

disk_size float

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

disk_type float

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

eip_max float

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

io_max float

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

name str

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

paid_type str

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.

spec_type str

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.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

topic_quota float

The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.

vpc_id str

The ID of attaching VPC to instance.

vswitch_id str

The ID of attaching vswitch to instance.

zone_id str

The Zone to launch the kafka instance.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.