alikafka

package
v3.54.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerGroup

type ConsumerGroup struct {
	pulumi.CustomResourceState

	// ID of the consumer group. The length cannot exceed 64 characters.
	ConsumerId pulumi.StringOutput `pulumi:"consumerId"`
	// The description of the resource.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
}

Provides an ALIKAFKA consumer group resource, see [What is alikafka consumer group](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/api-alikafka-2019-09-16-createconsumergroup).

> **NOTE:** Available since v1.56.0.

> **NOTE:** Only the following regions support create alikafka consumer group. [`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-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
			Name:          pulumi.String(fmt.Sprintf("%v-%v", name, defaultInteger.Result)),
			PartitionNum:  pulumi.Int(50),
			DiskType:      pulumi.Int(1),
			DiskSize:      pulumi.Int(500),
			DeployType:    pulumi.Int(5),
			IoMax:         pulumi.Int(20),
			VswitchId:     defaultSwitch.ID(),
			SecurityGroup: defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewConsumerGroup(ctx, "default", &alikafka.ConsumerGroupArgs{
			ConsumerId: pulumi.String(name),
			InstanceId: defaultInstance.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh $ pulumi import alicloud:alikafka/consumerGroup:ConsumerGroup group alikafka_post-cn-123455abc:consumerId ```

func GetConsumerGroup

func GetConsumerGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConsumerGroupState, opts ...pulumi.ResourceOption) (*ConsumerGroup, error)

GetConsumerGroup gets an existing ConsumerGroup resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewConsumerGroup

func NewConsumerGroup(ctx *pulumi.Context,
	name string, args *ConsumerGroupArgs, opts ...pulumi.ResourceOption) (*ConsumerGroup, error)

NewConsumerGroup registers a new resource with the given unique name, arguments, and options.

func (*ConsumerGroup) ElementType

func (*ConsumerGroup) ElementType() reflect.Type

func (*ConsumerGroup) ToConsumerGroupOutput

func (i *ConsumerGroup) ToConsumerGroupOutput() ConsumerGroupOutput

func (*ConsumerGroup) ToConsumerGroupOutputWithContext

func (i *ConsumerGroup) ToConsumerGroupOutputWithContext(ctx context.Context) ConsumerGroupOutput

type ConsumerGroupArgs

type ConsumerGroupArgs struct {
	// ID of the consumer group. The length cannot exceed 64 characters.
	ConsumerId pulumi.StringInput
	// The description of the resource.
	Description pulumi.StringPtrInput
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

The set of arguments for constructing a ConsumerGroup resource.

func (ConsumerGroupArgs) ElementType

func (ConsumerGroupArgs) ElementType() reflect.Type

type ConsumerGroupArray

type ConsumerGroupArray []ConsumerGroupInput

func (ConsumerGroupArray) ElementType

func (ConsumerGroupArray) ElementType() reflect.Type

func (ConsumerGroupArray) ToConsumerGroupArrayOutput

func (i ConsumerGroupArray) ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput

func (ConsumerGroupArray) ToConsumerGroupArrayOutputWithContext

func (i ConsumerGroupArray) ToConsumerGroupArrayOutputWithContext(ctx context.Context) ConsumerGroupArrayOutput

type ConsumerGroupArrayInput

type ConsumerGroupArrayInput interface {
	pulumi.Input

	ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput
	ToConsumerGroupArrayOutputWithContext(context.Context) ConsumerGroupArrayOutput
}

ConsumerGroupArrayInput is an input type that accepts ConsumerGroupArray and ConsumerGroupArrayOutput values. You can construct a concrete instance of `ConsumerGroupArrayInput` via:

ConsumerGroupArray{ ConsumerGroupArgs{...} }

type ConsumerGroupArrayOutput

type ConsumerGroupArrayOutput struct{ *pulumi.OutputState }

func (ConsumerGroupArrayOutput) ElementType

func (ConsumerGroupArrayOutput) ElementType() reflect.Type

func (ConsumerGroupArrayOutput) Index

func (ConsumerGroupArrayOutput) ToConsumerGroupArrayOutput

func (o ConsumerGroupArrayOutput) ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput

func (ConsumerGroupArrayOutput) ToConsumerGroupArrayOutputWithContext

func (o ConsumerGroupArrayOutput) ToConsumerGroupArrayOutputWithContext(ctx context.Context) ConsumerGroupArrayOutput

type ConsumerGroupInput

type ConsumerGroupInput interface {
	pulumi.Input

	ToConsumerGroupOutput() ConsumerGroupOutput
	ToConsumerGroupOutputWithContext(ctx context.Context) ConsumerGroupOutput
}

type ConsumerGroupMap

type ConsumerGroupMap map[string]ConsumerGroupInput

func (ConsumerGroupMap) ElementType

func (ConsumerGroupMap) ElementType() reflect.Type

func (ConsumerGroupMap) ToConsumerGroupMapOutput

func (i ConsumerGroupMap) ToConsumerGroupMapOutput() ConsumerGroupMapOutput

func (ConsumerGroupMap) ToConsumerGroupMapOutputWithContext

func (i ConsumerGroupMap) ToConsumerGroupMapOutputWithContext(ctx context.Context) ConsumerGroupMapOutput

type ConsumerGroupMapInput

type ConsumerGroupMapInput interface {
	pulumi.Input

	ToConsumerGroupMapOutput() ConsumerGroupMapOutput
	ToConsumerGroupMapOutputWithContext(context.Context) ConsumerGroupMapOutput
}

ConsumerGroupMapInput is an input type that accepts ConsumerGroupMap and ConsumerGroupMapOutput values. You can construct a concrete instance of `ConsumerGroupMapInput` via:

ConsumerGroupMap{ "key": ConsumerGroupArgs{...} }

type ConsumerGroupMapOutput

type ConsumerGroupMapOutput struct{ *pulumi.OutputState }

func (ConsumerGroupMapOutput) ElementType

func (ConsumerGroupMapOutput) ElementType() reflect.Type

func (ConsumerGroupMapOutput) MapIndex

func (ConsumerGroupMapOutput) ToConsumerGroupMapOutput

func (o ConsumerGroupMapOutput) ToConsumerGroupMapOutput() ConsumerGroupMapOutput

func (ConsumerGroupMapOutput) ToConsumerGroupMapOutputWithContext

func (o ConsumerGroupMapOutput) ToConsumerGroupMapOutputWithContext(ctx context.Context) ConsumerGroupMapOutput

type ConsumerGroupOutput

type ConsumerGroupOutput struct{ *pulumi.OutputState }

func (ConsumerGroupOutput) ConsumerId added in v3.27.0

func (o ConsumerGroupOutput) ConsumerId() pulumi.StringOutput

ID of the consumer group. The length cannot exceed 64 characters.

func (ConsumerGroupOutput) Description added in v3.27.0

func (o ConsumerGroupOutput) Description() pulumi.StringPtrOutput

The description of the resource.

func (ConsumerGroupOutput) ElementType

func (ConsumerGroupOutput) ElementType() reflect.Type

func (ConsumerGroupOutput) InstanceId added in v3.27.0

func (o ConsumerGroupOutput) InstanceId() pulumi.StringOutput

ID of the ALIKAFKA Instance that owns the groups.

func (ConsumerGroupOutput) Tags added in v3.27.0

A mapping of tags to assign to the resource.

func (ConsumerGroupOutput) ToConsumerGroupOutput

func (o ConsumerGroupOutput) ToConsumerGroupOutput() ConsumerGroupOutput

func (ConsumerGroupOutput) ToConsumerGroupOutputWithContext

func (o ConsumerGroupOutput) ToConsumerGroupOutputWithContext(ctx context.Context) ConsumerGroupOutput

type ConsumerGroupState

type ConsumerGroupState struct {
	// ID of the consumer group. The length cannot exceed 64 characters.
	ConsumerId pulumi.StringPtrInput
	// The description of the resource.
	Description pulumi.StringPtrInput
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
}

func (ConsumerGroupState) ElementType

func (ConsumerGroupState) ElementType() reflect.Type

type Instance

type Instance struct {
	pulumi.CustomResourceState

	// 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.
	Config pulumi.StringOutput `pulumi:"config"`
	// The deployment type of the instance. **NOTE:** From version 1.161.0, this attribute supports to be updated. Valid values:
	// - 4: eip/vpc instance
	// - 5: vpc instance.
	DeployType pulumi.IntOutput `pulumi:"deployType"`
	// The disk size of the instance. When modify this value, it only supports adjust to a greater value.
	DiskSize pulumi.IntOutput `pulumi:"diskSize"`
	// The disk type of the instance. 0: efficient cloud disk , 1: SSD.
	DiskType pulumi.IntOutput `pulumi:"diskType"`
	// The max bandwidth of the instance. It will be ignored when `deployType = 5`. When modify this value, it only supports adjust to a greater value.
	EipMax pulumi.IntOutput `pulumi:"eipMax"`
	// The EndPoint to access the kafka instance.
	EndPoint pulumi.StringOutput `pulumi:"endPoint"`
	// (Available since v1.214.1) The number of available groups.
	GroupLeft pulumi.IntOutput `pulumi:"groupLeft"`
	// (Available since v1.214.1) The number of used groups.
	GroupUsed pulumi.IntOutput `pulumi:"groupUsed"`
	// The max value of io of the instance. When modify this value, it only support adjust to a greater value.
	IoMax pulumi.IntOutput `pulumi:"ioMax"`
	// The traffic specification of the instance. We recommend that you configure this parameter.
	// - You should specify one of the `ioMax` and `ioMaxSpec` parameters, and `ioMaxSpec` is recommended.
	// - For more information about the valid values, see [Billing](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/billing-overview).
	IoMaxSpec pulumi.StringOutput `pulumi:"ioMaxSpec"`
	// (Available since v1.214.1) The method that you use to purchase partitions.
	IsPartitionBuy pulumi.IntOutput `pulumi:"isPartitionBuy"`
	// The ID of the key that is used to encrypt data on standard SSDs in the region of the instance.
	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
	// Name of your Kafka instance. The length should between 3 and 64 characters. If not set, will use instance id as instance name.
	Name pulumi.StringOutput `pulumi:"name"`
	// 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.
	PaidType pulumi.StringPtrOutput `pulumi:"paidType"`
	// (Available since v1.214.1) The number of available partitions.
	PartitionLeft pulumi.IntOutput `pulumi:"partitionLeft"`
	// The number of partitions.
	PartitionNum pulumi.IntPtrOutput `pulumi:"partitionNum"`
	// (Available since v1.214.1) The number of used partitions.
	PartitionUsed pulumi.IntOutput `pulumi:"partitionUsed"`
	// The ID of security group for this instance. If the security group is empty, system will create a default one.
	SecurityGroup pulumi.StringOutput `pulumi:"securityGroup"`
	// The zones among which you want to deploy the instance.
	//
	// > **NOTE:** Arguments io_max, disk_size, topic_quota, eipMax should follow the following constraints.
	//
	// | ioMax | disk_size(min-max:lag) | topic_quota(min-max:lag) | eip_max(min-max:lag) |
	// |------|-------------|:----:|:-----:|
	// |20          |  500-6100:100   |   50-450:1  |    1-160:1  |
	// |30          |  800-6100:100   |   50-450:1  |    1-240:1  |
	// |60          |  1400-6100:100  |   80-450:1  |    1-500:1  |
	// |90          |  2100-6100:100  |   100-450:1 |    1-500:1  |
	// |120         |  2700-6100:100  |   150-450:1 |    1-500:1  |
	SelectedZones pulumi.StringArrayOutput `pulumi:"selectedZones"`
	// The kafka openSource version for this instance. Only 0.10.2 or 2.2.0 is allowed, default is 0.10.2.
	ServiceVersion pulumi.StringOutput `pulumi:"serviceVersion"`
	// 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.
	SpecType pulumi.StringPtrOutput `pulumi:"specType"`
	// The status of the instance.
	Status pulumi.IntOutput `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// (Available since v1.214.1) The number of available topics.
	TopicLeft pulumi.IntOutput `pulumi:"topicLeft"`
	// (Available since v1.214.1) The number of purchased topics.
	TopicNumOfBuy pulumi.IntOutput `pulumi:"topicNumOfBuy"`
	// The max num of topic can be creation of the instance.
	// It has been deprecated since version 1.194.0 and using `partitionNum` instead.
	// Currently, its value only can be set to 50 when creating it, and finally depends on `partitionNum` value: <`topicQuota`> = 1000 + <`partitionNum`>.
	// Therefore, you can update it by updating the `partitionNum`, and it is the only updating path.
	//
	// Deprecated: Attribute `topicQuota` has been deprecated since 1.194.0 and it will be removed in the next future. Using new attribute `partitionNum` instead.
	TopicQuota pulumi.IntOutput `pulumi:"topicQuota"`
	// (Available since v1.214.1) The number of used topics.
	TopicUsed pulumi.IntOutput `pulumi:"topicUsed"`
	// The VPC ID of the instance.
	VpcId pulumi.StringOutput `pulumi:"vpcId"`
	// The ID of attaching vswitch to instance.
	VswitchId pulumi.StringOutput `pulumi:"vswitchId"`
	// The zone ID of the instance. The value can be in zone x or region id-x format. **NOTE**: When the available zone is insufficient, another availability zone may be deployed.
	ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}

## Import

AliKafka instance can be imported using the id, e.g.

```sh $ pulumi import alicloud:alikafka/instance:Instance instance <id> ```

func GetInstance

func GetInstance(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error)

GetInstance gets an existing Instance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewInstance

func NewInstance(ctx *pulumi.Context,
	name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error)

NewInstance registers a new resource with the given unique name, arguments, and options.

func (*Instance) ElementType

func (*Instance) ElementType() reflect.Type

func (*Instance) ToInstanceOutput

func (i *Instance) ToInstanceOutput() InstanceOutput

func (*Instance) ToInstanceOutputWithContext

func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput

type InstanceAllowedIpAttachment added in v3.20.0

type InstanceAllowedIpAttachment struct {
	pulumi.CustomResourceState

	// The IP address whitelist. It can be a CIDR block.
	AllowedIp pulumi.StringOutput `pulumi:"allowedIp"`
	// The type of the whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.
	AllowedType pulumi.StringOutput `pulumi:"allowedType"`
	// The ID of the instance.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// The Port range. Valid Value: `9092/9092`, `9093/9093`, `9094/9094`, `9095/9095`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`. From version 1.219.0, `portRange` can be set to `9094/9094`, `9095/9095`.
	// - `9092/9092`: The port range for access from virtual private clouds (VPCs) by using the default endpoint.
	// - `9093/9093`: The port range for access from the Internet.
	// - `9094/9094`: The port range for access from VPCs by using the Simple Authentication and Security Layer (SASL) endpoint.
	// - `9095/9095`: The port range for access from VPCs by using the Secure Sockets Layer (SSL) endpoint.
	PortRange pulumi.StringOutput `pulumi:"portRange"`
}

Provides a AliKafka Instance Allowed Ip Attachment resource.

For information about AliKafka Instance Allowed Ip Attachment and how to use it, see [What is Instance Allowed Ip Attachment](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/api-alikafka-2019-09-16-updateallowedip).

> **NOTE:** Available since v1.163.0.

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.4.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String(name),
			CidrBlock:   pulumi.String("10.4.0.0/24"),
			VpcId:       defaultNetwork.ID(),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
			Name:          pulumi.String(fmt.Sprintf("%v-%v", name, defaultInteger.Result)),
			PartitionNum:  pulumi.Int(50),
			DiskType:      pulumi.Int(1),
			DiskSize:      pulumi.Int(500),
			DeployType:    pulumi.Int(5),
			IoMax:         pulumi.Int(20),
			VswitchId:     defaultSwitch.ID(),
			SecurityGroup: defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewInstanceAllowedIpAttachment(ctx, "default", &alikafka.InstanceAllowedIpAttachmentArgs{
			InstanceId:  defaultInstance.ID(),
			AllowedType: pulumi.String("vpc"),
			PortRange:   pulumi.String("9092/9092"),
			AllowedIp:   pulumi.String("114.237.9.78/32"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

AliKafka Instance Allowed Ip Attachment can be imported using the id, e.g.

```sh $ pulumi import alicloud:alikafka/instanceAllowedIpAttachment:InstanceAllowedIpAttachment example <instance_id>:<allowed_type>:<port_range>:<allowed_ip> ```

func GetInstanceAllowedIpAttachment added in v3.20.0

func GetInstanceAllowedIpAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *InstanceAllowedIpAttachmentState, opts ...pulumi.ResourceOption) (*InstanceAllowedIpAttachment, error)

GetInstanceAllowedIpAttachment gets an existing InstanceAllowedIpAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewInstanceAllowedIpAttachment added in v3.20.0

func NewInstanceAllowedIpAttachment(ctx *pulumi.Context,
	name string, args *InstanceAllowedIpAttachmentArgs, opts ...pulumi.ResourceOption) (*InstanceAllowedIpAttachment, error)

NewInstanceAllowedIpAttachment registers a new resource with the given unique name, arguments, and options.

func (*InstanceAllowedIpAttachment) ElementType added in v3.20.0

func (*InstanceAllowedIpAttachment) ElementType() reflect.Type

func (*InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutput added in v3.20.0

func (i *InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutput() InstanceAllowedIpAttachmentOutput

func (*InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutputWithContext added in v3.20.0

func (i *InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentOutput

type InstanceAllowedIpAttachmentArgs added in v3.20.0

type InstanceAllowedIpAttachmentArgs struct {
	// The IP address whitelist. It can be a CIDR block.
	AllowedIp pulumi.StringInput
	// The type of the whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.
	AllowedType pulumi.StringInput
	// The ID of the instance.
	InstanceId pulumi.StringInput
	// The Port range. Valid Value: `9092/9092`, `9093/9093`, `9094/9094`, `9095/9095`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`. From version 1.219.0, `portRange` can be set to `9094/9094`, `9095/9095`.
	// - `9092/9092`: The port range for access from virtual private clouds (VPCs) by using the default endpoint.
	// - `9093/9093`: The port range for access from the Internet.
	// - `9094/9094`: The port range for access from VPCs by using the Simple Authentication and Security Layer (SASL) endpoint.
	// - `9095/9095`: The port range for access from VPCs by using the Secure Sockets Layer (SSL) endpoint.
	PortRange pulumi.StringInput
}

The set of arguments for constructing a InstanceAllowedIpAttachment resource.

func (InstanceAllowedIpAttachmentArgs) ElementType added in v3.20.0

type InstanceAllowedIpAttachmentArray added in v3.20.0

type InstanceAllowedIpAttachmentArray []InstanceAllowedIpAttachmentInput

func (InstanceAllowedIpAttachmentArray) ElementType added in v3.20.0

func (InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutput added in v3.20.0

func (i InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutput() InstanceAllowedIpAttachmentArrayOutput

func (InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutputWithContext added in v3.20.0

func (i InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentArrayOutput

type InstanceAllowedIpAttachmentArrayInput added in v3.20.0

type InstanceAllowedIpAttachmentArrayInput interface {
	pulumi.Input

	ToInstanceAllowedIpAttachmentArrayOutput() InstanceAllowedIpAttachmentArrayOutput
	ToInstanceAllowedIpAttachmentArrayOutputWithContext(context.Context) InstanceAllowedIpAttachmentArrayOutput
}

InstanceAllowedIpAttachmentArrayInput is an input type that accepts InstanceAllowedIpAttachmentArray and InstanceAllowedIpAttachmentArrayOutput values. You can construct a concrete instance of `InstanceAllowedIpAttachmentArrayInput` via:

InstanceAllowedIpAttachmentArray{ InstanceAllowedIpAttachmentArgs{...} }

type InstanceAllowedIpAttachmentArrayOutput added in v3.20.0

type InstanceAllowedIpAttachmentArrayOutput struct{ *pulumi.OutputState }

func (InstanceAllowedIpAttachmentArrayOutput) ElementType added in v3.20.0

func (InstanceAllowedIpAttachmentArrayOutput) Index added in v3.20.0

func (InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutput added in v3.20.0

func (o InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutput() InstanceAllowedIpAttachmentArrayOutput

func (InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutputWithContext added in v3.20.0

func (o InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentArrayOutput

type InstanceAllowedIpAttachmentInput added in v3.20.0

type InstanceAllowedIpAttachmentInput interface {
	pulumi.Input

	ToInstanceAllowedIpAttachmentOutput() InstanceAllowedIpAttachmentOutput
	ToInstanceAllowedIpAttachmentOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentOutput
}

type InstanceAllowedIpAttachmentMap added in v3.20.0

type InstanceAllowedIpAttachmentMap map[string]InstanceAllowedIpAttachmentInput

func (InstanceAllowedIpAttachmentMap) ElementType added in v3.20.0

func (InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutput added in v3.20.0

func (i InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutput() InstanceAllowedIpAttachmentMapOutput

func (InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutputWithContext added in v3.20.0

func (i InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentMapOutput

type InstanceAllowedIpAttachmentMapInput added in v3.20.0

type InstanceAllowedIpAttachmentMapInput interface {
	pulumi.Input

	ToInstanceAllowedIpAttachmentMapOutput() InstanceAllowedIpAttachmentMapOutput
	ToInstanceAllowedIpAttachmentMapOutputWithContext(context.Context) InstanceAllowedIpAttachmentMapOutput
}

InstanceAllowedIpAttachmentMapInput is an input type that accepts InstanceAllowedIpAttachmentMap and InstanceAllowedIpAttachmentMapOutput values. You can construct a concrete instance of `InstanceAllowedIpAttachmentMapInput` via:

InstanceAllowedIpAttachmentMap{ "key": InstanceAllowedIpAttachmentArgs{...} }

type InstanceAllowedIpAttachmentMapOutput added in v3.20.0

type InstanceAllowedIpAttachmentMapOutput struct{ *pulumi.OutputState }

func (InstanceAllowedIpAttachmentMapOutput) ElementType added in v3.20.0

func (InstanceAllowedIpAttachmentMapOutput) MapIndex added in v3.20.0

func (InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutput added in v3.20.0

func (o InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutput() InstanceAllowedIpAttachmentMapOutput

func (InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutputWithContext added in v3.20.0

func (o InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentMapOutput

type InstanceAllowedIpAttachmentOutput added in v3.20.0

type InstanceAllowedIpAttachmentOutput struct{ *pulumi.OutputState }

func (InstanceAllowedIpAttachmentOutput) AllowedIp added in v3.27.0

The IP address whitelist. It can be a CIDR block.

func (InstanceAllowedIpAttachmentOutput) AllowedType added in v3.27.0

The type of the whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.

func (InstanceAllowedIpAttachmentOutput) ElementType added in v3.20.0

func (InstanceAllowedIpAttachmentOutput) InstanceId added in v3.27.0

The ID of the instance.

func (InstanceAllowedIpAttachmentOutput) PortRange added in v3.27.0

The Port range. Valid Value: `9092/9092`, `9093/9093`, `9094/9094`, `9095/9095`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`. From version 1.219.0, `portRange` can be set to `9094/9094`, `9095/9095`. - `9092/9092`: The port range for access from virtual private clouds (VPCs) by using the default endpoint. - `9093/9093`: The port range for access from the Internet. - `9094/9094`: The port range for access from VPCs by using the Simple Authentication and Security Layer (SASL) endpoint. - `9095/9095`: The port range for access from VPCs by using the Secure Sockets Layer (SSL) endpoint.

func (InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutput added in v3.20.0

func (o InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutput() InstanceAllowedIpAttachmentOutput

func (InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutputWithContext added in v3.20.0

func (o InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutputWithContext(ctx context.Context) InstanceAllowedIpAttachmentOutput

type InstanceAllowedIpAttachmentState added in v3.20.0

type InstanceAllowedIpAttachmentState struct {
	// The IP address whitelist. It can be a CIDR block.
	AllowedIp pulumi.StringPtrInput
	// The type of the whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.
	AllowedType pulumi.StringPtrInput
	// The ID of the instance.
	InstanceId pulumi.StringPtrInput
	// The Port range. Valid Value: `9092/9092`, `9093/9093`, `9094/9094`, `9095/9095`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`. From version 1.219.0, `portRange` can be set to `9094/9094`, `9095/9095`.
	// - `9092/9092`: The port range for access from virtual private clouds (VPCs) by using the default endpoint.
	// - `9093/9093`: The port range for access from the Internet.
	// - `9094/9094`: The port range for access from VPCs by using the Simple Authentication and Security Layer (SASL) endpoint.
	// - `9095/9095`: The port range for access from VPCs by using the Secure Sockets Layer (SSL) endpoint.
	PortRange pulumi.StringPtrInput
}

func (InstanceAllowedIpAttachmentState) ElementType added in v3.20.0

type InstanceArgs

type InstanceArgs struct {
	// 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.
	Config pulumi.StringPtrInput
	// The deployment type of the instance. **NOTE:** From version 1.161.0, this attribute supports to be updated. Valid values:
	// - 4: eip/vpc instance
	// - 5: vpc instance.
	DeployType pulumi.IntInput
	// The disk size of the instance. When modify this value, it only supports adjust to a greater value.
	DiskSize pulumi.IntInput
	// The disk type of the instance. 0: efficient cloud disk , 1: SSD.
	DiskType pulumi.IntInput
	// The max bandwidth of the instance. It will be ignored when `deployType = 5`. When modify this value, it only supports adjust to a greater value.
	EipMax pulumi.IntPtrInput
	// The max value of io of the instance. When modify this value, it only support adjust to a greater value.
	IoMax pulumi.IntPtrInput
	// The traffic specification of the instance. We recommend that you configure this parameter.
	// - You should specify one of the `ioMax` and `ioMaxSpec` parameters, and `ioMaxSpec` is recommended.
	// - For more information about the valid values, see [Billing](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/billing-overview).
	IoMaxSpec pulumi.StringPtrInput
	// The ID of the key that is used to encrypt data on standard SSDs in the region of the instance.
	KmsKeyId pulumi.StringPtrInput
	// Name of your Kafka instance. The length should between 3 and 64 characters. If not set, will use instance id as instance name.
	Name pulumi.StringPtrInput
	// 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.
	PaidType pulumi.StringPtrInput
	// The number of partitions.
	PartitionNum pulumi.IntPtrInput
	// The ID of security group for this instance. If the security group is empty, system will create a default one.
	SecurityGroup pulumi.StringPtrInput
	// The zones among which you want to deploy the instance.
	//
	// > **NOTE:** Arguments io_max, disk_size, topic_quota, eipMax should follow the following constraints.
	//
	// | ioMax | disk_size(min-max:lag) | topic_quota(min-max:lag) | eip_max(min-max:lag) |
	// |------|-------------|:----:|:-----:|
	// |20          |  500-6100:100   |   50-450:1  |    1-160:1  |
	// |30          |  800-6100:100   |   50-450:1  |    1-240:1  |
	// |60          |  1400-6100:100  |   80-450:1  |    1-500:1  |
	// |90          |  2100-6100:100  |   100-450:1 |    1-500:1  |
	// |120         |  2700-6100:100  |   150-450:1 |    1-500:1  |
	SelectedZones pulumi.StringArrayInput
	// The kafka openSource version for this instance. Only 0.10.2 or 2.2.0 is allowed, default is 0.10.2.
	ServiceVersion pulumi.StringPtrInput
	// 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.
	SpecType pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// The max num of topic can be creation of the instance.
	// It has been deprecated since version 1.194.0 and using `partitionNum` instead.
	// Currently, its value only can be set to 50 when creating it, and finally depends on `partitionNum` value: <`topicQuota`> = 1000 + <`partitionNum`>.
	// Therefore, you can update it by updating the `partitionNum`, and it is the only updating path.
	//
	// Deprecated: Attribute `topicQuota` has been deprecated since 1.194.0 and it will be removed in the next future. Using new attribute `partitionNum` instead.
	TopicQuota pulumi.IntPtrInput
	// The VPC ID of the instance.
	VpcId pulumi.StringPtrInput
	// The ID of attaching vswitch to instance.
	VswitchId pulumi.StringInput
	// The zone ID of the instance. The value can be in zone x or region id-x format. **NOTE**: When the available zone is insufficient, another availability zone may be deployed.
	ZoneId pulumi.StringPtrInput
}

The set of arguments for constructing a Instance resource.

func (InstanceArgs) ElementType

func (InstanceArgs) ElementType() reflect.Type

type InstanceArray

type InstanceArray []InstanceInput

func (InstanceArray) ElementType

func (InstanceArray) ElementType() reflect.Type

func (InstanceArray) ToInstanceArrayOutput

func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArray) ToInstanceArrayOutputWithContext

func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput

type InstanceArrayInput

type InstanceArrayInput interface {
	pulumi.Input

	ToInstanceArrayOutput() InstanceArrayOutput
	ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
}

InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values. You can construct a concrete instance of `InstanceArrayInput` via:

InstanceArray{ InstanceArgs{...} }

type InstanceArrayOutput

type InstanceArrayOutput struct{ *pulumi.OutputState }

func (InstanceArrayOutput) ElementType

func (InstanceArrayOutput) ElementType() reflect.Type

func (InstanceArrayOutput) Index

func (InstanceArrayOutput) ToInstanceArrayOutput

func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArrayOutput) ToInstanceArrayOutputWithContext

func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput

type InstanceInput

type InstanceInput interface {
	pulumi.Input

	ToInstanceOutput() InstanceOutput
	ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
}

type InstanceMap

type InstanceMap map[string]InstanceInput

func (InstanceMap) ElementType

func (InstanceMap) ElementType() reflect.Type

func (InstanceMap) ToInstanceMapOutput

func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMap) ToInstanceMapOutputWithContext

func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput

type InstanceMapInput

type InstanceMapInput interface {
	pulumi.Input

	ToInstanceMapOutput() InstanceMapOutput
	ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
}

InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values. You can construct a concrete instance of `InstanceMapInput` via:

InstanceMap{ "key": InstanceArgs{...} }

type InstanceMapOutput

type InstanceMapOutput struct{ *pulumi.OutputState }

func (InstanceMapOutput) ElementType

func (InstanceMapOutput) ElementType() reflect.Type

func (InstanceMapOutput) MapIndex

func (InstanceMapOutput) ToInstanceMapOutput

func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMapOutput) ToInstanceMapOutputWithContext

func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput

type InstanceOutput

type InstanceOutput struct{ *pulumi.OutputState }

func (InstanceOutput) Config added in v3.27.0

func (o InstanceOutput) Config() pulumi.StringOutput

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.

func (InstanceOutput) DeployType added in v3.27.0

func (o InstanceOutput) DeployType() pulumi.IntOutput

The deployment type of the instance. **NOTE:** From version 1.161.0, this attribute supports to be updated. Valid values: - 4: eip/vpc instance - 5: vpc instance.

func (InstanceOutput) DiskSize added in v3.27.0

func (o InstanceOutput) DiskSize() pulumi.IntOutput

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

func (InstanceOutput) DiskType added in v3.27.0

func (o InstanceOutput) DiskType() pulumi.IntOutput

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

func (InstanceOutput) EipMax added in v3.27.0

func (o InstanceOutput) EipMax() pulumi.IntOutput

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

func (InstanceOutput) ElementType

func (InstanceOutput) ElementType() reflect.Type

func (InstanceOutput) EndPoint added in v3.27.0

func (o InstanceOutput) EndPoint() pulumi.StringOutput

The EndPoint to access the kafka instance.

func (InstanceOutput) GroupLeft added in v3.46.1

func (o InstanceOutput) GroupLeft() pulumi.IntOutput

(Available since v1.214.1) The number of available groups.

func (InstanceOutput) GroupUsed added in v3.46.1

func (o InstanceOutput) GroupUsed() pulumi.IntOutput

(Available since v1.214.1) The number of used groups.

func (InstanceOutput) IoMax added in v3.27.0

func (o InstanceOutput) IoMax() pulumi.IntOutput

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

func (InstanceOutput) IoMaxSpec added in v3.34.0

func (o InstanceOutput) IoMaxSpec() pulumi.StringOutput

The traffic specification of the instance. We recommend that you configure this parameter. - You should specify one of the `ioMax` and `ioMaxSpec` parameters, and `ioMaxSpec` is recommended. - For more information about the valid values, see [Billing](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/billing-overview).

func (InstanceOutput) IsPartitionBuy added in v3.46.1

func (o InstanceOutput) IsPartitionBuy() pulumi.IntOutput

(Available since v1.214.1) The method that you use to purchase partitions.

func (InstanceOutput) KmsKeyId added in v3.28.0

func (o InstanceOutput) KmsKeyId() pulumi.StringPtrOutput

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

func (InstanceOutput) Name added in v3.27.0

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

func (InstanceOutput) PaidType added in v3.27.0

func (o InstanceOutput) PaidType() pulumi.StringPtrOutput

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.

func (InstanceOutput) PartitionLeft added in v3.46.1

func (o InstanceOutput) PartitionLeft() pulumi.IntOutput

(Available since v1.214.1) The number of available partitions.

func (InstanceOutput) PartitionNum added in v3.29.0

func (o InstanceOutput) PartitionNum() pulumi.IntPtrOutput

The number of partitions.

func (InstanceOutput) PartitionUsed added in v3.46.1

func (o InstanceOutput) PartitionUsed() pulumi.IntOutput

(Available since v1.214.1) The number of used partitions.

func (InstanceOutput) SecurityGroup added in v3.27.0

func (o InstanceOutput) SecurityGroup() pulumi.StringOutput

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

func (InstanceOutput) SelectedZones added in v3.29.0

func (o InstanceOutput) SelectedZones() pulumi.StringArrayOutput

The zones among which you want to deploy the instance.

> **NOTE:** Arguments io_max, disk_size, topic_quota, eipMax should follow the following constraints.

| ioMax | disk_size(min-max:lag) | topic_quota(min-max:lag) | eip_max(min-max:lag) | |------|-------------|:----:|:-----:| |20 | 500-6100:100 | 50-450:1 | 1-160:1 | |30 | 800-6100:100 | 50-450:1 | 1-240:1 | |60 | 1400-6100:100 | 80-450:1 | 1-500:1 | |90 | 2100-6100:100 | 100-450:1 | 1-500:1 | |120 | 2700-6100:100 | 150-450:1 | 1-500:1 |

func (InstanceOutput) ServiceVersion added in v3.27.0

func (o InstanceOutput) ServiceVersion() pulumi.StringOutput

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

func (InstanceOutput) SpecType added in v3.27.0

func (o InstanceOutput) SpecType() pulumi.StringPtrOutput

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.

func (InstanceOutput) Status added in v3.28.0

func (o InstanceOutput) Status() pulumi.IntOutput

The status of the instance.

func (InstanceOutput) Tags added in v3.27.0

func (o InstanceOutput) Tags() pulumi.MapOutput

A mapping of tags to assign to the resource.

func (InstanceOutput) ToInstanceOutput

func (o InstanceOutput) ToInstanceOutput() InstanceOutput

func (InstanceOutput) ToInstanceOutputWithContext

func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput

func (InstanceOutput) TopicLeft added in v3.46.1

func (o InstanceOutput) TopicLeft() pulumi.IntOutput

(Available since v1.214.1) The number of available topics.

func (InstanceOutput) TopicNumOfBuy added in v3.46.1

func (o InstanceOutput) TopicNumOfBuy() pulumi.IntOutput

(Available since v1.214.1) The number of purchased topics.

func (InstanceOutput) TopicQuota deprecated added in v3.27.0

func (o InstanceOutput) TopicQuota() pulumi.IntOutput

The max num of topic can be creation of the instance. It has been deprecated since version 1.194.0 and using `partitionNum` instead. Currently, its value only can be set to 50 when creating it, and finally depends on `partitionNum` value: <`topicQuota`> = 1000 + <`partitionNum`>. Therefore, you can update it by updating the `partitionNum`, and it is the only updating path.

Deprecated: Attribute `topicQuota` has been deprecated since 1.194.0 and it will be removed in the next future. Using new attribute `partitionNum` instead.

func (InstanceOutput) TopicUsed added in v3.46.1

func (o InstanceOutput) TopicUsed() pulumi.IntOutput

(Available since v1.214.1) The number of used topics.

func (InstanceOutput) VpcId added in v3.27.0

The VPC ID of the instance.

func (InstanceOutput) VswitchId added in v3.27.0

func (o InstanceOutput) VswitchId() pulumi.StringOutput

The ID of attaching vswitch to instance.

func (InstanceOutput) ZoneId added in v3.27.0

func (o InstanceOutput) ZoneId() pulumi.StringOutput

The zone ID of the instance. The value can be in zone x or region id-x format. **NOTE**: When the available zone is insufficient, another availability zone may be deployed.

type InstanceState

type InstanceState struct {
	// 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.
	Config pulumi.StringPtrInput
	// The deployment type of the instance. **NOTE:** From version 1.161.0, this attribute supports to be updated. Valid values:
	// - 4: eip/vpc instance
	// - 5: vpc instance.
	DeployType pulumi.IntPtrInput
	// The disk size of the instance. When modify this value, it only supports adjust to a greater value.
	DiskSize pulumi.IntPtrInput
	// The disk type of the instance. 0: efficient cloud disk , 1: SSD.
	DiskType pulumi.IntPtrInput
	// The max bandwidth of the instance. It will be ignored when `deployType = 5`. When modify this value, it only supports adjust to a greater value.
	EipMax pulumi.IntPtrInput
	// The EndPoint to access the kafka instance.
	EndPoint pulumi.StringPtrInput
	// (Available since v1.214.1) The number of available groups.
	GroupLeft pulumi.IntPtrInput
	// (Available since v1.214.1) The number of used groups.
	GroupUsed pulumi.IntPtrInput
	// The max value of io of the instance. When modify this value, it only support adjust to a greater value.
	IoMax pulumi.IntPtrInput
	// The traffic specification of the instance. We recommend that you configure this parameter.
	// - You should specify one of the `ioMax` and `ioMaxSpec` parameters, and `ioMaxSpec` is recommended.
	// - For more information about the valid values, see [Billing](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/billing-overview).
	IoMaxSpec pulumi.StringPtrInput
	// (Available since v1.214.1) The method that you use to purchase partitions.
	IsPartitionBuy pulumi.IntPtrInput
	// The ID of the key that is used to encrypt data on standard SSDs in the region of the instance.
	KmsKeyId pulumi.StringPtrInput
	// Name of your Kafka instance. The length should between 3 and 64 characters. If not set, will use instance id as instance name.
	Name pulumi.StringPtrInput
	// 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.
	PaidType pulumi.StringPtrInput
	// (Available since v1.214.1) The number of available partitions.
	PartitionLeft pulumi.IntPtrInput
	// The number of partitions.
	PartitionNum pulumi.IntPtrInput
	// (Available since v1.214.1) The number of used partitions.
	PartitionUsed pulumi.IntPtrInput
	// The ID of security group for this instance. If the security group is empty, system will create a default one.
	SecurityGroup pulumi.StringPtrInput
	// The zones among which you want to deploy the instance.
	//
	// > **NOTE:** Arguments io_max, disk_size, topic_quota, eipMax should follow the following constraints.
	//
	// | ioMax | disk_size(min-max:lag) | topic_quota(min-max:lag) | eip_max(min-max:lag) |
	// |------|-------------|:----:|:-----:|
	// |20          |  500-6100:100   |   50-450:1  |    1-160:1  |
	// |30          |  800-6100:100   |   50-450:1  |    1-240:1  |
	// |60          |  1400-6100:100  |   80-450:1  |    1-500:1  |
	// |90          |  2100-6100:100  |   100-450:1 |    1-500:1  |
	// |120         |  2700-6100:100  |   150-450:1 |    1-500:1  |
	SelectedZones pulumi.StringArrayInput
	// The kafka openSource version for this instance. Only 0.10.2 or 2.2.0 is allowed, default is 0.10.2.
	ServiceVersion pulumi.StringPtrInput
	// 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.
	SpecType pulumi.StringPtrInput
	// The status of the instance.
	Status pulumi.IntPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// (Available since v1.214.1) The number of available topics.
	TopicLeft pulumi.IntPtrInput
	// (Available since v1.214.1) The number of purchased topics.
	TopicNumOfBuy pulumi.IntPtrInput
	// The max num of topic can be creation of the instance.
	// It has been deprecated since version 1.194.0 and using `partitionNum` instead.
	// Currently, its value only can be set to 50 when creating it, and finally depends on `partitionNum` value: <`topicQuota`> = 1000 + <`partitionNum`>.
	// Therefore, you can update it by updating the `partitionNum`, and it is the only updating path.
	//
	// Deprecated: Attribute `topicQuota` has been deprecated since 1.194.0 and it will be removed in the next future. Using new attribute `partitionNum` instead.
	TopicQuota pulumi.IntPtrInput
	// (Available since v1.214.1) The number of used topics.
	TopicUsed pulumi.IntPtrInput
	// The VPC ID of the instance.
	VpcId pulumi.StringPtrInput
	// The ID of attaching vswitch to instance.
	VswitchId pulumi.StringPtrInput
	// The zone ID of the instance. The value can be in zone x or region id-x format. **NOTE**: When the available zone is insufficient, another availability zone may be deployed.
	ZoneId pulumi.StringPtrInput
}

func (InstanceState) ElementType

func (InstanceState) ElementType() reflect.Type

type SaslAcl

type SaslAcl struct {
	pulumi.CustomResourceState

	// Operation type for this acl. The operation type can only be "Write" and "Read".
	AclOperationType pulumi.StringOutput `pulumi:"aclOperationType"`
	// Resource name for this acl. The resource name should be a topic or consumer group name.
	AclResourceName pulumi.StringOutput `pulumi:"aclResourceName"`
	// Resource pattern type for this acl. The resource pattern support two types "LITERAL" and "PREFIXED". "LITERAL": A literal name defines the full name of a resource. The special wildcard character "*" can be used to represent a resource with any name. "PREFIXED": A prefixed name defines a prefix for a resource.
	AclResourcePatternType pulumi.StringOutput `pulumi:"aclResourcePatternType"`
	// Resource type for this acl. The resource type can only be "Topic" and "Group".
	AclResourceType pulumi.StringOutput `pulumi:"aclResourceType"`
	// The host of the acl.
	Host pulumi.StringOutput `pulumi:"host"`
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// Username for the sasl user. The length should between 1 to 64 characters. The user should be an existed sasl user.
	Username pulumi.StringOutput `pulumi:"username"`
}

Provides an ALIKAFKA sasl acl resource, see [What is alikafka sasl acl](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/api-alikafka-2019-09-16-createacl).

> **NOTE:** Available since v1.66.0.

> **NOTE:** Only the following regions support create alikafka sasl user. [`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-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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 := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.4.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String(name),
			CidrBlock:   pulumi.String("10.4.0.0/24"),
			VpcId:       defaultNetwork.ID(),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
			Name:           pulumi.String(fmt.Sprintf("%v-%v", name, defaultInteger.Result)),
			PartitionNum:   pulumi.Int(50),
			DiskType:       pulumi.Int(1),
			DiskSize:       pulumi.Int(500),
			DeployType:     pulumi.Int(5),
			IoMax:          pulumi.Int(20),
			SpecType:       pulumi.String("professional"),
			ServiceVersion: pulumi.String("2.2.0"),
			Config:         pulumi.String("{\"enable.acl\":\"true\"}"),
			VswitchId:      defaultSwitch.ID(),
			SecurityGroup:  defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		defaultTopic, err := alikafka.NewTopic(ctx, "default", &alikafka.TopicArgs{
			InstanceId: defaultInstance.ID(),
			Topic:      pulumi.String("example-topic"),
			Remark:     pulumi.String("topic-remark"),
		})
		if err != nil {
			return err
		}
		defaultSaslUser, err := alikafka.NewSaslUser(ctx, "default", &alikafka.SaslUserArgs{
			InstanceId: defaultInstance.ID(),
			Username:   pulumi.String(name),
			Password:   pulumi.String("tf_example123"),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewSaslAcl(ctx, "default", &alikafka.SaslAclArgs{
			InstanceId:             defaultInstance.ID(),
			Username:               defaultSaslUser.Username,
			AclResourceType:        pulumi.String("Topic"),
			AclResourceName:        defaultTopic.Topic,
			AclResourcePatternType: pulumi.String("LITERAL"),
			AclOperationType:       pulumi.String("Write"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh $ pulumi import alicloud:alikafka/saslAcl:SaslAcl acl alikafka_post-cn-123455abc:username:Topic:test-topic:LITERAL:Write ```

func GetSaslAcl

func GetSaslAcl(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SaslAclState, opts ...pulumi.ResourceOption) (*SaslAcl, error)

GetSaslAcl gets an existing SaslAcl resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSaslAcl

func NewSaslAcl(ctx *pulumi.Context,
	name string, args *SaslAclArgs, opts ...pulumi.ResourceOption) (*SaslAcl, error)

NewSaslAcl registers a new resource with the given unique name, arguments, and options.

func (*SaslAcl) ElementType

func (*SaslAcl) ElementType() reflect.Type

func (*SaslAcl) ToSaslAclOutput

func (i *SaslAcl) ToSaslAclOutput() SaslAclOutput

func (*SaslAcl) ToSaslAclOutputWithContext

func (i *SaslAcl) ToSaslAclOutputWithContext(ctx context.Context) SaslAclOutput

type SaslAclArgs

type SaslAclArgs struct {
	// Operation type for this acl. The operation type can only be "Write" and "Read".
	AclOperationType pulumi.StringInput
	// Resource name for this acl. The resource name should be a topic or consumer group name.
	AclResourceName pulumi.StringInput
	// Resource pattern type for this acl. The resource pattern support two types "LITERAL" and "PREFIXED". "LITERAL": A literal name defines the full name of a resource. The special wildcard character "*" can be used to represent a resource with any name. "PREFIXED": A prefixed name defines a prefix for a resource.
	AclResourcePatternType pulumi.StringInput
	// Resource type for this acl. The resource type can only be "Topic" and "Group".
	AclResourceType pulumi.StringInput
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringInput
	// Username for the sasl user. The length should between 1 to 64 characters. The user should be an existed sasl user.
	Username pulumi.StringInput
}

The set of arguments for constructing a SaslAcl resource.

func (SaslAclArgs) ElementType

func (SaslAclArgs) ElementType() reflect.Type

type SaslAclArray

type SaslAclArray []SaslAclInput

func (SaslAclArray) ElementType

func (SaslAclArray) ElementType() reflect.Type

func (SaslAclArray) ToSaslAclArrayOutput

func (i SaslAclArray) ToSaslAclArrayOutput() SaslAclArrayOutput

func (SaslAclArray) ToSaslAclArrayOutputWithContext

func (i SaslAclArray) ToSaslAclArrayOutputWithContext(ctx context.Context) SaslAclArrayOutput

type SaslAclArrayInput

type SaslAclArrayInput interface {
	pulumi.Input

	ToSaslAclArrayOutput() SaslAclArrayOutput
	ToSaslAclArrayOutputWithContext(context.Context) SaslAclArrayOutput
}

SaslAclArrayInput is an input type that accepts SaslAclArray and SaslAclArrayOutput values. You can construct a concrete instance of `SaslAclArrayInput` via:

SaslAclArray{ SaslAclArgs{...} }

type SaslAclArrayOutput

type SaslAclArrayOutput struct{ *pulumi.OutputState }

func (SaslAclArrayOutput) ElementType

func (SaslAclArrayOutput) ElementType() reflect.Type

func (SaslAclArrayOutput) Index

func (SaslAclArrayOutput) ToSaslAclArrayOutput

func (o SaslAclArrayOutput) ToSaslAclArrayOutput() SaslAclArrayOutput

func (SaslAclArrayOutput) ToSaslAclArrayOutputWithContext

func (o SaslAclArrayOutput) ToSaslAclArrayOutputWithContext(ctx context.Context) SaslAclArrayOutput

type SaslAclInput

type SaslAclInput interface {
	pulumi.Input

	ToSaslAclOutput() SaslAclOutput
	ToSaslAclOutputWithContext(ctx context.Context) SaslAclOutput
}

type SaslAclMap

type SaslAclMap map[string]SaslAclInput

func (SaslAclMap) ElementType

func (SaslAclMap) ElementType() reflect.Type

func (SaslAclMap) ToSaslAclMapOutput

func (i SaslAclMap) ToSaslAclMapOutput() SaslAclMapOutput

func (SaslAclMap) ToSaslAclMapOutputWithContext

func (i SaslAclMap) ToSaslAclMapOutputWithContext(ctx context.Context) SaslAclMapOutput

type SaslAclMapInput

type SaslAclMapInput interface {
	pulumi.Input

	ToSaslAclMapOutput() SaslAclMapOutput
	ToSaslAclMapOutputWithContext(context.Context) SaslAclMapOutput
}

SaslAclMapInput is an input type that accepts SaslAclMap and SaslAclMapOutput values. You can construct a concrete instance of `SaslAclMapInput` via:

SaslAclMap{ "key": SaslAclArgs{...} }

type SaslAclMapOutput

type SaslAclMapOutput struct{ *pulumi.OutputState }

func (SaslAclMapOutput) ElementType

func (SaslAclMapOutput) ElementType() reflect.Type

func (SaslAclMapOutput) MapIndex

func (SaslAclMapOutput) ToSaslAclMapOutput

func (o SaslAclMapOutput) ToSaslAclMapOutput() SaslAclMapOutput

func (SaslAclMapOutput) ToSaslAclMapOutputWithContext

func (o SaslAclMapOutput) ToSaslAclMapOutputWithContext(ctx context.Context) SaslAclMapOutput

type SaslAclOutput

type SaslAclOutput struct{ *pulumi.OutputState }

func (SaslAclOutput) AclOperationType added in v3.27.0

func (o SaslAclOutput) AclOperationType() pulumi.StringOutput

Operation type for this acl. The operation type can only be "Write" and "Read".

func (SaslAclOutput) AclResourceName added in v3.27.0

func (o SaslAclOutput) AclResourceName() pulumi.StringOutput

Resource name for this acl. The resource name should be a topic or consumer group name.

func (SaslAclOutput) AclResourcePatternType added in v3.27.0

func (o SaslAclOutput) AclResourcePatternType() pulumi.StringOutput

Resource pattern type for this acl. The resource pattern support two types "LITERAL" and "PREFIXED". "LITERAL": A literal name defines the full name of a resource. The special wildcard character "*" can be used to represent a resource with any name. "PREFIXED": A prefixed name defines a prefix for a resource.

func (SaslAclOutput) AclResourceType added in v3.27.0

func (o SaslAclOutput) AclResourceType() pulumi.StringOutput

Resource type for this acl. The resource type can only be "Topic" and "Group".

func (SaslAclOutput) ElementType

func (SaslAclOutput) ElementType() reflect.Type

func (SaslAclOutput) Host added in v3.27.0

The host of the acl.

func (SaslAclOutput) InstanceId added in v3.27.0

func (o SaslAclOutput) InstanceId() pulumi.StringOutput

ID of the ALIKAFKA Instance that owns the groups.

func (SaslAclOutput) ToSaslAclOutput

func (o SaslAclOutput) ToSaslAclOutput() SaslAclOutput

func (SaslAclOutput) ToSaslAclOutputWithContext

func (o SaslAclOutput) ToSaslAclOutputWithContext(ctx context.Context) SaslAclOutput

func (SaslAclOutput) Username added in v3.27.0

func (o SaslAclOutput) Username() pulumi.StringOutput

Username for the sasl user. The length should between 1 to 64 characters. The user should be an existed sasl user.

type SaslAclState

type SaslAclState struct {
	// Operation type for this acl. The operation type can only be "Write" and "Read".
	AclOperationType pulumi.StringPtrInput
	// Resource name for this acl. The resource name should be a topic or consumer group name.
	AclResourceName pulumi.StringPtrInput
	// Resource pattern type for this acl. The resource pattern support two types "LITERAL" and "PREFIXED". "LITERAL": A literal name defines the full name of a resource. The special wildcard character "*" can be used to represent a resource with any name. "PREFIXED": A prefixed name defines a prefix for a resource.
	AclResourcePatternType pulumi.StringPtrInput
	// Resource type for this acl. The resource type can only be "Topic" and "Group".
	AclResourceType pulumi.StringPtrInput
	// The host of the acl.
	Host pulumi.StringPtrInput
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringPtrInput
	// Username for the sasl user. The length should between 1 to 64 characters. The user should be an existed sasl user.
	Username pulumi.StringPtrInput
}

func (SaslAclState) ElementType

func (SaslAclState) ElementType() reflect.Type

type SaslUser

type SaslUser struct {
	pulumi.CustomResourceState

	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// An KMS encrypts password used to a db account. You have to specify one of `password` and `kmsEncryptedPassword` fields.
	KmsEncryptedPassword pulumi.StringPtrOutput `pulumi:"kmsEncryptedPassword"`
	// An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating a user with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set.
	KmsEncryptionContext pulumi.MapOutput `pulumi:"kmsEncryptionContext"`
	// The password of the SASL user. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of `password` and `kmsEncryptedPassword` fields.
	Password pulumi.StringPtrOutput `pulumi:"password"`
	// The authentication mechanism. Default value: `plain`. Valid values: `plain`, `scram`.
	Type pulumi.StringOutput `pulumi:"type"`
	// The name of the SASL user. The length should between `1` to `64` characters. The characters can only contain `a`-`z`, `A`-`Z`, `0`-`9`, `_` and `-`.
	Username pulumi.StringOutput `pulumi:"username"`
}

Provides an Alikafka Sasl User resource.

> **NOTE:** Available since v1.66.0.

> **NOTE:** Only the following regions support create alikafka Sasl User. [`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-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

For information about Alikafka Sasl User and how to use it, see [What is Sasl User](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/api-alikafka-2019-09-16-createsasluser).

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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 := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.4.0.0/16"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VswitchName: pulumi.String(name),
			CidrBlock:   pulumi.String("10.4.0.0/24"),
			VpcId:       defaultNetwork.ID(),
			ZoneId:      pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
			Name:           pulumi.String(fmt.Sprintf("%v-%v", name, defaultInteger.Result)),
			PartitionNum:   pulumi.Int(50),
			DiskType:       pulumi.Int(1),
			DiskSize:       pulumi.Int(500),
			DeployType:     pulumi.Int(5),
			IoMax:          pulumi.Int(20),
			SpecType:       pulumi.String("professional"),
			ServiceVersion: pulumi.String("2.2.0"),
			VswitchId:      defaultSwitch.ID(),
			SecurityGroup:  defaultSecurityGroup.ID(),
			Config:         pulumi.String("  {\n    \"enable.acl\": \"true\"\n  }\n"),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewSaslUser(ctx, "default", &alikafka.SaslUserArgs{
			InstanceId: defaultInstance.ID(),
			Username:   pulumi.String(name),
			Password:   pulumi.String("tf_example123"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Alikafka Sasl User can be imported using the id, e.g.

```sh $ pulumi import alicloud:alikafka/saslUser:SaslUser example <instance_id>:<username> ```

func GetSaslUser

func GetSaslUser(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *SaslUserState, opts ...pulumi.ResourceOption) (*SaslUser, error)

GetSaslUser gets an existing SaslUser resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewSaslUser

func NewSaslUser(ctx *pulumi.Context,
	name string, args *SaslUserArgs, opts ...pulumi.ResourceOption) (*SaslUser, error)

NewSaslUser registers a new resource with the given unique name, arguments, and options.

func (*SaslUser) ElementType

func (*SaslUser) ElementType() reflect.Type

func (*SaslUser) ToSaslUserOutput

func (i *SaslUser) ToSaslUserOutput() SaslUserOutput

func (*SaslUser) ToSaslUserOutputWithContext

func (i *SaslUser) ToSaslUserOutputWithContext(ctx context.Context) SaslUserOutput

type SaslUserArgs

type SaslUserArgs struct {
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringInput
	// An KMS encrypts password used to a db account. You have to specify one of `password` and `kmsEncryptedPassword` fields.
	KmsEncryptedPassword pulumi.StringPtrInput
	// An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating a user with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set.
	KmsEncryptionContext pulumi.MapInput
	// The password of the SASL user. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of `password` and `kmsEncryptedPassword` fields.
	Password pulumi.StringPtrInput
	// The authentication mechanism. Default value: `plain`. Valid values: `plain`, `scram`.
	Type pulumi.StringPtrInput
	// The name of the SASL user. The length should between `1` to `64` characters. The characters can only contain `a`-`z`, `A`-`Z`, `0`-`9`, `_` and `-`.
	Username pulumi.StringInput
}

The set of arguments for constructing a SaslUser resource.

func (SaslUserArgs) ElementType

func (SaslUserArgs) ElementType() reflect.Type

type SaslUserArray

type SaslUserArray []SaslUserInput

func (SaslUserArray) ElementType

func (SaslUserArray) ElementType() reflect.Type

func (SaslUserArray) ToSaslUserArrayOutput

func (i SaslUserArray) ToSaslUserArrayOutput() SaslUserArrayOutput

func (SaslUserArray) ToSaslUserArrayOutputWithContext

func (i SaslUserArray) ToSaslUserArrayOutputWithContext(ctx context.Context) SaslUserArrayOutput

type SaslUserArrayInput

type SaslUserArrayInput interface {
	pulumi.Input

	ToSaslUserArrayOutput() SaslUserArrayOutput
	ToSaslUserArrayOutputWithContext(context.Context) SaslUserArrayOutput
}

SaslUserArrayInput is an input type that accepts SaslUserArray and SaslUserArrayOutput values. You can construct a concrete instance of `SaslUserArrayInput` via:

SaslUserArray{ SaslUserArgs{...} }

type SaslUserArrayOutput

type SaslUserArrayOutput struct{ *pulumi.OutputState }

func (SaslUserArrayOutput) ElementType

func (SaslUserArrayOutput) ElementType() reflect.Type

func (SaslUserArrayOutput) Index

func (SaslUserArrayOutput) ToSaslUserArrayOutput

func (o SaslUserArrayOutput) ToSaslUserArrayOutput() SaslUserArrayOutput

func (SaslUserArrayOutput) ToSaslUserArrayOutputWithContext

func (o SaslUserArrayOutput) ToSaslUserArrayOutputWithContext(ctx context.Context) SaslUserArrayOutput

type SaslUserInput

type SaslUserInput interface {
	pulumi.Input

	ToSaslUserOutput() SaslUserOutput
	ToSaslUserOutputWithContext(ctx context.Context) SaslUserOutput
}

type SaslUserMap

type SaslUserMap map[string]SaslUserInput

func (SaslUserMap) ElementType

func (SaslUserMap) ElementType() reflect.Type

func (SaslUserMap) ToSaslUserMapOutput

func (i SaslUserMap) ToSaslUserMapOutput() SaslUserMapOutput

func (SaslUserMap) ToSaslUserMapOutputWithContext

func (i SaslUserMap) ToSaslUserMapOutputWithContext(ctx context.Context) SaslUserMapOutput

type SaslUserMapInput

type SaslUserMapInput interface {
	pulumi.Input

	ToSaslUserMapOutput() SaslUserMapOutput
	ToSaslUserMapOutputWithContext(context.Context) SaslUserMapOutput
}

SaslUserMapInput is an input type that accepts SaslUserMap and SaslUserMapOutput values. You can construct a concrete instance of `SaslUserMapInput` via:

SaslUserMap{ "key": SaslUserArgs{...} }

type SaslUserMapOutput

type SaslUserMapOutput struct{ *pulumi.OutputState }

func (SaslUserMapOutput) ElementType

func (SaslUserMapOutput) ElementType() reflect.Type

func (SaslUserMapOutput) MapIndex

func (SaslUserMapOutput) ToSaslUserMapOutput

func (o SaslUserMapOutput) ToSaslUserMapOutput() SaslUserMapOutput

func (SaslUserMapOutput) ToSaslUserMapOutputWithContext

func (o SaslUserMapOutput) ToSaslUserMapOutputWithContext(ctx context.Context) SaslUserMapOutput

type SaslUserOutput

type SaslUserOutput struct{ *pulumi.OutputState }

func (SaslUserOutput) ElementType

func (SaslUserOutput) ElementType() reflect.Type

func (SaslUserOutput) InstanceId added in v3.27.0

func (o SaslUserOutput) InstanceId() pulumi.StringOutput

ID of the ALIKAFKA Instance that owns the groups.

func (SaslUserOutput) KmsEncryptedPassword added in v3.27.0

func (o SaslUserOutput) KmsEncryptedPassword() pulumi.StringPtrOutput

An KMS encrypts password used to a db account. You have to specify one of `password` and `kmsEncryptedPassword` fields.

func (SaslUserOutput) KmsEncryptionContext added in v3.27.0

func (o SaslUserOutput) KmsEncryptionContext() pulumi.MapOutput

An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating a user with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set.

func (SaslUserOutput) Password added in v3.27.0

func (o SaslUserOutput) Password() pulumi.StringPtrOutput

The password of the SASL user. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of `password` and `kmsEncryptedPassword` fields.

func (SaslUserOutput) ToSaslUserOutput

func (o SaslUserOutput) ToSaslUserOutput() SaslUserOutput

func (SaslUserOutput) ToSaslUserOutputWithContext

func (o SaslUserOutput) ToSaslUserOutputWithContext(ctx context.Context) SaslUserOutput

func (SaslUserOutput) Type added in v3.27.0

The authentication mechanism. Default value: `plain`. Valid values: `plain`, `scram`.

func (SaslUserOutput) Username added in v3.27.0

func (o SaslUserOutput) Username() pulumi.StringOutput

The name of the SASL user. The length should between `1` to `64` characters. The characters can only contain `a`-`z`, `A`-`Z`, `0`-`9`, `_` and `-`.

type SaslUserState

type SaslUserState struct {
	// ID of the ALIKAFKA Instance that owns the groups.
	InstanceId pulumi.StringPtrInput
	// An KMS encrypts password used to a db account. You have to specify one of `password` and `kmsEncryptedPassword` fields.
	KmsEncryptedPassword pulumi.StringPtrInput
	// An KMS encryption context used to decrypt `kmsEncryptedPassword` before creating or updating a user with `kmsEncryptedPassword`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kmsEncryptedPassword` is set.
	KmsEncryptionContext pulumi.MapInput
	// The password of the SASL user. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of `password` and `kmsEncryptedPassword` fields.
	Password pulumi.StringPtrInput
	// The authentication mechanism. Default value: `plain`. Valid values: `plain`, `scram`.
	Type pulumi.StringPtrInput
	// The name of the SASL user. The length should between `1` to `64` characters. The characters can only contain `a`-`z`, `A`-`Z`, `0`-`9`, `_` and `-`.
	Username pulumi.StringPtrInput
}

func (SaslUserState) ElementType

func (SaslUserState) ElementType() reflect.Type

type Topic

type Topic struct {
	pulumi.CustomResourceState

	// Whether the topic is compactTopic or not. Compact topic must be a localTopic.
	CompactTopic pulumi.BoolPtrOutput `pulumi:"compactTopic"`
	// InstanceId of your Kafka resource, the topic will create in this instance.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// Whether the topic is localTopic or not.
	LocalTopic pulumi.BoolPtrOutput `pulumi:"localTopic"`
	// The number of partitions of the topic. The number should between 1 and 48.
	PartitionNum pulumi.IntPtrOutput `pulumi:"partitionNum"`
	// This attribute is a concise description of topic. The length cannot exceed 64.
	Remark pulumi.StringOutput `pulumi:"remark"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
	Topic pulumi.StringOutput `pulumi:"topic"`
}

Provides an ALIKAFKA topic resource, see [What is Alikafka topic ](https://www.alibabacloud.com/help/en/message-queue-for-apache-kafka/latest/api-alikafka-2019-09-16-createtopic).

> **NOTE:** Available since v1.56.0.

> **NOTE:** Only the following regions support create alikafka topic. [`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-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

## Example Usage

Basic Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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, "")
		instanceName := "tf-example"
		if param := cfg.Get("instanceName"); param != "" {
			instanceName = param
		}
		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(_default.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
			Name:          pulumi.String(fmt.Sprintf("%v-%v", instanceName, defaultInteger.Result)),
			PartitionNum:  pulumi.Int(50),
			DiskType:      pulumi.Int(1),
			DiskSize:      pulumi.Int(500),
			DeployType:    pulumi.Int(5),
			IoMax:         pulumi.Int(20),
			VswitchId:     defaultSwitch.ID(),
			SecurityGroup: defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewTopic(ctx, "default", &alikafka.TopicArgs{
			InstanceId:   defaultInstance.ID(),
			Topic:        pulumi.String("example-topic"),
			LocalTopic:   pulumi.Bool(false),
			CompactTopic: pulumi.Bool(false),
			PartitionNum: pulumi.Int(12),
			Remark:       pulumi.String("dafault_kafka_topic_remark"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh $ pulumi import alicloud:alikafka/topic:Topic topic alikafka_post-cn-123455abc:topicName ```

func GetTopic

func GetTopic(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TopicState, opts ...pulumi.ResourceOption) (*Topic, error)

GetTopic gets an existing Topic resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTopic

func NewTopic(ctx *pulumi.Context,
	name string, args *TopicArgs, opts ...pulumi.ResourceOption) (*Topic, error)

NewTopic registers a new resource with the given unique name, arguments, and options.

func (*Topic) ElementType

func (*Topic) ElementType() reflect.Type

func (*Topic) ToTopicOutput

func (i *Topic) ToTopicOutput() TopicOutput

func (*Topic) ToTopicOutputWithContext

func (i *Topic) ToTopicOutputWithContext(ctx context.Context) TopicOutput

type TopicArgs

type TopicArgs struct {
	// Whether the topic is compactTopic or not. Compact topic must be a localTopic.
	CompactTopic pulumi.BoolPtrInput
	// InstanceId of your Kafka resource, the topic will create in this instance.
	InstanceId pulumi.StringInput
	// Whether the topic is localTopic or not.
	LocalTopic pulumi.BoolPtrInput
	// The number of partitions of the topic. The number should between 1 and 48.
	PartitionNum pulumi.IntPtrInput
	// This attribute is a concise description of topic. The length cannot exceed 64.
	Remark pulumi.StringInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
	Topic pulumi.StringInput
}

The set of arguments for constructing a Topic resource.

func (TopicArgs) ElementType

func (TopicArgs) ElementType() reflect.Type

type TopicArray

type TopicArray []TopicInput

func (TopicArray) ElementType

func (TopicArray) ElementType() reflect.Type

func (TopicArray) ToTopicArrayOutput

func (i TopicArray) ToTopicArrayOutput() TopicArrayOutput

func (TopicArray) ToTopicArrayOutputWithContext

func (i TopicArray) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput

type TopicArrayInput

type TopicArrayInput interface {
	pulumi.Input

	ToTopicArrayOutput() TopicArrayOutput
	ToTopicArrayOutputWithContext(context.Context) TopicArrayOutput
}

TopicArrayInput is an input type that accepts TopicArray and TopicArrayOutput values. You can construct a concrete instance of `TopicArrayInput` via:

TopicArray{ TopicArgs{...} }

type TopicArrayOutput

type TopicArrayOutput struct{ *pulumi.OutputState }

func (TopicArrayOutput) ElementType

func (TopicArrayOutput) ElementType() reflect.Type

func (TopicArrayOutput) Index

func (TopicArrayOutput) ToTopicArrayOutput

func (o TopicArrayOutput) ToTopicArrayOutput() TopicArrayOutput

func (TopicArrayOutput) ToTopicArrayOutputWithContext

func (o TopicArrayOutput) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput

type TopicInput

type TopicInput interface {
	pulumi.Input

	ToTopicOutput() TopicOutput
	ToTopicOutputWithContext(ctx context.Context) TopicOutput
}

type TopicMap

type TopicMap map[string]TopicInput

func (TopicMap) ElementType

func (TopicMap) ElementType() reflect.Type

func (TopicMap) ToTopicMapOutput

func (i TopicMap) ToTopicMapOutput() TopicMapOutput

func (TopicMap) ToTopicMapOutputWithContext

func (i TopicMap) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput

type TopicMapInput

type TopicMapInput interface {
	pulumi.Input

	ToTopicMapOutput() TopicMapOutput
	ToTopicMapOutputWithContext(context.Context) TopicMapOutput
}

TopicMapInput is an input type that accepts TopicMap and TopicMapOutput values. You can construct a concrete instance of `TopicMapInput` via:

TopicMap{ "key": TopicArgs{...} }

type TopicMapOutput

type TopicMapOutput struct{ *pulumi.OutputState }

func (TopicMapOutput) ElementType

func (TopicMapOutput) ElementType() reflect.Type

func (TopicMapOutput) MapIndex

func (TopicMapOutput) ToTopicMapOutput

func (o TopicMapOutput) ToTopicMapOutput() TopicMapOutput

func (TopicMapOutput) ToTopicMapOutputWithContext

func (o TopicMapOutput) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput

type TopicOutput

type TopicOutput struct{ *pulumi.OutputState }

func (TopicOutput) CompactTopic added in v3.27.0

func (o TopicOutput) CompactTopic() pulumi.BoolPtrOutput

Whether the topic is compactTopic or not. Compact topic must be a localTopic.

func (TopicOutput) ElementType

func (TopicOutput) ElementType() reflect.Type

func (TopicOutput) InstanceId added in v3.27.0

func (o TopicOutput) InstanceId() pulumi.StringOutput

InstanceId of your Kafka resource, the topic will create in this instance.

func (TopicOutput) LocalTopic added in v3.27.0

func (o TopicOutput) LocalTopic() pulumi.BoolPtrOutput

Whether the topic is localTopic or not.

func (TopicOutput) PartitionNum added in v3.27.0

func (o TopicOutput) PartitionNum() pulumi.IntPtrOutput

The number of partitions of the topic. The number should between 1 and 48.

func (TopicOutput) Remark added in v3.27.0

func (o TopicOutput) Remark() pulumi.StringOutput

This attribute is a concise description of topic. The length cannot exceed 64.

func (TopicOutput) Tags added in v3.27.0

func (o TopicOutput) Tags() pulumi.MapOutput

A mapping of tags to assign to the resource.

func (TopicOutput) ToTopicOutput

func (o TopicOutput) ToTopicOutput() TopicOutput

func (TopicOutput) ToTopicOutputWithContext

func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput

func (TopicOutput) Topic added in v3.27.0

func (o TopicOutput) Topic() pulumi.StringOutput

Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.

type TopicState

type TopicState struct {
	// Whether the topic is compactTopic or not. Compact topic must be a localTopic.
	CompactTopic pulumi.BoolPtrInput
	// InstanceId of your Kafka resource, the topic will create in this instance.
	InstanceId pulumi.StringPtrInput
	// Whether the topic is localTopic or not.
	LocalTopic pulumi.BoolPtrInput
	// The number of partitions of the topic. The number should between 1 and 48.
	PartitionNum pulumi.IntPtrInput
	// This attribute is a concise description of topic. The length cannot exceed 64.
	Remark pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapInput
	// Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
	Topic pulumi.StringPtrInput
}

func (TopicState) ElementType

func (TopicState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL