tencentcloud.TcmqTopic
Explore with Pulumi AI
Provides a resource to create a tcmq topic
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const topic = new tencentcloud.TcmqTopic("topic", {topicName: "topic_name"});
import pulumi
import pulumi_tencentcloud as tencentcloud
topic = tencentcloud.TcmqTopic("topic", topic_name="topic_name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewTcmqTopic(ctx, "topic", &tencentcloud.TcmqTopicArgs{
TopicName: pulumi.String("topic_name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var topic = new Tencentcloud.TcmqTopic("topic", new()
{
TopicName = "topic_name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TcmqTopic;
import com.pulumi.tencentcloud.TcmqTopicArgs;
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) {
var topic = new TcmqTopic("topic", TcmqTopicArgs.builder()
.topicName("topic_name")
.build());
}
}
resources:
topic:
type: tencentcloud:TcmqTopic
properties:
topicName: topic_name
Create TcmqTopic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TcmqTopic(name: string, args: TcmqTopicArgs, opts?: CustomResourceOptions);
@overload
def TcmqTopic(resource_name: str,
args: TcmqTopicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TcmqTopic(resource_name: str,
opts: Optional[ResourceOptions] = None,
topic_name: Optional[str] = None,
filter_type: Optional[float] = None,
max_msg_size: Optional[float] = None,
msg_retention_seconds: Optional[float] = None,
tcmq_topic_id: Optional[str] = None,
trace: Optional[bool] = None)
func NewTcmqTopic(ctx *Context, name string, args TcmqTopicArgs, opts ...ResourceOption) (*TcmqTopic, error)
public TcmqTopic(string name, TcmqTopicArgs args, CustomResourceOptions? opts = null)
public TcmqTopic(String name, TcmqTopicArgs args)
public TcmqTopic(String name, TcmqTopicArgs args, CustomResourceOptions options)
type: tencentcloud:TcmqTopic
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 TcmqTopicArgs
- 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 TcmqTopicArgs
- 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 TcmqTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TcmqTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TcmqTopicArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TcmqTopic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TcmqTopic resource accepts the following input properties:
- Topic
Name string - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- Filter
Type double - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - Max
Msg doubleSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- Msg
Retention doubleSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- Tcmq
Topic stringId - ID of the resource.
- Trace bool
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- Topic
Name string - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- Filter
Type float64 - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - Max
Msg float64Size - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- Msg
Retention float64Seconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- Tcmq
Topic stringId - ID of the resource.
- Trace bool
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- topic
Name String - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- filter
Type Double - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max
Msg DoubleSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg
Retention DoubleSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq
Topic StringId - ID of the resource.
- trace Boolean
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- topic
Name string - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- filter
Type number - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max
Msg numberSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg
Retention numberSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq
Topic stringId - ID of the resource.
- trace boolean
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- topic_
name str - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- filter_
type float - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max_
msg_ floatsize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg_
retention_ floatseconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq_
topic_ strid - ID of the resource.
- trace bool
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- topic
Name String - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- filter
Type Number - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max
Msg NumberSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg
Retention NumberSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq
Topic StringId - ID of the resource.
- trace Boolean
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the TcmqTopic 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 TcmqTopic Resource
Get an existing TcmqTopic 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?: TcmqTopicState, opts?: CustomResourceOptions): TcmqTopic
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
filter_type: Optional[float] = None,
max_msg_size: Optional[float] = None,
msg_retention_seconds: Optional[float] = None,
tcmq_topic_id: Optional[str] = None,
topic_name: Optional[str] = None,
trace: Optional[bool] = None) -> TcmqTopic
func GetTcmqTopic(ctx *Context, name string, id IDInput, state *TcmqTopicState, opts ...ResourceOption) (*TcmqTopic, error)
public static TcmqTopic Get(string name, Input<string> id, TcmqTopicState? state, CustomResourceOptions? opts = null)
public static TcmqTopic get(String name, Output<String> id, TcmqTopicState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TcmqTopic get: id: ${id}
- 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.
- Filter
Type double - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - Max
Msg doubleSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- Msg
Retention doubleSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- Tcmq
Topic stringId - ID of the resource.
- Topic
Name string - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- Trace bool
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- Filter
Type float64 - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - Max
Msg float64Size - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- Msg
Retention float64Seconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- Tcmq
Topic stringId - ID of the resource.
- Topic
Name string - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- Trace bool
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- filter
Type Double - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max
Msg DoubleSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg
Retention DoubleSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq
Topic StringId - ID of the resource.
- topic
Name String - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- trace Boolean
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- filter
Type number - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max
Msg numberSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg
Retention numberSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq
Topic stringId - ID of the resource.
- topic
Name string - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- trace boolean
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- filter_
type float - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max_
msg_ floatsize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg_
retention_ floatseconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq_
topic_ strid - ID of the resource.
- topic_
name str - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- trace bool
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
- filter
Type Number - Used to specify the message match policy for the topic.
1
: tag match policy (default value);2
: routing match policy. - max
Msg NumberSize - Maximum message length. Value range: 1024-65536 bytes (i.e., 1-64 KB). Default value: 65536.
- msg
Retention NumberSeconds - Message retention period. Value range: 60-86400 seconds (i.e., 1 minute-1 day). Default value: 86400.
- tcmq
Topic StringId - ID of the resource.
- topic
Name String - Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
- trace Boolean
- Whether to enable message trace. true: yes; false: no. If this field is left empty, the feature will not be enabled.
Import
tcmq topic can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tcmqTopic:TcmqTopic topic topic_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.