Show / Hide Table of Contents

Class 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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
    {
        AvailableResourceCreation = "VSwitch",
    }));
    var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
    {
        CidrBlock = "172.16.0.0/12",
    });
    var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
    {
        AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
        CidrBlock = "172.16.0.0/24",
        VpcId = defaultNetwork.Id,
    });
    var defaultInstance = new AliCloud.AliKafka.Instance("defaultInstance", new AliCloud.AliKafka.InstanceArgs
    {
        DeployType = "5",
        DiskSize = "500",
        DiskType = "1",
        IoMax = "20",
        TopicQuota = "50",
        VswitchId = defaultSwitch.Id,
    });
    var config = new Config();
    var topic = config.Get("topic") ?? "alikafkaTopicName";
    var defaultTopic = new AliCloud.AliKafka.Topic("defaultTopic", new AliCloud.AliKafka.TopicArgs
    {
        CompactTopic = "false",
        InstanceId = defaultInstance.Id,
        LocalTopic = "false",
        PartitionNum = "12",
        Remark = "dafault_kafka_topic_remark",
        Topic = topic,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Topic
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.AliKafka
Assembly: Pulumi.AliCloud.dll
Syntax
public class Topic : CustomResource

Constructors

View Source

Topic(String, TopicArgs, CustomResourceOptions)

Create a Topic resource with the given unique name, arguments, and options.

Declaration
public Topic(string name, TopicArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

TopicArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CompactTopic

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

Declaration
public Output<bool?> CompactTopic { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

InstanceId

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

Declaration
public Output<string> InstanceId { get; }
Property Value
Type Description
Output<System.String>
View Source

LocalTopic

Whether the topic is localTopic or not.

Declaration
public Output<bool?> LocalTopic { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

PartitionNum

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

Declaration
public Output<int?> PartitionNum { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Remark

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

Declaration
public Output<string> Remark { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A mapping of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

TopicName

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

Declaration
public Output<string> TopicName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, TopicState, CustomResourceOptions)

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

Declaration
public static Topic Get(string name, Input<string> id, TopicState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

TopicState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Topic
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.