alikafka

package
v2.35.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 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"`
	// 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`,`ap-southeast-1`,`ap-south-1`,`ap-southeast-5`]

## Example Usage

Basic Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		consumerId := "CID-alikafkaGroupDatasourceName"
		if param := cfg.Get("consumerId"); param != "" {
			consumerId = param
		}
		opt0 := "VSwitch"
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: &opt0,
		}, 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"),
			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			TopicQuota: 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 added in v2.25.1

func (*ConsumerGroup) ElementType() reflect.Type

func (*ConsumerGroup) ToConsumerGroupOutput added in v2.25.1

func (i *ConsumerGroup) ToConsumerGroupOutput() ConsumerGroupOutput

func (*ConsumerGroup) ToConsumerGroupOutputWithContext added in v2.25.1

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

func (*ConsumerGroup) ToConsumerGroupPtrOutput added in v2.35.1

func (i *ConsumerGroup) ToConsumerGroupPtrOutput() ConsumerGroupPtrOutput

func (*ConsumerGroup) ToConsumerGroupPtrOutputWithContext added in v2.35.1

func (i *ConsumerGroup) ToConsumerGroupPtrOutputWithContext(ctx context.Context) ConsumerGroupPtrOutput

type ConsumerGroupArgs

type ConsumerGroupArgs struct {
	// ID of the consumer group. The length cannot exceed 64 characters.
	ConsumerId pulumi.StringInput
	// 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 added in v2.35.1

type ConsumerGroupArray []ConsumerGroupInput

func (ConsumerGroupArray) ElementType added in v2.35.1

func (ConsumerGroupArray) ElementType() reflect.Type

func (ConsumerGroupArray) ToConsumerGroupArrayOutput added in v2.35.1

func (i ConsumerGroupArray) ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput

func (ConsumerGroupArray) ToConsumerGroupArrayOutputWithContext added in v2.35.1

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

type ConsumerGroupArrayInput added in v2.35.1

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 added in v2.35.1

type ConsumerGroupArrayOutput struct{ *pulumi.OutputState }

func (ConsumerGroupArrayOutput) ElementType added in v2.35.1

func (ConsumerGroupArrayOutput) ElementType() reflect.Type

func (ConsumerGroupArrayOutput) Index added in v2.35.1

func (ConsumerGroupArrayOutput) ToConsumerGroupArrayOutput added in v2.35.1

func (o ConsumerGroupArrayOutput) ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput

func (ConsumerGroupArrayOutput) ToConsumerGroupArrayOutputWithContext added in v2.35.1

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

type ConsumerGroupInput added in v2.25.1

type ConsumerGroupInput interface {
	pulumi.Input

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

type ConsumerGroupMap added in v2.35.1

type ConsumerGroupMap map[string]ConsumerGroupInput

func (ConsumerGroupMap) ElementType added in v2.35.1

func (ConsumerGroupMap) ElementType() reflect.Type

func (ConsumerGroupMap) ToConsumerGroupMapOutput added in v2.35.1

func (i ConsumerGroupMap) ToConsumerGroupMapOutput() ConsumerGroupMapOutput

func (ConsumerGroupMap) ToConsumerGroupMapOutputWithContext added in v2.35.1

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

type ConsumerGroupMapInput added in v2.35.1

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 added in v2.35.1

type ConsumerGroupMapOutput struct{ *pulumi.OutputState }

func (ConsumerGroupMapOutput) ElementType added in v2.35.1

func (ConsumerGroupMapOutput) ElementType() reflect.Type

func (ConsumerGroupMapOutput) MapIndex added in v2.35.1

func (ConsumerGroupMapOutput) ToConsumerGroupMapOutput added in v2.35.1

func (o ConsumerGroupMapOutput) ToConsumerGroupMapOutput() ConsumerGroupMapOutput

func (ConsumerGroupMapOutput) ToConsumerGroupMapOutputWithContext added in v2.35.1

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

type ConsumerGroupOutput added in v2.25.1

type ConsumerGroupOutput struct {
	*pulumi.OutputState
}

func (ConsumerGroupOutput) ElementType added in v2.25.1

func (ConsumerGroupOutput) ElementType() reflect.Type

func (ConsumerGroupOutput) ToConsumerGroupOutput added in v2.25.1

func (o ConsumerGroupOutput) ToConsumerGroupOutput() ConsumerGroupOutput

func (ConsumerGroupOutput) ToConsumerGroupOutputWithContext added in v2.25.1

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

func (ConsumerGroupOutput) ToConsumerGroupPtrOutput added in v2.35.1

func (o ConsumerGroupOutput) ToConsumerGroupPtrOutput() ConsumerGroupPtrOutput

func (ConsumerGroupOutput) ToConsumerGroupPtrOutputWithContext added in v2.35.1

func (o ConsumerGroupOutput) ToConsumerGroupPtrOutputWithContext(ctx context.Context) ConsumerGroupPtrOutput

type ConsumerGroupPtrInput added in v2.35.1

type ConsumerGroupPtrInput interface {
	pulumi.Input

	ToConsumerGroupPtrOutput() ConsumerGroupPtrOutput
	ToConsumerGroupPtrOutputWithContext(ctx context.Context) ConsumerGroupPtrOutput
}

type ConsumerGroupPtrOutput added in v2.35.1

type ConsumerGroupPtrOutput struct {
	*pulumi.OutputState
}

func (ConsumerGroupPtrOutput) ElementType added in v2.35.1

func (ConsumerGroupPtrOutput) ElementType() reflect.Type

func (ConsumerGroupPtrOutput) ToConsumerGroupPtrOutput added in v2.35.1

func (o ConsumerGroupPtrOutput) ToConsumerGroupPtrOutput() ConsumerGroupPtrOutput

func (ConsumerGroupPtrOutput) ToConsumerGroupPtrOutputWithContext added in v2.35.1

func (o ConsumerGroupPtrOutput) ToConsumerGroupPtrOutputWithContext(ctx context.Context) ConsumerGroupPtrOutput

type ConsumerGroupState

type ConsumerGroupState struct {
	// ID of the consumer group. The length cannot exceed 64 characters.
	ConsumerId 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

	// (Optional, Available in v1.112.0+) 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 deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.
	DeployType pulumi.IntOutput `pulumi:"deployType"`
	// The disk size of the instance. When modify this value, it only support 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. When modify this value, it only support adjust to a greater value.
	EipMax pulumi.IntPtrOutput `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"`
	// 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"`
	// (Optional, ForceNew, Available in v1.93.0+) The ID of security group for this instance. If the security group is empty, system will create a default one.
	SecurityGroup pulumi.StringPtrOutput `pulumi:"securityGroup"`
	// (Optional, Available in v1.112.0+) 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"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.MapOutput `pulumi:"tags"`
	// The max num of topic can be create of the instance. When modify this value, it only adjust to a greater value.
	TopicQuota pulumi.IntOutput `pulumi:"topicQuota"`
	// The ID of attaching VPC to instance.
	VpcId pulumi.StringOutput `pulumi:"vpcId"`
	// The ID of attaching vswitch to instance.
	VswitchId pulumi.StringOutput `pulumi:"vswitchId"`
	// The Zone to launch the kafka 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(International account is not support to buy post paid instance currently). [`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-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/v2/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/alikafka"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi/config"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		instanceName := "alikafkaInstanceName"
		if param := cfg.Get("instanceName"); param != "" {
			instanceName = param
		}
		opt0 := "VSwitch"
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: &opt0,
		}, 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"),
			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		_, err = alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			TopicQuota: pulumi.Int(50),
			DiskType:   pulumi.Int(1),
			DiskSize:   pulumi.Int(500),
			DeployType: pulumi.Int(4),
			IoMax:      pulumi.Int(20),
			VswitchId:  defaultSwitch.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 added in v2.25.1

func (*Instance) ElementType() reflect.Type

func (*Instance) ToInstanceOutput added in v2.25.1

func (i *Instance) ToInstanceOutput() InstanceOutput

func (*Instance) ToInstanceOutputWithContext added in v2.25.1

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

func (*Instance) ToInstancePtrOutput added in v2.35.1

func (i *Instance) ToInstancePtrOutput() InstancePtrOutput

func (*Instance) ToInstancePtrOutputWithContext added in v2.35.1

func (i *Instance) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput

type InstanceArgs

type InstanceArgs struct {
	// (Optional, Available in v1.112.0+) 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 deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.
	DeployType pulumi.IntInput
	// The disk size of the instance. When modify this value, it only support 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. When modify this value, it only support 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
	// 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
	// (Optional, ForceNew, Available in v1.93.0+) The ID of security group for this instance. If the security group is empty, system will create a default one.
	SecurityGroup pulumi.StringPtrInput
	// (Optional, Available in v1.112.0+) 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 create of the instance. When modify this value, it only adjust to a greater value.
	TopicQuota pulumi.IntInput
	// The ID of attaching vswitch to instance.
	VswitchId pulumi.StringInput
}

The set of arguments for constructing a Instance resource.

func (InstanceArgs) ElementType

func (InstanceArgs) ElementType() reflect.Type

type InstanceArray added in v2.35.1

type InstanceArray []InstanceInput

func (InstanceArray) ElementType added in v2.35.1

func (InstanceArray) ElementType() reflect.Type

func (InstanceArray) ToInstanceArrayOutput added in v2.35.1

func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArray) ToInstanceArrayOutputWithContext added in v2.35.1

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

type InstanceArrayInput added in v2.35.1

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 added in v2.35.1

type InstanceArrayOutput struct{ *pulumi.OutputState }

func (InstanceArrayOutput) ElementType added in v2.35.1

func (InstanceArrayOutput) ElementType() reflect.Type

func (InstanceArrayOutput) Index added in v2.35.1

func (InstanceArrayOutput) ToInstanceArrayOutput added in v2.35.1

func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput

func (InstanceArrayOutput) ToInstanceArrayOutputWithContext added in v2.35.1

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

type InstanceInput added in v2.25.1

type InstanceInput interface {
	pulumi.Input

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

type InstanceMap added in v2.35.1

type InstanceMap map[string]InstanceInput

func (InstanceMap) ElementType added in v2.35.1

func (InstanceMap) ElementType() reflect.Type

func (InstanceMap) ToInstanceMapOutput added in v2.35.1

func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMap) ToInstanceMapOutputWithContext added in v2.35.1

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

type InstanceMapInput added in v2.35.1

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 added in v2.35.1

type InstanceMapOutput struct{ *pulumi.OutputState }

func (InstanceMapOutput) ElementType added in v2.35.1

func (InstanceMapOutput) ElementType() reflect.Type

func (InstanceMapOutput) MapIndex added in v2.35.1

func (InstanceMapOutput) ToInstanceMapOutput added in v2.35.1

func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput

func (InstanceMapOutput) ToInstanceMapOutputWithContext added in v2.35.1

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

type InstanceOutput added in v2.25.1

type InstanceOutput struct {
	*pulumi.OutputState
}

func (InstanceOutput) ElementType added in v2.25.1

func (InstanceOutput) ElementType() reflect.Type

func (InstanceOutput) ToInstanceOutput added in v2.25.1

func (o InstanceOutput) ToInstanceOutput() InstanceOutput

func (InstanceOutput) ToInstanceOutputWithContext added in v2.25.1

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

func (InstanceOutput) ToInstancePtrOutput added in v2.35.1

func (o InstanceOutput) ToInstancePtrOutput() InstancePtrOutput

func (InstanceOutput) ToInstancePtrOutputWithContext added in v2.35.1

func (o InstanceOutput) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput

type InstancePtrInput added in v2.35.1

type InstancePtrInput interface {
	pulumi.Input

	ToInstancePtrOutput() InstancePtrOutput
	ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput
}

type InstancePtrOutput added in v2.35.1

type InstancePtrOutput struct {
	*pulumi.OutputState
}

func (InstancePtrOutput) ElementType added in v2.35.1

func (InstancePtrOutput) ElementType() reflect.Type

func (InstancePtrOutput) ToInstancePtrOutput added in v2.35.1

func (o InstancePtrOutput) ToInstancePtrOutput() InstancePtrOutput

func (InstancePtrOutput) ToInstancePtrOutputWithContext added in v2.35.1

func (o InstancePtrOutput) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput

type InstanceState

type InstanceState struct {
	// (Optional, Available in v1.112.0+) 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 deploy type of the instance. Currently only support two deploy type, 4: eip/vpc instance, 5: vpc instance.
	DeployType pulumi.IntPtrInput
	// The disk size of the instance. When modify this value, it only support 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. When modify this value, it only support 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
	// 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
	// (Optional, ForceNew, Available in v1.93.0+) The ID of security group for this instance. If the security group is empty, system will create a default one.
	SecurityGroup pulumi.StringPtrInput
	// (Optional, Available in v1.112.0+) 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 create of the instance. When modify this value, it only adjust to a greater value.
	TopicQuota pulumi.IntPtrInput
	// The ID of attaching VPC to instance.
	VpcId pulumi.StringPtrInput
	// The ID of attaching vswitch to instance.
	VswitchId pulumi.StringPtrInput
	// The Zone to launch the kafka 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`,`ap-southeast-1`,`ap-south-1`,`ap-southeast-5`]

## Example Usage

Basic Usage

```go package main

import (

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

)

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
		}
		opt0 := "VSwitch"
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: &opt0,
		}, 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"),
			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			TopicQuota: 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 added in v2.25.1

func (*SaslAcl) ElementType() reflect.Type

func (*SaslAcl) ToSaslAclOutput added in v2.25.1

func (i *SaslAcl) ToSaslAclOutput() SaslAclOutput

func (*SaslAcl) ToSaslAclOutputWithContext added in v2.25.1

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

func (*SaslAcl) ToSaslAclPtrOutput added in v2.35.1

func (i *SaslAcl) ToSaslAclPtrOutput() SaslAclPtrOutput

func (*SaslAcl) ToSaslAclPtrOutputWithContext added in v2.35.1

func (i *SaslAcl) ToSaslAclPtrOutputWithContext(ctx context.Context) SaslAclPtrOutput

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 added in v2.35.1

type SaslAclArray []SaslAclInput

func (SaslAclArray) ElementType added in v2.35.1

func (SaslAclArray) ElementType() reflect.Type

func (SaslAclArray) ToSaslAclArrayOutput added in v2.35.1

func (i SaslAclArray) ToSaslAclArrayOutput() SaslAclArrayOutput

func (SaslAclArray) ToSaslAclArrayOutputWithContext added in v2.35.1

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

type SaslAclArrayInput added in v2.35.1

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 added in v2.35.1

type SaslAclArrayOutput struct{ *pulumi.OutputState }

func (SaslAclArrayOutput) ElementType added in v2.35.1

func (SaslAclArrayOutput) ElementType() reflect.Type

func (SaslAclArrayOutput) Index added in v2.35.1

func (SaslAclArrayOutput) ToSaslAclArrayOutput added in v2.35.1

func (o SaslAclArrayOutput) ToSaslAclArrayOutput() SaslAclArrayOutput

func (SaslAclArrayOutput) ToSaslAclArrayOutputWithContext added in v2.35.1

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

type SaslAclInput added in v2.25.1

type SaslAclInput interface {
	pulumi.Input

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

type SaslAclMap added in v2.35.1

type SaslAclMap map[string]SaslAclInput

func (SaslAclMap) ElementType added in v2.35.1

func (SaslAclMap) ElementType() reflect.Type

func (SaslAclMap) ToSaslAclMapOutput added in v2.35.1

func (i SaslAclMap) ToSaslAclMapOutput() SaslAclMapOutput

func (SaslAclMap) ToSaslAclMapOutputWithContext added in v2.35.1

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

type SaslAclMapInput added in v2.35.1

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 added in v2.35.1

type SaslAclMapOutput struct{ *pulumi.OutputState }

func (SaslAclMapOutput) ElementType added in v2.35.1

func (SaslAclMapOutput) ElementType() reflect.Type

func (SaslAclMapOutput) MapIndex added in v2.35.1

func (SaslAclMapOutput) ToSaslAclMapOutput added in v2.35.1

func (o SaslAclMapOutput) ToSaslAclMapOutput() SaslAclMapOutput

func (SaslAclMapOutput) ToSaslAclMapOutputWithContext added in v2.35.1

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

type SaslAclOutput added in v2.25.1

type SaslAclOutput struct {
	*pulumi.OutputState
}

func (SaslAclOutput) ElementType added in v2.25.1

func (SaslAclOutput) ElementType() reflect.Type

func (SaslAclOutput) ToSaslAclOutput added in v2.25.1

func (o SaslAclOutput) ToSaslAclOutput() SaslAclOutput

func (SaslAclOutput) ToSaslAclOutputWithContext added in v2.25.1

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

func (SaslAclOutput) ToSaslAclPtrOutput added in v2.35.1

func (o SaslAclOutput) ToSaslAclPtrOutput() SaslAclPtrOutput

func (SaslAclOutput) ToSaslAclPtrOutputWithContext added in v2.35.1

func (o SaslAclOutput) ToSaslAclPtrOutputWithContext(ctx context.Context) SaslAclPtrOutput

type SaslAclPtrInput added in v2.35.1

type SaslAclPtrInput interface {
	pulumi.Input

	ToSaslAclPtrOutput() SaslAclPtrOutput
	ToSaslAclPtrOutputWithContext(ctx context.Context) SaslAclPtrOutput
}

type SaslAclPtrOutput added in v2.35.1

type SaslAclPtrOutput struct {
	*pulumi.OutputState
}

func (SaslAclPtrOutput) ElementType added in v2.35.1

func (SaslAclPtrOutput) ElementType() reflect.Type

func (SaslAclPtrOutput) ToSaslAclPtrOutput added in v2.35.1

func (o SaslAclPtrOutput) ToSaslAclPtrOutput() SaslAclPtrOutput

func (SaslAclPtrOutput) ToSaslAclPtrOutputWithContext added in v2.35.1

func (o SaslAclPtrOutput) ToSaslAclPtrOutputWithContext(ctx context.Context) SaslAclPtrOutput

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"`
	// 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`,`ap-southeast-1`,`ap-south-1`,`ap-southeast-5`]

## Example Usage

Basic Usage

```go package main

import (

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

)

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
		}
		opt0 := "VSwitch"
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: &opt0,
		}, 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"),
			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			TopicQuota: 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 GROUP can be imported using the id, e.g.

```sh

$ pulumi import alicloud:alikafka/saslUser:SaslUser user alikafka_post-cn-123455abc: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 added in v2.25.1

func (*SaslUser) ElementType() reflect.Type

func (*SaslUser) ToSaslUserOutput added in v2.25.1

func (i *SaslUser) ToSaslUserOutput() SaslUserOutput

func (*SaslUser) ToSaslUserOutputWithContext added in v2.25.1

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

func (*SaslUser) ToSaslUserPtrOutput added in v2.35.1

func (i *SaslUser) ToSaslUserPtrOutput() SaslUserPtrOutput

func (*SaslUser) ToSaslUserPtrOutputWithContext added in v2.35.1

func (i *SaslUser) ToSaslUserPtrOutputWithContext(ctx context.Context) SaslUserPtrOutput

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
	// 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 added in v2.35.1

type SaslUserArray []SaslUserInput

func (SaslUserArray) ElementType added in v2.35.1

func (SaslUserArray) ElementType() reflect.Type

func (SaslUserArray) ToSaslUserArrayOutput added in v2.35.1

func (i SaslUserArray) ToSaslUserArrayOutput() SaslUserArrayOutput

func (SaslUserArray) ToSaslUserArrayOutputWithContext added in v2.35.1

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

type SaslUserArrayInput added in v2.35.1

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 added in v2.35.1

type SaslUserArrayOutput struct{ *pulumi.OutputState }

func (SaslUserArrayOutput) ElementType added in v2.35.1

func (SaslUserArrayOutput) ElementType() reflect.Type

func (SaslUserArrayOutput) Index added in v2.35.1

func (SaslUserArrayOutput) ToSaslUserArrayOutput added in v2.35.1

func (o SaslUserArrayOutput) ToSaslUserArrayOutput() SaslUserArrayOutput

func (SaslUserArrayOutput) ToSaslUserArrayOutputWithContext added in v2.35.1

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

type SaslUserInput added in v2.25.1

type SaslUserInput interface {
	pulumi.Input

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

type SaslUserMap added in v2.35.1

type SaslUserMap map[string]SaslUserInput

func (SaslUserMap) ElementType added in v2.35.1

func (SaslUserMap) ElementType() reflect.Type

func (SaslUserMap) ToSaslUserMapOutput added in v2.35.1

func (i SaslUserMap) ToSaslUserMapOutput() SaslUserMapOutput

func (SaslUserMap) ToSaslUserMapOutputWithContext added in v2.35.1

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

type SaslUserMapInput added in v2.35.1

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 added in v2.35.1

type SaslUserMapOutput struct{ *pulumi.OutputState }

func (SaslUserMapOutput) ElementType added in v2.35.1

func (SaslUserMapOutput) ElementType() reflect.Type

func (SaslUserMapOutput) MapIndex added in v2.35.1

func (SaslUserMapOutput) ToSaslUserMapOutput added in v2.35.1

func (o SaslUserMapOutput) ToSaslUserMapOutput() SaslUserMapOutput

func (SaslUserMapOutput) ToSaslUserMapOutputWithContext added in v2.35.1

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

type SaslUserOutput added in v2.25.1

type SaslUserOutput struct {
	*pulumi.OutputState
}

func (SaslUserOutput) ElementType added in v2.25.1

func (SaslUserOutput) ElementType() reflect.Type

func (SaslUserOutput) ToSaslUserOutput added in v2.25.1

func (o SaslUserOutput) ToSaslUserOutput() SaslUserOutput

func (SaslUserOutput) ToSaslUserOutputWithContext added in v2.25.1

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

func (SaslUserOutput) ToSaslUserPtrOutput added in v2.35.1

func (o SaslUserOutput) ToSaslUserPtrOutput() SaslUserPtrOutput

func (SaslUserOutput) ToSaslUserPtrOutputWithContext added in v2.35.1

func (o SaslUserOutput) ToSaslUserPtrOutputWithContext(ctx context.Context) SaslUserPtrOutput

type SaslUserPtrInput added in v2.35.1

type SaslUserPtrInput interface {
	pulumi.Input

	ToSaslUserPtrOutput() SaslUserPtrOutput
	ToSaslUserPtrOutputWithContext(ctx context.Context) SaslUserPtrOutput
}

type SaslUserPtrOutput added in v2.35.1

type SaslUserPtrOutput struct {
	*pulumi.OutputState
}

func (SaslUserPtrOutput) ElementType added in v2.35.1

func (SaslUserPtrOutput) ElementType() reflect.Type

func (SaslUserPtrOutput) ToSaslUserPtrOutput added in v2.35.1

func (o SaslUserPtrOutput) ToSaslUserPtrOutput() SaslUserPtrOutput

func (SaslUserPtrOutput) ToSaslUserPtrOutputWithContext added in v2.35.1

func (o SaslUserPtrOutput) ToSaslUserPtrOutputWithContext(ctx context.Context) SaslUserPtrOutput

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
	// 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`,`ap-southeast-1`,`ap-south-1`,`ap-southeast-5`]

## Example Usage

Basic Usage

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "VSwitch"
		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
			AvailableResourceCreation: &opt0,
		}, 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"),
			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{
			TopicQuota: 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

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 added in v2.25.1

func (*Topic) ElementType() reflect.Type

func (*Topic) ToTopicOutput added in v2.25.1

func (i *Topic) ToTopicOutput() TopicOutput

func (*Topic) ToTopicOutputWithContext added in v2.25.1

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

func (*Topic) ToTopicPtrOutput added in v2.35.1

func (i *Topic) ToTopicPtrOutput() TopicPtrOutput

func (*Topic) ToTopicPtrOutputWithContext added in v2.35.1

func (i *Topic) ToTopicPtrOutputWithContext(ctx context.Context) TopicPtrOutput

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 added in v2.35.1

type TopicArray []TopicInput

func (TopicArray) ElementType added in v2.35.1

func (TopicArray) ElementType() reflect.Type

func (TopicArray) ToTopicArrayOutput added in v2.35.1

func (i TopicArray) ToTopicArrayOutput() TopicArrayOutput

func (TopicArray) ToTopicArrayOutputWithContext added in v2.35.1

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

type TopicArrayInput added in v2.35.1

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 added in v2.35.1

type TopicArrayOutput struct{ *pulumi.OutputState }

func (TopicArrayOutput) ElementType added in v2.35.1

func (TopicArrayOutput) ElementType() reflect.Type

func (TopicArrayOutput) Index added in v2.35.1

func (TopicArrayOutput) ToTopicArrayOutput added in v2.35.1

func (o TopicArrayOutput) ToTopicArrayOutput() TopicArrayOutput

func (TopicArrayOutput) ToTopicArrayOutputWithContext added in v2.35.1

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

type TopicInput added in v2.25.1

type TopicInput interface {
	pulumi.Input

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

type TopicMap added in v2.35.1

type TopicMap map[string]TopicInput

func (TopicMap) ElementType added in v2.35.1

func (TopicMap) ElementType() reflect.Type

func (TopicMap) ToTopicMapOutput added in v2.35.1

func (i TopicMap) ToTopicMapOutput() TopicMapOutput

func (TopicMap) ToTopicMapOutputWithContext added in v2.35.1

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

type TopicMapInput added in v2.35.1

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 added in v2.35.1

type TopicMapOutput struct{ *pulumi.OutputState }

func (TopicMapOutput) ElementType added in v2.35.1

func (TopicMapOutput) ElementType() reflect.Type

func (TopicMapOutput) MapIndex added in v2.35.1

func (TopicMapOutput) ToTopicMapOutput added in v2.35.1

func (o TopicMapOutput) ToTopicMapOutput() TopicMapOutput

func (TopicMapOutput) ToTopicMapOutputWithContext added in v2.35.1

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

type TopicOutput added in v2.25.1

type TopicOutput struct {
	*pulumi.OutputState
}

func (TopicOutput) ElementType added in v2.25.1

func (TopicOutput) ElementType() reflect.Type

func (TopicOutput) ToTopicOutput added in v2.25.1

func (o TopicOutput) ToTopicOutput() TopicOutput

func (TopicOutput) ToTopicOutputWithContext added in v2.25.1

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

func (TopicOutput) ToTopicPtrOutput added in v2.35.1

func (o TopicOutput) ToTopicPtrOutput() TopicPtrOutput

func (TopicOutput) ToTopicPtrOutputWithContext added in v2.35.1

func (o TopicOutput) ToTopicPtrOutputWithContext(ctx context.Context) TopicPtrOutput

type TopicPtrInput added in v2.35.1

type TopicPtrInput interface {
	pulumi.Input

	ToTopicPtrOutput() TopicPtrOutput
	ToTopicPtrOutputWithContext(ctx context.Context) TopicPtrOutput
}

type TopicPtrOutput added in v2.35.1

type TopicPtrOutput struct {
	*pulumi.OutputState
}

func (TopicPtrOutput) ElementType added in v2.35.1

func (TopicPtrOutput) ElementType() reflect.Type

func (TopicPtrOutput) ToTopicPtrOutput added in v2.35.1

func (o TopicPtrOutput) ToTopicPtrOutput() TopicPtrOutput

func (TopicPtrOutput) ToTopicPtrOutputWithContext added in v2.35.1

func (o TopicPtrOutput) ToTopicPtrOutputWithContext(ctx context.Context) TopicPtrOutput

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