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"
)
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{ AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id), CidrBlock: pulumi.String("172.16.0.0/24"), VpcId: defaultNetwork.ID(), }) if err != nil { return err } defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{ DeployType: pulumi.Int(5), DiskSize: pulumi.Int(500), DiskType: pulumi.Int(1), IoMax: pulumi.Int(20), TopicQuota: pulumi.Int(50), 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 }) }
```
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.
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 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 // 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 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"` // 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:** ALIKAFKA instance resource only support create post pay instance. Creation or modification may took about 10-40 minutes.
> **NOTE:** Only the following regions support create alikafka pre paid instance. [`cn-hangzhou`,`cn-beijing`,`cn-shenzhen`,`cn-shanghai`,`cn-qingdao`,`cn-hongkong`,`cn-huhehaote`,`cn-zhangjiakou`,`ap-southeast-1`,`ap-south-1`,`ap-southeast-5`]
> **NOTE:** Only the following regions support create alikafka post paid instance. [`cn-hangzhou`,`cn-beijing`,`cn-shenzhen`,`cn-shanghai`,`cn-qingdao`,`cn-hongkong`,`cn-huhehaote`,`cn-zhangjiakou`,`ap-southeast-1`] ## Example Usage
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"
)
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{ AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id), CidrBlock: pulumi.String("172.16.0.0/24"), VpcId: defaultNetwork.ID(), }) if err != nil { return err } _, err = alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{ DeployType: pulumi.Int(4), DiskSize: pulumi.Int(500), DiskType: pulumi.Int(1), IoMax: pulumi.Int(20), TopicQuota: pulumi.Int(50), VswitchId: defaultSwitch.ID(), }) if err != nil { return err } return nil }) }
```
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.
type InstanceArgs ¶
type InstanceArgs struct { // 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 // 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 InstanceState ¶
type InstanceState struct { // 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 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 // 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"
)
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{ AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id), CidrBlock: pulumi.String("172.16.0.0/24"), VpcId: defaultNetwork.ID(), }) if err != nil { return err } defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{ DeployType: pulumi.Int(5), DiskSize: pulumi.Int(500), DiskType: pulumi.Int(1), IoMax: pulumi.Int(20), TopicQuota: pulumi.Int(50), VswitchId: defaultSwitch.ID(), }) if err != nil { return err } defaultTopic, err := alikafka.NewTopic(ctx, "defaultTopic", &alikafka.TopicArgs{ InstanceId: defaultInstance.ID(), Remark: pulumi.String("topic-remark"), Topic: pulumi.String("test-topic"), }) if err != nil { return err } defaultSaslUser, err := alikafka.NewSaslUser(ctx, "defaultSaslUser", &alikafka.SaslUserArgs{ InstanceId: defaultInstance.ID(), Password: pulumi.String(password), Username: pulumi.String(username), }) if err != nil { return err } _, err = alikafka.NewSaslAcl(ctx, "defaultSaslAcl", &alikafka.SaslAclArgs{ AclOperationType: pulumi.String("Write"), AclResourceName: defaultTopic.Topic, AclResourcePatternType: pulumi.String("LITERAL"), AclResourceType: pulumi.String("Topic"), InstanceId: defaultInstance.ID(), Username: defaultSaslUser.Username, }) if err != nil { return err } return nil }) }
```
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.
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 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"
)
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{ AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id), CidrBlock: pulumi.String("172.16.0.0/24"), VpcId: defaultNetwork.ID(), }) if err != nil { return err } defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{ DeployType: pulumi.Int(5), DiskSize: pulumi.Int(500), DiskType: pulumi.Int(1), IoMax: pulumi.Int(20), TopicQuota: pulumi.Int(50), VswitchId: defaultSwitch.ID(), }) if err != nil { return err } _, err = alikafka.NewSaslUser(ctx, "defaultSaslUser", &alikafka.SaslUserArgs{ InstanceId: defaultInstance.ID(), Password: pulumi.String(password), Username: pulumi.String(username), }) if err != nil { return err } return nil }) }
```
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.
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 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"
)
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{ AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id), CidrBlock: pulumi.String("172.16.0.0/24"), VpcId: defaultNetwork.ID(), }) if err != nil { return err } defaultInstance, err := alikafka.NewInstance(ctx, "defaultInstance", &alikafka.InstanceArgs{ DeployType: pulumi.Int(5), DiskSize: pulumi.Int(500), DiskType: pulumi.Int(1), IoMax: pulumi.Int(20), TopicQuota: pulumi.Int(50), VswitchId: defaultSwitch.ID(), }) if err != nil { return err } _, err = alikafka.NewTopic(ctx, "defaultTopic", &alikafka.TopicArgs{ CompactTopic: pulumi.Bool(false), InstanceId: defaultInstance.ID(), LocalTopic: pulumi.Bool(false), PartitionNum: pulumi.Int(12), Remark: pulumi.String("dafault_kafka_topic_remark"), Topic: pulumi.String(topic), }) if err != nil { return err } return nil }) }
```
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).
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 ¶
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