1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. alikafka
  5. Topic
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.alikafka.Topic

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides an ALIKAFKA topic resource, see What is Alikafka topic .

    NOTE: Available since v1.56.0.

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

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const instanceName = config.get("instanceName") || "tf-example";
    const default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultNetwork = new alicloud.vpc.Network("default", {cidrBlock: "172.16.0.0/12"});
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vpcId: defaultNetwork.id,
        cidrBlock: "172.16.0.0/24",
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {vpcId: defaultNetwork.id});
    const defaultInstance = new alicloud.alikafka.Instance("default", {
        name: `${instanceName}-${defaultInteger.result}`,
        partitionNum: 50,
        diskType: 1,
        diskSize: 500,
        deployType: 5,
        ioMax: 20,
        vswitchId: defaultSwitch.id,
        securityGroup: defaultSecurityGroup.id,
    });
    const defaultTopic = new alicloud.alikafka.Topic("default", {
        instanceId: defaultInstance.id,
        topic: "example-topic",
        localTopic: false,
        compactTopic: false,
        partitionNum: 12,
        remark: "dafault_kafka_topic_remark",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    instance_name = config.get("instanceName")
    if instance_name is None:
        instance_name = "tf-example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    default_network = alicloud.vpc.Network("default", cidr_block="172.16.0.0/12")
    default_switch = alicloud.vpc.Switch("default",
        vpc_id=default_network.id,
        cidr_block="172.16.0.0/24",
        zone_id=default.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default", vpc_id=default_network.id)
    default_instance = alicloud.alikafka.Instance("default",
        name=f"{instance_name}-{default_integer['result']}",
        partition_num=50,
        disk_type=1,
        disk_size=500,
        deploy_type=5,
        io_max=20,
        vswitch_id=default_switch.id,
        security_group=default_security_group.id)
    default_topic = alicloud.alikafka.Topic("default",
        instance_id=default_instance.id,
        topic="example-topic",
        local_topic=False,
        compact_topic=False,
        partition_num=12,
        remark="dafault_kafka_topic_remark")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alikafka"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		instanceName := "tf-example"
    		if param := cfg.Get("instanceName"); param != "" {
    			instanceName = param
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			CidrBlock: pulumi.String("172.16.0.0/12"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VpcId:     defaultNetwork.ID(),
    			CidrBlock: pulumi.String("172.16.0.0/24"),
    			ZoneId:    pulumi.String(_default.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := alikafka.NewInstance(ctx, "default", &alikafka.InstanceArgs{
    			Name:          pulumi.String(fmt.Sprintf("%v-%v", instanceName, defaultInteger.Result)),
    			PartitionNum:  pulumi.Int(50),
    			DiskType:      pulumi.Int(1),
    			DiskSize:      pulumi.Int(500),
    			DeployType:    pulumi.Int(5),
    			IoMax:         pulumi.Int(20),
    			VswitchId:     defaultSwitch.ID(),
    			SecurityGroup: defaultSecurityGroup.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = alikafka.NewTopic(ctx, "default", &alikafka.TopicArgs{
    			InstanceId:   defaultInstance.ID(),
    			Topic:        pulumi.String("example-topic"),
    			LocalTopic:   pulumi.Bool(false),
    			CompactTopic: pulumi.Bool(false),
    			PartitionNum: pulumi.Int(12),
    			Remark:       pulumi.String("dafault_kafka_topic_remark"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var instanceName = config.Get("instanceName") ?? "tf-example";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            CidrBlock = "172.16.0.0/12",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = "172.16.0.0/24",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.AliKafka.Instance("default", new()
        {
            Name = $"{instanceName}-{defaultInteger.Result}",
            PartitionNum = 50,
            DiskType = 1,
            DiskSize = 500,
            DeployType = 5,
            IoMax = 20,
            VswitchId = defaultSwitch.Id,
            SecurityGroup = defaultSecurityGroup.Id,
        });
    
        var defaultTopic = new AliCloud.AliKafka.Topic("default", new()
        {
            InstanceId = defaultInstance.Id,
            TopicName = "example-topic",
            LocalTopic = false,
            CompactTopic = false,
            PartitionNum = 12,
            Remark = "dafault_kafka_topic_remark",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.alikafka.Instance;
    import com.pulumi.alicloud.alikafka.InstanceArgs;
    import com.pulumi.alicloud.alikafka.Topic;
    import com.pulumi.alicloud.alikafka.TopicArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var instanceName = config.get("instanceName").orElse("tf-example");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .cidrBlock("172.16.0.0/12")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock("172.16.0.0/24")
                .zoneId(default_.zones()[0].id())
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .name(String.format("%s-%s", instanceName,defaultInteger.result()))
                .partitionNum("50")
                .diskType("1")
                .diskSize("500")
                .deployType("5")
                .ioMax("20")
                .vswitchId(defaultSwitch.id())
                .securityGroup(defaultSecurityGroup.id())
                .build());
    
            var defaultTopic = new Topic("defaultTopic", TopicArgs.builder()
                .instanceId(defaultInstance.id())
                .topic("example-topic")
                .localTopic("false")
                .compactTopic("false")
                .partitionNum("12")
                .remark("dafault_kafka_topic_remark")
                .build());
    
        }
    }
    
    configuration:
      instanceName:
        type: string
        default: tf-example
    resources:
      defaultInteger:
        type: random:integer
        name: default
        properties:
          min: 10000
          max: 99999
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          cidrBlock: 172.16.0.0/12
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
          cidrBlock: 172.16.0.0/24
          zoneId: ${default.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:alikafka:Instance
        name: default
        properties:
          name: ${instanceName}-${defaultInteger.result}
          partitionNum: '50'
          diskType: '1'
          diskSize: '500'
          deployType: '5'
          ioMax: '20'
          vswitchId: ${defaultSwitch.id}
          securityGroup: ${defaultSecurityGroup.id}
      defaultTopic:
        type: alicloud:alikafka:Topic
        name: default
        properties:
          instanceId: ${defaultInstance.id}
          topic: example-topic
          localTopic: 'false'
          compactTopic: 'false'
          partitionNum: '12'
          remark: dafault_kafka_topic_remark
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
    

    Create Topic Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Topic(name: string, args: TopicArgs, opts?: CustomResourceOptions);
    @overload
    def Topic(resource_name: str,
              args: TopicArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Topic(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              instance_id: Optional[str] = None,
              remark: Optional[str] = None,
              topic: Optional[str] = None,
              compact_topic: Optional[bool] = None,
              local_topic: Optional[bool] = None,
              partition_num: Optional[int] = None,
              tags: Optional[Mapping[str, Any]] = None)
    func NewTopic(ctx *Context, name string, args TopicArgs, opts ...ResourceOption) (*Topic, error)
    public Topic(string name, TopicArgs args, CustomResourceOptions? opts = null)
    public Topic(String name, TopicArgs args)
    public Topic(String name, TopicArgs args, CustomResourceOptions options)
    
    type: alicloud:alikafka:Topic
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TopicArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var topicResource = new AliCloud.AliKafka.Topic("topicResource", new()
    {
        InstanceId = "string",
        Remark = "string",
        TopicName = "string",
        CompactTopic = false,
        LocalTopic = false,
        PartitionNum = 0,
        Tags = 
        {
            { "string", "any" },
        },
    });
    
    example, err := alikafka.NewTopic(ctx, "topicResource", &alikafka.TopicArgs{
    	InstanceId:   pulumi.String("string"),
    	Remark:       pulumi.String("string"),
    	Topic:        pulumi.String("string"),
    	CompactTopic: pulumi.Bool(false),
    	LocalTopic:   pulumi.Bool(false),
    	PartitionNum: pulumi.Int(0),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var topicResource = new Topic("topicResource", TopicArgs.builder()
        .instanceId("string")
        .remark("string")
        .topic("string")
        .compactTopic(false)
        .localTopic(false)
        .partitionNum(0)
        .tags(Map.of("string", "any"))
        .build());
    
    topic_resource = alicloud.alikafka.Topic("topicResource",
        instance_id="string",
        remark="string",
        topic="string",
        compact_topic=False,
        local_topic=False,
        partition_num=0,
        tags={
            "string": "any",
        })
    
    const topicResource = new alicloud.alikafka.Topic("topicResource", {
        instanceId: "string",
        remark: "string",
        topic: "string",
        compactTopic: false,
        localTopic: false,
        partitionNum: 0,
        tags: {
            string: "any",
        },
    });
    
    type: alicloud:alikafka:Topic
    properties:
        compactTopic: false
        instanceId: string
        localTopic: false
        partitionNum: 0
        remark: string
        tags:
            string: any
        topic: string
    

    Topic Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Topic resource accepts the following input properties:

    InstanceId string
    InstanceId of your Kafka resource, the topic will create in this instance.
    Remark string
    This attribute is a concise description of topic. The length cannot exceed 64.
    TopicName string
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    CompactTopic bool
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    LocalTopic bool
    Whether the topic is localTopic or not.
    PartitionNum int
    The number of partitions of the topic. The number should between 1 and 48.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    InstanceId string
    InstanceId of your Kafka resource, the topic will create in this instance.
    Remark string
    This attribute is a concise description of topic. The length cannot exceed 64.
    Topic string
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    CompactTopic bool
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    LocalTopic bool
    Whether the topic is localTopic or not.
    PartitionNum int
    The number of partitions of the topic. The number should between 1 and 48.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    instanceId String
    InstanceId of your Kafka resource, the topic will create in this instance.
    remark String
    This attribute is a concise description of topic. The length cannot exceed 64.
    topic String
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compactTopic Boolean
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    localTopic Boolean
    Whether the topic is localTopic or not.
    partitionNum Integer
    The number of partitions of the topic. The number should between 1 and 48.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    instanceId string
    InstanceId of your Kafka resource, the topic will create in this instance.
    remark string
    This attribute is a concise description of topic. The length cannot exceed 64.
    topic string
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compactTopic boolean
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    localTopic boolean
    Whether the topic is localTopic or not.
    partitionNum number
    The number of partitions of the topic. The number should between 1 and 48.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    instance_id str
    InstanceId of your Kafka resource, the topic will create in this instance.
    remark str
    This attribute is a concise description of topic. The length cannot exceed 64.
    topic str
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compact_topic bool
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    local_topic bool
    Whether the topic is localTopic or not.
    partition_num int
    The number of partitions of the topic. The number should between 1 and 48.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    instanceId String
    InstanceId of your Kafka resource, the topic will create in this instance.
    remark String
    This attribute is a concise description of topic. The length cannot exceed 64.
    topic String
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compactTopic Boolean
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    localTopic Boolean
    Whether the topic is localTopic or not.
    partitionNum Number
    The number of partitions of the topic. The number should between 1 and 48.
    tags Map<Any>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Topic Resource

    Get an existing Topic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TopicState, opts?: CustomResourceOptions): Topic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compact_topic: Optional[bool] = None,
            instance_id: Optional[str] = None,
            local_topic: Optional[bool] = None,
            partition_num: Optional[int] = None,
            remark: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            topic: Optional[str] = None) -> Topic
    func GetTopic(ctx *Context, name string, id IDInput, state *TopicState, opts ...ResourceOption) (*Topic, error)
    public static Topic Get(string name, Input<string> id, TopicState? state, CustomResourceOptions? opts = null)
    public static Topic get(String name, Output<String> id, TopicState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CompactTopic bool
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    InstanceId string
    InstanceId of your Kafka resource, the topic will create in this instance.
    LocalTopic bool
    Whether the topic is localTopic or not.
    PartitionNum int
    The number of partitions of the topic. The number should between 1 and 48.
    Remark string
    This attribute is a concise description of topic. The length cannot exceed 64.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TopicName string
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    CompactTopic bool
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    InstanceId string
    InstanceId of your Kafka resource, the topic will create in this instance.
    LocalTopic bool
    Whether the topic is localTopic or not.
    PartitionNum int
    The number of partitions of the topic. The number should between 1 and 48.
    Remark string
    This attribute is a concise description of topic. The length cannot exceed 64.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    Topic string
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compactTopic Boolean
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    instanceId String
    InstanceId of your Kafka resource, the topic will create in this instance.
    localTopic Boolean
    Whether the topic is localTopic or not.
    partitionNum Integer
    The number of partitions of the topic. The number should between 1 and 48.
    remark String
    This attribute is a concise description of topic. The length cannot exceed 64.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    topic String
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compactTopic boolean
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    instanceId string
    InstanceId of your Kafka resource, the topic will create in this instance.
    localTopic boolean
    Whether the topic is localTopic or not.
    partitionNum number
    The number of partitions of the topic. The number should between 1 and 48.
    remark string
    This attribute is a concise description of topic. The length cannot exceed 64.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    topic string
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compact_topic bool
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    instance_id str
    InstanceId of your Kafka resource, the topic will create in this instance.
    local_topic bool
    Whether the topic is localTopic or not.
    partition_num int
    The number of partitions of the topic. The number should between 1 and 48.
    remark str
    This attribute is a concise description of topic. The length cannot exceed 64.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    topic str
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.
    compactTopic Boolean
    Whether the topic is compactTopic or not. Compact topic must be a localTopic.
    instanceId String
    InstanceId of your Kafka resource, the topic will create in this instance.
    localTopic Boolean
    Whether the topic is localTopic or not.
    partitionNum Number
    The number of partitions of the topic. The number should between 1 and 48.
    remark String
    This attribute is a concise description of topic. The length cannot exceed 64.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    topic String
    Name of the topic. Two topics on a single instance cannot have the same name. The length cannot exceed 249 characters.

    Import

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

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi