tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.TdmqRole
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Provide a resource to create a TDMQ role.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleTdmqInstance = new tencentcloud.TdmqInstance("exampleTdmqInstance", {
clusterName: "tf_example",
remark: "remark.",
tags: {
createdBy: "terraform",
},
});
const exampleTdmqRole = new tencentcloud.TdmqRole("exampleTdmqRole", {
roleName: "role_example",
clusterId: exampleTdmqInstance.tdmqInstanceId,
remark: "remark.",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_tdmq_instance = tencentcloud.TdmqInstance("exampleTdmqInstance",
cluster_name="tf_example",
remark="remark.",
tags={
"createdBy": "terraform",
})
example_tdmq_role = tencentcloud.TdmqRole("exampleTdmqRole",
role_name="role_example",
cluster_id=example_tdmq_instance.tdmq_instance_id,
remark="remark.")
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 {
exampleTdmqInstance, err := tencentcloud.NewTdmqInstance(ctx, "exampleTdmqInstance", &tencentcloud.TdmqInstanceArgs{
ClusterName: pulumi.String("tf_example"),
Remark: pulumi.String("remark."),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTdmqRole(ctx, "exampleTdmqRole", &tencentcloud.TdmqRoleArgs{
RoleName: pulumi.String("role_example"),
ClusterId: exampleTdmqInstance.TdmqInstanceId,
Remark: pulumi.String("remark."),
})
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 exampleTdmqInstance = new Tencentcloud.TdmqInstance("exampleTdmqInstance", new()
{
ClusterName = "tf_example",
Remark = "remark.",
Tags =
{
{ "createdBy", "terraform" },
},
});
var exampleTdmqRole = new Tencentcloud.TdmqRole("exampleTdmqRole", new()
{
RoleName = "role_example",
ClusterId = exampleTdmqInstance.TdmqInstanceId,
Remark = "remark.",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TdmqInstance;
import com.pulumi.tencentcloud.TdmqInstanceArgs;
import com.pulumi.tencentcloud.TdmqRole;
import com.pulumi.tencentcloud.TdmqRoleArgs;
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 exampleTdmqInstance = new TdmqInstance("exampleTdmqInstance", TdmqInstanceArgs.builder()
.clusterName("tf_example")
.remark("remark.")
.tags(Map.of("createdBy", "terraform"))
.build());
var exampleTdmqRole = new TdmqRole("exampleTdmqRole", TdmqRoleArgs.builder()
.roleName("role_example")
.clusterId(exampleTdmqInstance.tdmqInstanceId())
.remark("remark.")
.build());
}
}
resources:
exampleTdmqInstance:
type: tencentcloud:TdmqInstance
properties:
clusterName: tf_example
remark: remark.
tags:
createdBy: terraform
exampleTdmqRole:
type: tencentcloud:TdmqRole
properties:
roleName: role_example
clusterId: ${exampleTdmqInstance.tdmqInstanceId}
remark: remark.
Create TdmqRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TdmqRole(name: string, args: TdmqRoleArgs, opts?: CustomResourceOptions);
@overload
def TdmqRole(resource_name: str,
args: TdmqRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TdmqRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
remark: Optional[str] = None,
role_name: Optional[str] = None,
tdmq_role_id: Optional[str] = None)
func NewTdmqRole(ctx *Context, name string, args TdmqRoleArgs, opts ...ResourceOption) (*TdmqRole, error)
public TdmqRole(string name, TdmqRoleArgs args, CustomResourceOptions? opts = null)
public TdmqRole(String name, TdmqRoleArgs args)
public TdmqRole(String name, TdmqRoleArgs args, CustomResourceOptions options)
type: tencentcloud:TdmqRole
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 TdmqRoleArgs
- 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 TdmqRoleArgs
- 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 TdmqRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TdmqRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TdmqRoleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TdmqRole 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 TdmqRole resource accepts the following input properties:
- Cluster
Id string - The id of tdmq cluster.
- Remark string
- The description of tdmq role.
- Role
Name string - The name of tdmq role.
- Tdmq
Role stringId - ID of the resource.
- Cluster
Id string - The id of tdmq cluster.
- Remark string
- The description of tdmq role.
- Role
Name string - The name of tdmq role.
- Tdmq
Role stringId - ID of the resource.
- cluster
Id String - The id of tdmq cluster.
- remark String
- The description of tdmq role.
- role
Name String - The name of tdmq role.
- tdmq
Role StringId - ID of the resource.
- cluster
Id string - The id of tdmq cluster.
- remark string
- The description of tdmq role.
- role
Name string - The name of tdmq role.
- tdmq
Role stringId - ID of the resource.
- cluster_
id str - The id of tdmq cluster.
- remark str
- The description of tdmq role.
- role_
name str - The name of tdmq role.
- tdmq_
role_ strid - ID of the resource.
- cluster
Id String - The id of tdmq cluster.
- remark String
- The description of tdmq role.
- role
Name String - The name of tdmq role.
- tdmq
Role StringId - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TdmqRole 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 TdmqRole Resource
Get an existing TdmqRole 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?: TdmqRoleState, opts?: CustomResourceOptions): TdmqRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
remark: Optional[str] = None,
role_name: Optional[str] = None,
tdmq_role_id: Optional[str] = None) -> TdmqRole
func GetTdmqRole(ctx *Context, name string, id IDInput, state *TdmqRoleState, opts ...ResourceOption) (*TdmqRole, error)
public static TdmqRole Get(string name, Input<string> id, TdmqRoleState? state, CustomResourceOptions? opts = null)
public static TdmqRole get(String name, Output<String> id, TdmqRoleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TdmqRole 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.
- Cluster
Id string - The id of tdmq cluster.
- Remark string
- The description of tdmq role.
- Role
Name string - The name of tdmq role.
- Tdmq
Role stringId - ID of the resource.
- Cluster
Id string - The id of tdmq cluster.
- Remark string
- The description of tdmq role.
- Role
Name string - The name of tdmq role.
- Tdmq
Role stringId - ID of the resource.
- cluster
Id String - The id of tdmq cluster.
- remark String
- The description of tdmq role.
- role
Name String - The name of tdmq role.
- tdmq
Role StringId - ID of the resource.
- cluster
Id string - The id of tdmq cluster.
- remark string
- The description of tdmq role.
- role
Name string - The name of tdmq role.
- tdmq
Role stringId - ID of the resource.
- cluster_
id str - The id of tdmq cluster.
- remark str
- The description of tdmq role.
- role_
name str - The name of tdmq role.
- tdmq_
role_ strid - ID of the resource.
- cluster
Id String - The id of tdmq cluster.
- remark String
- The description of tdmq role.
- role
Name String - The name of tdmq role.
- tdmq
Role StringId - ID of the resource.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack