alikafka

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PkgVersion added in v0.0.1

func PkgVersion() (semver.Version, error)

PkgVersion uses reflection to determine the version of the current package. If a version cannot be determined, v1 will be assumed. The second return value is always nil.

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.

> **NOTE:** Available in 1.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-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/alikafka"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		consumerId := "CID-alikafkaGroupDatasourceName"
		if param := cfg.Get("consumerId"); param != "" {
			consumerId = param
		}
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			PartitionNum: pulumi.Int(50),
			DiskType:     pulumi.Int(1),
			DiskSize:     pulumi.Int(500),
			DeployType:   pulumi.Int(5),
			IoMax:        pulumi.Int(20),
			VswitchId:    defaultSwitch.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewConsumerGroup(ctx, "defaultConsumerGroup", &alikafka.ConsumerGroupArgs{
			ConsumerId: pulumi.String(consumerId),
			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

func (o ConsumerGroupOutput) ConsumerId() pulumi.StringOutput

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

func (ConsumerGroupOutput) Description

func (o ConsumerGroupOutput) Description() pulumi.StringPtrOutput

The description of the resource.

func (ConsumerGroupOutput) ElementType

func (ConsumerGroupOutput) ElementType() reflect.Type

func (ConsumerGroupOutput) InstanceId

func (o ConsumerGroupOutput) InstanceId() pulumi.StringOutput

ID of the ALIKAFKA Instance that owns the groups.

func (ConsumerGroupOutput) Tags

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"`
	// 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 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"`
	// The number of partitions.
	PartitionNum pulumi.IntPtrOutput `pulumi:"partitionNum"`
	// 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 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. Valid values:
	// - 0: pending
	// - 1: deploying
	// - 5: running
	// - 15: expired
	Status pulumi.IntOutput `pulumi:"status"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The max num of topic can be creation of the instance.
	// It has been deprecated from version 1.194.0 and using `partitionNum` instead.
	//
	// Deprecated: Attribute 'topic_quota' has been deprecated from 1.194.0 and it will be removed in the next future. Using new attribute 'partition_num' instead.
	TopicQuota pulumi.IntOutput `pulumi:"topicQuota"`
	// 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.
	ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}

Provides an ALIKAFKA instance resource.

> **NOTE:** Available in 1.59.0+

> **NOTE:** Creation or modification may took about 10-40 minutes.

> **NOTE:** Only the following regions support create alikafka pre paid instance. [`cn-hangzhou`,`cn-beijing`,`cn-shenzhen`,`cn-shanghai`,`cn-qingdao`,`cn-hongkong`,`cn-huhehaote`,`cn-zhangjiakou`,`cn-chengdu`,`cn-heyuan`,`ap-southeast-1`,`ap-southeast-3`,`ap-southeast-5`,`ap-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

> **NOTE:** Only the following regions support create alikafka post paid instance. [`cn-hangzhou`,`cn-beijing`,`cn-shenzhen`,`cn-shanghai`,`cn-qingdao`,`cn-hongkong`,`cn-huhehaote`,`cn-zhangjiakou`,`cn-chengdu`,`cn-heyuan`,`ap-southeast-1`,`ap-southeast-3`,`ap-southeast-5`,`ap-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`] ## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/alikafka"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/ecs"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		instanceName := "alikafkaInstanceName"
		if param := cfg.Get("instanceName"); param != "" {
			instanceName = param
		}
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
			VpcId: defaultNetwork.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			PartitionNum:  pulumi.Int(50),
			DiskType:      pulumi.Int(1),
			DiskSize:      pulumi.Int(500),
			DeployType:    pulumi.Int(4),
			IoMax:         pulumi.Int(20),
			VswitchId:     defaultSwitch.ID(),
			SecurityGroup: defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

```sh

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

```

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

type InstanceAllowedIpAttachment struct {
	pulumi.CustomResourceState

	// The allowed ip. It can be a CIDR block.
	AllowedIp pulumi.StringOutput `pulumi:"allowedIp"`
	// The type of whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.
	// - `vpc`: IP address whitelist for VPC access.
	// - `internet`: IP address whitelist for Internet access.
	AllowedType pulumi.StringOutput `pulumi:"allowedType"`
	// The ID of the instance.
	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
	// The Port range.  Valid Value: `9092/9092`, `9093/9093`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`.
	// - `9092/9092`: port range for a VPC whitelist.
	// - `9093/9093`: port range for an Internet whitelist.
	PortRange pulumi.StringOutput `pulumi:"portRange"`
}

Provides a AliKafka Instance Allowed Ip Attachment resource.

For information about Ali Kafka Instance Allowed Ip Attachment and how to use it, see [What is Instance Allowed Ip Attachment](https://www.alibabacloud.com/help/en/doc-detail/68151.html).

> **NOTE:** Available in v1.163.0+.

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/alikafka"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/ecs"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tftest"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
			NameRegex: pulumi.StringRef("^default-NODELETING"),
		}, nil)
		if err != nil {
			return err
		}
		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
			VpcId: pulumi.StringRef(defaultNetworks.Ids[0]),
		}, nil)
		if err != nil {
			return err
		}
		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
			VpcId: pulumi.String(defaultNetworks.Ids[0]),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			PartitionNum:  pulumi.Int(50),
			DiskType:      pulumi.Int(1),
			DiskSize:      pulumi.Int(500),
			DeployType:    pulumi.Int(5),
			IoMax:         pulumi.Int(20),
			VswitchId:     pulumi.String(defaultSwitches.Ids[0]),
			SecurityGroup: defaultSecurityGroup.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewInstanceAllowedIpAttachment(ctx, "defaultInstanceAllowedIpAttachment", &alikafka.InstanceAllowedIpAttachmentArgs{
			AllowedIp:   pulumi.String("114.237.9.78/32"),
			AllowedType: pulumi.String("vpc"),
			InstanceId:  defaultInstance.ID(),
			PortRange:   pulumi.String("9092/9092"),
		})
		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

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

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

func (*InstanceAllowedIpAttachment) ElementType() reflect.Type

func (*InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutput

func (i *InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutput() InstanceAllowedIpAttachmentOutput

func (*InstanceAllowedIpAttachment) ToInstanceAllowedIpAttachmentOutputWithContext

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

type InstanceAllowedIpAttachmentArgs

type InstanceAllowedIpAttachmentArgs struct {
	// The allowed ip. It can be a CIDR block.
	AllowedIp pulumi.StringInput
	// The type of whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.
	// - `vpc`: IP address whitelist for VPC access.
	// - `internet`: IP address whitelist for Internet access.
	AllowedType pulumi.StringInput
	// The ID of the instance.
	InstanceId pulumi.StringInput
	// The Port range.  Valid Value: `9092/9092`, `9093/9093`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`.
	// - `9092/9092`: port range for a VPC whitelist.
	// - `9093/9093`: port range for an Internet whitelist.
	PortRange pulumi.StringInput
}

The set of arguments for constructing a InstanceAllowedIpAttachment resource.

func (InstanceAllowedIpAttachmentArgs) ElementType

type InstanceAllowedIpAttachmentArray

type InstanceAllowedIpAttachmentArray []InstanceAllowedIpAttachmentInput

func (InstanceAllowedIpAttachmentArray) ElementType

func (InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutput

func (i InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutput() InstanceAllowedIpAttachmentArrayOutput

func (InstanceAllowedIpAttachmentArray) ToInstanceAllowedIpAttachmentArrayOutputWithContext

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

type InstanceAllowedIpAttachmentArrayInput

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

type InstanceAllowedIpAttachmentArrayOutput struct{ *pulumi.OutputState }

func (InstanceAllowedIpAttachmentArrayOutput) ElementType

func (InstanceAllowedIpAttachmentArrayOutput) Index

func (InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutput

func (o InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutput() InstanceAllowedIpAttachmentArrayOutput

func (InstanceAllowedIpAttachmentArrayOutput) ToInstanceAllowedIpAttachmentArrayOutputWithContext

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

type InstanceAllowedIpAttachmentInput

type InstanceAllowedIpAttachmentInput interface {
	pulumi.Input

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

type InstanceAllowedIpAttachmentMap

type InstanceAllowedIpAttachmentMap map[string]InstanceAllowedIpAttachmentInput

func (InstanceAllowedIpAttachmentMap) ElementType

func (InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutput

func (i InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutput() InstanceAllowedIpAttachmentMapOutput

func (InstanceAllowedIpAttachmentMap) ToInstanceAllowedIpAttachmentMapOutputWithContext

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

type InstanceAllowedIpAttachmentMapInput

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

type InstanceAllowedIpAttachmentMapOutput struct{ *pulumi.OutputState }

func (InstanceAllowedIpAttachmentMapOutput) ElementType

func (InstanceAllowedIpAttachmentMapOutput) MapIndex

func (InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutput

func (o InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutput() InstanceAllowedIpAttachmentMapOutput

func (InstanceAllowedIpAttachmentMapOutput) ToInstanceAllowedIpAttachmentMapOutputWithContext

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

type InstanceAllowedIpAttachmentOutput

type InstanceAllowedIpAttachmentOutput struct{ *pulumi.OutputState }

func (InstanceAllowedIpAttachmentOutput) AllowedIp

The allowed ip. It can be a CIDR block.

func (InstanceAllowedIpAttachmentOutput) AllowedType

The type of whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`. - `vpc`: IP address whitelist for VPC access. - `internet`: IP address whitelist for Internet access.

func (InstanceAllowedIpAttachmentOutput) ElementType

func (InstanceAllowedIpAttachmentOutput) InstanceId

The ID of the instance.

func (InstanceAllowedIpAttachmentOutput) PortRange

The Port range. Valid Value: `9092/9092`, `9093/9093`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`. - `9092/9092`: port range for a VPC whitelist. - `9093/9093`: port range for an Internet whitelist.

func (InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutput

func (o InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutput() InstanceAllowedIpAttachmentOutput

func (InstanceAllowedIpAttachmentOutput) ToInstanceAllowedIpAttachmentOutputWithContext

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

type InstanceAllowedIpAttachmentState

type InstanceAllowedIpAttachmentState struct {
	// The allowed ip. It can be a CIDR block.
	AllowedIp pulumi.StringPtrInput
	// The type of whitelist. Valid Value: `vpc`, `internet`. **NOTE:** From version 1.179.0, `allowedType` can be set to `internet`.
	// - `vpc`: IP address whitelist for VPC access.
	// - `internet`: IP address whitelist for Internet access.
	AllowedType pulumi.StringPtrInput
	// The ID of the instance.
	InstanceId pulumi.StringPtrInput
	// The Port range.  Valid Value: `9092/9092`, `9093/9093`. **NOTE:** From version 1.179.0, `portRange` can be set to `9093/9093`.
	// - `9092/9092`: port range for a VPC whitelist.
	// - `9093/9093`: port range for an Internet whitelist.
	PortRange pulumi.StringPtrInput
}

func (InstanceAllowedIpAttachmentState) ElementType

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.IntInput
	// 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 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 from version 1.194.0 and using `partitionNum` instead.
	//
	// Deprecated: Attribute 'topic_quota' has been deprecated from 1.194.0 and it will be removed in the next future. Using new attribute 'partition_num' 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.
	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

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

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

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

func (o InstanceOutput) DiskType() pulumi.IntOutput

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

func (InstanceOutput) EipMax

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

func (o InstanceOutput) EndPoint() pulumi.StringOutput

The EndPoint to access the kafka instance.

func (InstanceOutput) IoMax

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) KmsKeyId

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

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

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) PartitionNum

func (o InstanceOutput) PartitionNum() pulumi.IntPtrOutput

The number of partitions.

func (InstanceOutput) SecurityGroup

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) ServiceVersion

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

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

func (o InstanceOutput) Status() pulumi.IntOutput

The status of the instance. Valid values: - 0: pending - 1: deploying - 5: running - 15: expired

func (InstanceOutput) Tags

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) TopicQuota deprecated

func (o InstanceOutput) TopicQuota() pulumi.IntOutput

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

Deprecated: Attribute 'topic_quota' has been deprecated from 1.194.0 and it will be removed in the next future. Using new attribute 'partition_num' instead.

func (InstanceOutput) VpcId

The VPC ID of the instance.

func (InstanceOutput) VswitchId

func (o InstanceOutput) VswitchId() pulumi.StringOutput

The ID of attaching vswitch to instance.

func (InstanceOutput) ZoneId

func (o InstanceOutput) ZoneId() pulumi.StringOutput

The zone ID of the instance.

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
	// The max value of io of the instance. When modify this value, it only support adjust to a greater value.
	IoMax 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
	// 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 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. Valid values:
	// - 0: pending
	// - 1: deploying
	// - 5: running
	// - 15: expired
	Status pulumi.IntPtrInput
	// 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 from version 1.194.0 and using `partitionNum` instead.
	//
	// Deprecated: Attribute 'topic_quota' has been deprecated from 1.194.0 and it will be removed in the next future. Using new attribute 'partition_num' instead.
	TopicQuota 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.
	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.

> **NOTE:** Available in 1.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-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/alikafka"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		username := "testusername"
		if param := cfg.Get("username"); param != "" {
			username = param
		}
		password := "testpassword"
		if param := cfg.Get("password"); param != "" {
			password = param
		}
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			PartitionNum: pulumi.Int(50),
			DiskType:     pulumi.Int(1),
			DiskSize:     pulumi.Int(500),
			DeployType:   pulumi.Int(5),
			IoMax:        pulumi.Int(20),
			VswitchId:    defaultSwitch.ID(),
		})
		if err != nil {
			return err
		}
		defaultTopic, err := alikafka.NewTopic(ctx, "defaultTopic", &alikafka.TopicArgs{
			InstanceId: defaultInstance.ID(),
			Topic:      pulumi.String("test-topic"),
			Remark:     pulumi.String("topic-remark"),
		})
		if err != nil {
			return err
		}
		defaultSaslUser, err := alikafka.NewSaslUser(ctx, "defaultSaslUser", &alikafka.SaslUserArgs{
			InstanceId: defaultInstance.ID(),
			Username:   pulumi.String(username),
			Password:   pulumi.String(password),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewSaslAcl(ctx, "defaultSaslAcl", &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

func (o SaslAclOutput) AclOperationType() pulumi.StringOutput

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

func (SaslAclOutput) AclResourceName

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

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

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

The host of the acl.

func (SaslAclOutput) InstanceId

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

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"`
	// Operation password. 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. Valid values: `plain`, `scram`. Default value: `plain`.
	Type pulumi.StringPtrOutput `pulumi:"type"`
	// Username for 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 in 1.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-south-1`,`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 Alikafka sasl user a](https://www.alibabacloud.com/help/en/doc-detail/162221.html)

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/alikafka"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		username := "testusername"
		if param := cfg.Get("username"); param != "" {
			username = param
		}
		password := "testpassword"
		if param := cfg.Get("password"); param != "" {
			password = param
		}
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			PartitionNum: pulumi.Int(50),
			DiskType:     pulumi.Int(1),
			DiskSize:     pulumi.Int(500),
			DeployType:   pulumi.Int(5),
			IoMax:        pulumi.Int(20),
			VswitchId:    defaultSwitch.ID(),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewSaslUser(ctx, "defaultSaslUser", &alikafka.SaslUserArgs{
			InstanceId: defaultInstance.ID(),
			Username:   pulumi.String(username),
			Password:   pulumi.String(password),
		})
		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
	// Operation password. 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. Valid values: `plain`, `scram`. Default value: `plain`.
	Type pulumi.StringPtrInput
	// Username for 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

func (o SaslUserOutput) InstanceId() pulumi.StringOutput

ID of the ALIKAFKA Instance that owns the groups.

func (SaslUserOutput) KmsEncryptedPassword

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

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

func (o SaslUserOutput) Password() pulumi.StringPtrOutput

Operation password. 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

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

func (SaslUserOutput) Username

func (o SaslUserOutput) Username() pulumi.StringOutput

Username for 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
	// Operation password. 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. Valid values: `plain`, `scram`. Default value: `plain`.
	Type pulumi.StringPtrInput
	// Username for 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 64 characters.
	Topic pulumi.StringOutput `pulumi:"topic"`
}

Provides an ALIKAFKA topic resource.

> **NOTE:** Available in 1.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-south-1`,`ap-northeast-1`,`eu-central-1`,`eu-west-1`,`us-west-1`,`us-east-1`]

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/go/alicloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/alikafka"
"github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultZones, err := alicloud.GetZones(ctx, &GetZonesArgs{
			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
		}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
			CidrBlock: pulumi.String("172.16.0.0/12"),
		})
		if err != nil {
			return err
		}
		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
			VpcId:     defaultNetwork.ID(),
			CidrBlock: pulumi.String("172.16.0.0/24"),
			ZoneId:    pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			PartitionNum: pulumi.Int(50),
			DiskType:     pulumi.Int(1),
			DiskSize:     pulumi.Int(500),
			DeployType:   pulumi.Int(5),
			IoMax:        pulumi.Int(20),
			VswitchId:    defaultSwitch.ID(),
		})
		if err != nil {
			return err
		}
		cfg := config.New(ctx, "")
		topic := "alikafkaTopicName"
		if param := cfg.Get("topic"); param != "" {
			topic = param
		}
		_, err = alikafka.NewTopic(ctx, "defaultTopic", &alikafka.TopicArgs{
			InstanceId:   defaultInstance.ID(),
			Topic:        pulumi.String(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

### Timeouts The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration-0-11/resources.html#timeouts) for certain actions* `create` - (Defaults to 10 mins) Used when creating the topic (until it reaches the initial `Running` status).

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

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

func (o TopicOutput) InstanceId() pulumi.StringOutput

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

func (TopicOutput) LocalTopic

func (o TopicOutput) LocalTopic() pulumi.BoolPtrOutput

Whether the topic is localTopic or not.

func (TopicOutput) PartitionNum

func (o TopicOutput) PartitionNum() pulumi.IntPtrOutput

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

func (TopicOutput) Remark

func (o TopicOutput) Remark() pulumi.StringOutput

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

func (TopicOutput) Tags

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

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