flexibleengine.DmsRocketmqTopic
Explore with Pulumi AI
Manages DMS RocketMQ topic resources within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const instanceId = config.requireObject("instanceId");
const test = new flexibleengine.DmsRocketmqTopic("test", {
instanceId: instanceId,
queueNum: 3,
permission: "all",
brokers: [{
name: "broker-0",
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
test = flexibleengine.DmsRocketmqTopic("test",
instance_id=instance_id,
queue_num=3,
permission="all",
brokers=[{
"name": "broker-0",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"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, "")
instanceId := cfg.RequireObject("instanceId")
_, err := flexibleengine.NewDmsRocketmqTopic(ctx, "test", &flexibleengine.DmsRocketmqTopicArgs{
InstanceId: pulumi.Any(instanceId),
QueueNum: pulumi.Float64(3),
Permission: pulumi.String("all"),
Brokers: flexibleengine.DmsRocketmqTopicBrokerArray{
&flexibleengine.DmsRocketmqTopicBrokerArgs{
Name: pulumi.String("broker-0"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var instanceId = config.RequireObject<dynamic>("instanceId");
var test = new Flexibleengine.DmsRocketmqTopic("test", new()
{
InstanceId = instanceId,
QueueNum = 3,
Permission = "all",
Brokers = new[]
{
new Flexibleengine.Inputs.DmsRocketmqTopicBrokerArgs
{
Name = "broker-0",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.DmsRocketmqTopic;
import com.pulumi.flexibleengine.DmsRocketmqTopicArgs;
import com.pulumi.flexibleengine.inputs.DmsRocketmqTopicBrokerArgs;
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 instanceId = config.get("instanceId");
var test = new DmsRocketmqTopic("test", DmsRocketmqTopicArgs.builder()
.instanceId(instanceId)
.queueNum(3)
.permission("all")
.brokers(DmsRocketmqTopicBrokerArgs.builder()
.name("broker-0")
.build())
.build());
}
}
configuration:
instanceId:
type: dynamic
resources:
test:
type: flexibleengine:DmsRocketmqTopic
properties:
instanceId: ${instanceId}
queueNum: 3
permission: all
brokers:
- name: broker-0
Create DmsRocketmqTopic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DmsRocketmqTopic(name: string, args: DmsRocketmqTopicArgs, opts?: CustomResourceOptions);
@overload
def DmsRocketmqTopic(resource_name: str,
args: DmsRocketmqTopicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DmsRocketmqTopic(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
brokers: Optional[Sequence[DmsRocketmqTopicBrokerArgs]] = None,
dms_rocketmq_topic_id: Optional[str] = None,
name: Optional[str] = None,
permission: Optional[str] = None,
queue_num: Optional[float] = None,
region: Optional[str] = None,
total_read_queue_num: Optional[float] = None,
total_write_queue_num: Optional[float] = None)
func NewDmsRocketmqTopic(ctx *Context, name string, args DmsRocketmqTopicArgs, opts ...ResourceOption) (*DmsRocketmqTopic, error)
public DmsRocketmqTopic(string name, DmsRocketmqTopicArgs args, CustomResourceOptions? opts = null)
public DmsRocketmqTopic(String name, DmsRocketmqTopicArgs args)
public DmsRocketmqTopic(String name, DmsRocketmqTopicArgs args, CustomResourceOptions options)
type: flexibleengine:DmsRocketmqTopic
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 DmsRocketmqTopicArgs
- 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 DmsRocketmqTopicArgs
- 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 DmsRocketmqTopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DmsRocketmqTopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DmsRocketmqTopicArgs
- 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 dmsRocketmqTopicResource = new Flexibleengine.DmsRocketmqTopic("dmsRocketmqTopicResource", new()
{
InstanceId = "string",
Brokers = new[]
{
new Flexibleengine.Inputs.DmsRocketmqTopicBrokerArgs
{
Name = "string",
ReadQueueNum = 0,
WriteQueueNum = 0,
},
},
DmsRocketmqTopicId = "string",
Name = "string",
Permission = "string",
QueueNum = 0,
Region = "string",
TotalReadQueueNum = 0,
TotalWriteQueueNum = 0,
});
example, err := flexibleengine.NewDmsRocketmqTopic(ctx, "dmsRocketmqTopicResource", &flexibleengine.DmsRocketmqTopicArgs{
InstanceId: pulumi.String("string"),
Brokers: flexibleengine.DmsRocketmqTopicBrokerArray{
&flexibleengine.DmsRocketmqTopicBrokerArgs{
Name: pulumi.String("string"),
ReadQueueNum: pulumi.Float64(0),
WriteQueueNum: pulumi.Float64(0),
},
},
DmsRocketmqTopicId: pulumi.String("string"),
Name: pulumi.String("string"),
Permission: pulumi.String("string"),
QueueNum: pulumi.Float64(0),
Region: pulumi.String("string"),
TotalReadQueueNum: pulumi.Float64(0),
TotalWriteQueueNum: pulumi.Float64(0),
})
var dmsRocketmqTopicResource = new DmsRocketmqTopic("dmsRocketmqTopicResource", DmsRocketmqTopicArgs.builder()
.instanceId("string")
.brokers(DmsRocketmqTopicBrokerArgs.builder()
.name("string")
.readQueueNum(0)
.writeQueueNum(0)
.build())
.dmsRocketmqTopicId("string")
.name("string")
.permission("string")
.queueNum(0)
.region("string")
.totalReadQueueNum(0)
.totalWriteQueueNum(0)
.build());
dms_rocketmq_topic_resource = flexibleengine.DmsRocketmqTopic("dmsRocketmqTopicResource",
instance_id="string",
brokers=[{
"name": "string",
"read_queue_num": 0,
"write_queue_num": 0,
}],
dms_rocketmq_topic_id="string",
name="string",
permission="string",
queue_num=0,
region="string",
total_read_queue_num=0,
total_write_queue_num=0)
const dmsRocketmqTopicResource = new flexibleengine.DmsRocketmqTopic("dmsRocketmqTopicResource", {
instanceId: "string",
brokers: [{
name: "string",
readQueueNum: 0,
writeQueueNum: 0,
}],
dmsRocketmqTopicId: "string",
name: "string",
permission: "string",
queueNum: 0,
region: "string",
totalReadQueueNum: 0,
totalWriteQueueNum: 0,
});
type: flexibleengine:DmsRocketmqTopic
properties:
brokers:
- name: string
readQueueNum: 0
writeQueueNum: 0
dmsRocketmqTopicId: string
instanceId: string
name: string
permission: string
queueNum: 0
region: string
totalReadQueueNum: 0
totalWriteQueueNum: 0
DmsRocketmqTopic 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 DmsRocketmqTopic resource accepts the following input properties:
- Instance
Id string - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- Brokers
List<Dms
Rocketmq Topic Broker> - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- Dms
Rocketmq stringTopic Id - The resource ID.
- Name string
- Indicates the name of the broker.
- Permission string
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- Queue
Num double - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Total
Read doubleQueue Num - Specifies the total number of read queues.
- Total
Write doubleQueue Num Specifies the total number of write queues.
The
brokers
block supports:
- Instance
Id string - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- Brokers
[]Dms
Rocketmq Topic Broker Args - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- Dms
Rocketmq stringTopic Id - The resource ID.
- Name string
- Indicates the name of the broker.
- Permission string
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- Queue
Num float64 - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Total
Read float64Queue Num - Specifies the total number of read queues.
- Total
Write float64Queue Num Specifies the total number of write queues.
The
brokers
block supports:
- instance
Id String - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- brokers
List<Dms
Rocketmq Topic Broker> - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms
Rocketmq StringTopic Id - The resource ID.
- name String
- Indicates the name of the broker.
- permission String
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue
Num Double - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total
Read DoubleQueue Num - Specifies the total number of read queues.
- total
Write DoubleQueue Num Specifies the total number of write queues.
The
brokers
block supports:
- instance
Id string - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- brokers
Dms
Rocketmq Topic Broker[] - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms
Rocketmq stringTopic Id - The resource ID.
- name string
- Indicates the name of the broker.
- permission string
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue
Num number - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total
Read numberQueue Num - Specifies the total number of read queues.
- total
Write numberQueue Num Specifies the total number of write queues.
The
brokers
block supports:
- instance_
id str - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- brokers
Sequence[Dms
Rocketmq Topic Broker Args] - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms_
rocketmq_ strtopic_ id - The resource ID.
- name str
- Indicates the name of the broker.
- permission str
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue_
num float - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total_
read_ floatqueue_ num - Specifies the total number of read queues.
- total_
write_ floatqueue_ num Specifies the total number of write queues.
The
brokers
block supports:
- instance
Id String - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- brokers List<Property Map>
- Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms
Rocketmq StringTopic Id - The resource ID.
- name String
- Indicates the name of the broker.
- permission String
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue
Num Number - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total
Read NumberQueue Num - Specifies the total number of read queues.
- total
Write NumberQueue Num Specifies the total number of write queues.
The
brokers
block supports:
Outputs
All input properties are implicitly available as output properties. Additionally, the DmsRocketmqTopic 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 DmsRocketmqTopic Resource
Get an existing DmsRocketmqTopic 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?: DmsRocketmqTopicState, opts?: CustomResourceOptions): DmsRocketmqTopic
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
brokers: Optional[Sequence[DmsRocketmqTopicBrokerArgs]] = None,
dms_rocketmq_topic_id: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
permission: Optional[str] = None,
queue_num: Optional[float] = None,
region: Optional[str] = None,
total_read_queue_num: Optional[float] = None,
total_write_queue_num: Optional[float] = None) -> DmsRocketmqTopic
func GetDmsRocketmqTopic(ctx *Context, name string, id IDInput, state *DmsRocketmqTopicState, opts ...ResourceOption) (*DmsRocketmqTopic, error)
public static DmsRocketmqTopic Get(string name, Input<string> id, DmsRocketmqTopicState? state, CustomResourceOptions? opts = null)
public static DmsRocketmqTopic get(String name, Output<String> id, DmsRocketmqTopicState state, CustomResourceOptions options)
resources: _: type: flexibleengine:DmsRocketmqTopic 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.
- Brokers
List<Dms
Rocketmq Topic Broker> - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- Dms
Rocketmq stringTopic Id - The resource ID.
- Instance
Id string - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- Name string
- Indicates the name of the broker.
- Permission string
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- Queue
Num double - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Total
Read doubleQueue Num - Specifies the total number of read queues.
- Total
Write doubleQueue Num Specifies the total number of write queues.
The
brokers
block supports:
- Brokers
[]Dms
Rocketmq Topic Broker Args - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- Dms
Rocketmq stringTopic Id - The resource ID.
- Instance
Id string - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- Name string
- Indicates the name of the broker.
- Permission string
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- Queue
Num float64 - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- Total
Read float64Queue Num - Specifies the total number of read queues.
- Total
Write float64Queue Num Specifies the total number of write queues.
The
brokers
block supports:
- brokers
List<Dms
Rocketmq Topic Broker> - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms
Rocketmq StringTopic Id - The resource ID.
- instance
Id String - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- name String
- Indicates the name of the broker.
- permission String
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue
Num Double - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total
Read DoubleQueue Num - Specifies the total number of read queues.
- total
Write DoubleQueue Num Specifies the total number of write queues.
The
brokers
block supports:
- brokers
Dms
Rocketmq Topic Broker[] - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms
Rocketmq stringTopic Id - The resource ID.
- instance
Id string - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- name string
- Indicates the name of the broker.
- permission string
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue
Num number - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total
Read numberQueue Num - Specifies the total number of read queues.
- total
Write numberQueue Num Specifies the total number of write queues.
The
brokers
block supports:
- brokers
Sequence[Dms
Rocketmq Topic Broker Args] - Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms_
rocketmq_ strtopic_ id - The resource ID.
- instance_
id str - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- name str
- Indicates the name of the broker.
- permission str
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue_
num float - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total_
read_ floatqueue_ num - Specifies the total number of read queues.
- total_
write_ floatqueue_ num Specifies the total number of write queues.
The
brokers
block supports:
- brokers List<Property Map>
- Specifies the list of associated brokers of the topic. Changing this parameter will create a new resource. The brokers structure is documented below.
- dms
Rocketmq StringTopic Id - The resource ID.
- instance
Id String - Specifies the ID of the rocketMQ instance. Changing this parameter will create a new resource.
- name String
- Indicates the name of the broker.
- permission String
- Specifies the permissions of the topic. Value options: all, sub, pub. Default to all.
- queue
Num Number - Specifies the number of queues. Default to 3. Changing this parameter will create a new resource.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
- total
Read NumberQueue Num - Specifies the total number of read queues.
- total
Write NumberQueue Num Specifies the total number of write queues.
The
brokers
block supports:
Supporting Types
DmsRocketmqTopicBroker, DmsRocketmqTopicBrokerArgs
- Name string
- Indicates the name of the broker.
- Read
Queue doubleNum - Indicates the read queues number of the broker. It's useless when create a topic.
- Write
Queue doubleNum - Indicates the read queues number of the broker. It's useless when create a topic.
- Name string
- Indicates the name of the broker.
- Read
Queue float64Num - Indicates the read queues number of the broker. It's useless when create a topic.
- Write
Queue float64Num - Indicates the read queues number of the broker. It's useless when create a topic.
- name String
- Indicates the name of the broker.
- read
Queue DoubleNum - Indicates the read queues number of the broker. It's useless when create a topic.
- write
Queue DoubleNum - Indicates the read queues number of the broker. It's useless when create a topic.
- name string
- Indicates the name of the broker.
- read
Queue numberNum - Indicates the read queues number of the broker. It's useless when create a topic.
- write
Queue numberNum - Indicates the read queues number of the broker. It's useless when create a topic.
- name str
- Indicates the name of the broker.
- read_
queue_ floatnum - Indicates the read queues number of the broker. It's useless when create a topic.
- write_
queue_ floatnum - Indicates the read queues number of the broker. It's useless when create a topic.
- name String
- Indicates the name of the broker.
- read
Queue NumberNum - Indicates the read queues number of the broker. It's useless when create a topic.
- write
Queue NumberNum - Indicates the read queues number of the broker. It's useless when create a topic.
Import
The rocketmq topic can be imported using the rocketMQ instance ID and topic name separated by a slash, e.g.
$ pulumi import flexibleengine:index/dmsRocketmqTopic:DmsRocketmqTopic test c8057fe5-23a8-46ef-ad83-c0055b4e0c5c/topic_1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.