Class 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,
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.AliKafka
Assembly: Pulumi.AliCloud.dll
Syntax
public class Instance : CustomResource
Constructors
View SourceInstance(String, InstanceArgs, CustomResourceOptions)
Create a Instance resource with the given unique name, arguments, and options.
Declaration
public Instance(string name, InstanceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| InstanceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDeployType
The deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.
Declaration
public Output<int> DeployType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
DiskSize
The disk size of the instance. When modify this value, it only support adjust to a greater value.
Declaration
public Output<int> DiskSize { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
DiskType
The disk type of the instance. 0: efficient cloud disk , 1: SSD.
Declaration
public Output<int> DiskType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
EipMax
The max bandwidth of the instance. When modify this value, it only support adjust to a greater value.
Declaration
public Output<int?> EipMax { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
IoMax
The max value of io of the instance. When modify this value, it only support adjust to a greater value.
Declaration
public Output<int> IoMax { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
Name of your Kafka instance. The length should between 3 and 64 characters. If not set, will use instance id as instance name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PaidType
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.
Declaration
public Output<string> PaidType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SpecType
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.
Declaration
public Output<string> SpecType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
TopicQuota
The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.
Declaration
public Output<int> TopicQuota { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
VpcId
The ID of attaching VPC to instance.
Declaration
public Output<string> VpcId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VswitchId
The ID of attaching vswitch to instance.
Declaration
public Output<string> VswitchId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ZoneId
The Zone to launch the kafka instance.
Declaration
public Output<string> ZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, InstanceState, CustomResourceOptions)
Get an existing Instance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Instance Get(string name, Input<string> id, InstanceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| InstanceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Instance |