1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TdmqRocketmqRole
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.TdmqRocketmqRole

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a tdmqRocketmq role

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleTdmqRocketmqCluster = new tencentcloud.TdmqRocketmqCluster("exampleTdmqRocketmqCluster", {
        clusterName: "tf_example",
        remark: "remark.",
    });
    const exampleTdmqRocketmqRole = new tencentcloud.TdmqRocketmqRole("exampleTdmqRocketmqRole", {
        clusterId: exampleTdmqRocketmqCluster.clusterId,
        roleName: "tf_example",
        remark: "remark.",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_tdmq_rocketmq_cluster = tencentcloud.TdmqRocketmqCluster("exampleTdmqRocketmqCluster",
        cluster_name="tf_example",
        remark="remark.")
    example_tdmq_rocketmq_role = tencentcloud.TdmqRocketmqRole("exampleTdmqRocketmqRole",
        cluster_id=example_tdmq_rocketmq_cluster.cluster_id,
        role_name="tf_example",
        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 {
    		exampleTdmqRocketmqCluster, err := tencentcloud.NewTdmqRocketmqCluster(ctx, "exampleTdmqRocketmqCluster", &tencentcloud.TdmqRocketmqClusterArgs{
    			ClusterName: pulumi.String("tf_example"),
    			Remark:      pulumi.String("remark."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewTdmqRocketmqRole(ctx, "exampleTdmqRocketmqRole", &tencentcloud.TdmqRocketmqRoleArgs{
    			ClusterId: exampleTdmqRocketmqCluster.ClusterId,
    			RoleName:  pulumi.String("tf_example"),
    			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 exampleTdmqRocketmqCluster = new Tencentcloud.TdmqRocketmqCluster("exampleTdmqRocketmqCluster", new()
        {
            ClusterName = "tf_example",
            Remark = "remark.",
        });
    
        var exampleTdmqRocketmqRole = new Tencentcloud.TdmqRocketmqRole("exampleTdmqRocketmqRole", new()
        {
            ClusterId = exampleTdmqRocketmqCluster.ClusterId,
            RoleName = "tf_example",
            Remark = "remark.",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TdmqRocketmqCluster;
    import com.pulumi.tencentcloud.TdmqRocketmqClusterArgs;
    import com.pulumi.tencentcloud.TdmqRocketmqRole;
    import com.pulumi.tencentcloud.TdmqRocketmqRoleArgs;
    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 exampleTdmqRocketmqCluster = new TdmqRocketmqCluster("exampleTdmqRocketmqCluster", TdmqRocketmqClusterArgs.builder()
                .clusterName("tf_example")
                .remark("remark.")
                .build());
    
            var exampleTdmqRocketmqRole = new TdmqRocketmqRole("exampleTdmqRocketmqRole", TdmqRocketmqRoleArgs.builder()
                .clusterId(exampleTdmqRocketmqCluster.clusterId())
                .roleName("tf_example")
                .remark("remark.")
                .build());
    
        }
    }
    
    resources:
      exampleTdmqRocketmqCluster:
        type: tencentcloud:TdmqRocketmqCluster
        properties:
          clusterName: tf_example
          remark: remark.
      exampleTdmqRocketmqRole:
        type: tencentcloud:TdmqRocketmqRole
        properties:
          clusterId: ${exampleTdmqRocketmqCluster.clusterId}
          roleName: tf_example
          remark: remark.
    

    Create TdmqRocketmqRole Resource

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

    Constructor syntax

    new TdmqRocketmqRole(name: string, args: TdmqRocketmqRoleArgs, opts?: CustomResourceOptions);
    @overload
    def TdmqRocketmqRole(resource_name: str,
                         args: TdmqRocketmqRoleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def TdmqRocketmqRole(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         cluster_id: Optional[str] = None,
                         role_name: Optional[str] = None,
                         remark: Optional[str] = None,
                         tdmq_rocketmq_role_id: Optional[str] = None)
    func NewTdmqRocketmqRole(ctx *Context, name string, args TdmqRocketmqRoleArgs, opts ...ResourceOption) (*TdmqRocketmqRole, error)
    public TdmqRocketmqRole(string name, TdmqRocketmqRoleArgs args, CustomResourceOptions? opts = null)
    public TdmqRocketmqRole(String name, TdmqRocketmqRoleArgs args)
    public TdmqRocketmqRole(String name, TdmqRocketmqRoleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:TdmqRocketmqRole
    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 TdmqRocketmqRoleArgs
    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 TdmqRocketmqRoleArgs
    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 TdmqRocketmqRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TdmqRocketmqRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TdmqRocketmqRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TdmqRocketmqRole 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 TdmqRocketmqRole resource accepts the following input properties:

    ClusterId string
    Cluster ID (required).
    RoleName string
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    Remark string
    Remarks (up to 128 characters).
    TdmqRocketmqRoleId string
    ID of the resource.
    ClusterId string
    Cluster ID (required).
    RoleName string
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    Remark string
    Remarks (up to 128 characters).
    TdmqRocketmqRoleId string
    ID of the resource.
    clusterId String
    Cluster ID (required).
    roleName String
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    remark String
    Remarks (up to 128 characters).
    tdmqRocketmqRoleId String
    ID of the resource.
    clusterId string
    Cluster ID (required).
    roleName string
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    remark string
    Remarks (up to 128 characters).
    tdmqRocketmqRoleId string
    ID of the resource.
    cluster_id str
    Cluster ID (required).
    role_name str
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    remark str
    Remarks (up to 128 characters).
    tdmq_rocketmq_role_id str
    ID of the resource.
    clusterId String
    Cluster ID (required).
    roleName String
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    remark String
    Remarks (up to 128 characters).
    tdmqRocketmqRoleId String
    ID of the resource.

    Outputs

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

    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    Value of the role token.
    UpdateTime string
    Update time.
    CreateTime string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    Value of the role token.
    UpdateTime string
    Update time.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    Value of the role token.
    updateTime String
    Update time.
    createTime string
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    Value of the role token.
    updateTime string
    Update time.
    create_time str
    Creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    token str
    Value of the role token.
    update_time str
    Update time.
    createTime String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    Value of the role token.
    updateTime String
    Update time.

    Look up Existing TdmqRocketmqRole Resource

    Get an existing TdmqRocketmqRole 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?: TdmqRocketmqRoleState, opts?: CustomResourceOptions): TdmqRocketmqRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            create_time: Optional[str] = None,
            remark: Optional[str] = None,
            role_name: Optional[str] = None,
            tdmq_rocketmq_role_id: Optional[str] = None,
            token: Optional[str] = None,
            update_time: Optional[str] = None) -> TdmqRocketmqRole
    func GetTdmqRocketmqRole(ctx *Context, name string, id IDInput, state *TdmqRocketmqRoleState, opts ...ResourceOption) (*TdmqRocketmqRole, error)
    public static TdmqRocketmqRole Get(string name, Input<string> id, TdmqRocketmqRoleState? state, CustomResourceOptions? opts = null)
    public static TdmqRocketmqRole get(String name, Output<String> id, TdmqRocketmqRoleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:TdmqRocketmqRole    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.
    The following state arguments are supported:
    ClusterId string
    Cluster ID (required).
    CreateTime string
    Creation time.
    Remark string
    Remarks (up to 128 characters).
    RoleName string
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    TdmqRocketmqRoleId string
    ID of the resource.
    Token string
    Value of the role token.
    UpdateTime string
    Update time.
    ClusterId string
    Cluster ID (required).
    CreateTime string
    Creation time.
    Remark string
    Remarks (up to 128 characters).
    RoleName string
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    TdmqRocketmqRoleId string
    ID of the resource.
    Token string
    Value of the role token.
    UpdateTime string
    Update time.
    clusterId String
    Cluster ID (required).
    createTime String
    Creation time.
    remark String
    Remarks (up to 128 characters).
    roleName String
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    tdmqRocketmqRoleId String
    ID of the resource.
    token String
    Value of the role token.
    updateTime String
    Update time.
    clusterId string
    Cluster ID (required).
    createTime string
    Creation time.
    remark string
    Remarks (up to 128 characters).
    roleName string
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    tdmqRocketmqRoleId string
    ID of the resource.
    token string
    Value of the role token.
    updateTime string
    Update time.
    cluster_id str
    Cluster ID (required).
    create_time str
    Creation time.
    remark str
    Remarks (up to 128 characters).
    role_name str
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    tdmq_rocketmq_role_id str
    ID of the resource.
    token str
    Value of the role token.
    update_time str
    Update time.
    clusterId String
    Cluster ID (required).
    createTime String
    Creation time.
    remark String
    Remarks (up to 128 characters).
    roleName String
    Role name, which can contain up to 32 letters, digits, hyphens, and underscores.
    tdmqRocketmqRoleId String
    ID of the resource.
    token String
    Value of the role token.
    updateTime String
    Update time.

    Import

    tdmqRocketmq role can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/tdmqRocketmqRole:TdmqRocketmqRole role role_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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack