tencentcloud.TdmqRocketmqEnvironmentRole
Explore with Pulumi AI
Provides a resource to create a tdmqRocketmq environment_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", {
roleName: "tf_example_role",
remark: "remark.",
clusterId: exampleTdmqRocketmqCluster.clusterId,
});
const exampleTdmqRocketmqNamespace = new tencentcloud.TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace", {
clusterId: exampleTdmqRocketmqCluster.clusterId,
namespaceName: "tf_example_namespace",
remark: "remark.",
});
const exampleTdmqRocketmqEnvironmentRole = new tencentcloud.TdmqRocketmqEnvironmentRole("exampleTdmqRocketmqEnvironmentRole", {
environmentName: exampleTdmqRocketmqNamespace.namespaceName,
roleName: exampleTdmqRocketmqRole.roleName,
permissions: [
"produce",
"consume",
],
clusterId: exampleTdmqRocketmqCluster.clusterId,
});
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",
role_name="tf_example_role",
remark="remark.",
cluster_id=example_tdmq_rocketmq_cluster.cluster_id)
example_tdmq_rocketmq_namespace = tencentcloud.TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace",
cluster_id=example_tdmq_rocketmq_cluster.cluster_id,
namespace_name="tf_example_namespace",
remark="remark.")
example_tdmq_rocketmq_environment_role = tencentcloud.TdmqRocketmqEnvironmentRole("exampleTdmqRocketmqEnvironmentRole",
environment_name=example_tdmq_rocketmq_namespace.namespace_name,
role_name=example_tdmq_rocketmq_role.role_name,
permissions=[
"produce",
"consume",
],
cluster_id=example_tdmq_rocketmq_cluster.cluster_id)
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
}
exampleTdmqRocketmqRole, err := tencentcloud.NewTdmqRocketmqRole(ctx, "exampleTdmqRocketmqRole", &tencentcloud.TdmqRocketmqRoleArgs{
RoleName: pulumi.String("tf_example_role"),
Remark: pulumi.String("remark."),
ClusterId: exampleTdmqRocketmqCluster.ClusterId,
})
if err != nil {
return err
}
exampleTdmqRocketmqNamespace, err := tencentcloud.NewTdmqRocketmqNamespace(ctx, "exampleTdmqRocketmqNamespace", &tencentcloud.TdmqRocketmqNamespaceArgs{
ClusterId: exampleTdmqRocketmqCluster.ClusterId,
NamespaceName: pulumi.String("tf_example_namespace"),
Remark: pulumi.String("remark."),
})
if err != nil {
return err
}
_, err = tencentcloud.NewTdmqRocketmqEnvironmentRole(ctx, "exampleTdmqRocketmqEnvironmentRole", &tencentcloud.TdmqRocketmqEnvironmentRoleArgs{
EnvironmentName: exampleTdmqRocketmqNamespace.NamespaceName,
RoleName: exampleTdmqRocketmqRole.RoleName,
Permissions: pulumi.StringArray{
pulumi.String("produce"),
pulumi.String("consume"),
},
ClusterId: exampleTdmqRocketmqCluster.ClusterId,
})
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()
{
RoleName = "tf_example_role",
Remark = "remark.",
ClusterId = exampleTdmqRocketmqCluster.ClusterId,
});
var exampleTdmqRocketmqNamespace = new Tencentcloud.TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace", new()
{
ClusterId = exampleTdmqRocketmqCluster.ClusterId,
NamespaceName = "tf_example_namespace",
Remark = "remark.",
});
var exampleTdmqRocketmqEnvironmentRole = new Tencentcloud.TdmqRocketmqEnvironmentRole("exampleTdmqRocketmqEnvironmentRole", new()
{
EnvironmentName = exampleTdmqRocketmqNamespace.NamespaceName,
RoleName = exampleTdmqRocketmqRole.RoleName,
Permissions = new[]
{
"produce",
"consume",
},
ClusterId = exampleTdmqRocketmqCluster.ClusterId,
});
});
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 com.pulumi.tencentcloud.TdmqRocketmqNamespace;
import com.pulumi.tencentcloud.TdmqRocketmqNamespaceArgs;
import com.pulumi.tencentcloud.TdmqRocketmqEnvironmentRole;
import com.pulumi.tencentcloud.TdmqRocketmqEnvironmentRoleArgs;
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()
.roleName("tf_example_role")
.remark("remark.")
.clusterId(exampleTdmqRocketmqCluster.clusterId())
.build());
var exampleTdmqRocketmqNamespace = new TdmqRocketmqNamespace("exampleTdmqRocketmqNamespace", TdmqRocketmqNamespaceArgs.builder()
.clusterId(exampleTdmqRocketmqCluster.clusterId())
.namespaceName("tf_example_namespace")
.remark("remark.")
.build());
var exampleTdmqRocketmqEnvironmentRole = new TdmqRocketmqEnvironmentRole("exampleTdmqRocketmqEnvironmentRole", TdmqRocketmqEnvironmentRoleArgs.builder()
.environmentName(exampleTdmqRocketmqNamespace.namespaceName())
.roleName(exampleTdmqRocketmqRole.roleName())
.permissions(
"produce",
"consume")
.clusterId(exampleTdmqRocketmqCluster.clusterId())
.build());
}
}
resources:
exampleTdmqRocketmqCluster:
type: tencentcloud:TdmqRocketmqCluster
properties:
clusterName: tf_example
remark: remark.
exampleTdmqRocketmqRole:
type: tencentcloud:TdmqRocketmqRole
properties:
roleName: tf_example_role
remark: remark.
clusterId: ${exampleTdmqRocketmqCluster.clusterId}
exampleTdmqRocketmqNamespace:
type: tencentcloud:TdmqRocketmqNamespace
properties:
clusterId: ${exampleTdmqRocketmqCluster.clusterId}
namespaceName: tf_example_namespace
remark: remark.
exampleTdmqRocketmqEnvironmentRole:
type: tencentcloud:TdmqRocketmqEnvironmentRole
properties:
environmentName: ${exampleTdmqRocketmqNamespace.namespaceName}
roleName: ${exampleTdmqRocketmqRole.roleName}
permissions:
- produce
- consume
clusterId: ${exampleTdmqRocketmqCluster.clusterId}
Create TdmqRocketmqEnvironmentRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TdmqRocketmqEnvironmentRole(name: string, args: TdmqRocketmqEnvironmentRoleArgs, opts?: CustomResourceOptions);
@overload
def TdmqRocketmqEnvironmentRole(resource_name: str,
args: TdmqRocketmqEnvironmentRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TdmqRocketmqEnvironmentRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
environment_name: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
role_name: Optional[str] = None,
tdmq_rocketmq_environment_role_id: Optional[str] = None)
func NewTdmqRocketmqEnvironmentRole(ctx *Context, name string, args TdmqRocketmqEnvironmentRoleArgs, opts ...ResourceOption) (*TdmqRocketmqEnvironmentRole, error)
public TdmqRocketmqEnvironmentRole(string name, TdmqRocketmqEnvironmentRoleArgs args, CustomResourceOptions? opts = null)
public TdmqRocketmqEnvironmentRole(String name, TdmqRocketmqEnvironmentRoleArgs args)
public TdmqRocketmqEnvironmentRole(String name, TdmqRocketmqEnvironmentRoleArgs args, CustomResourceOptions options)
type: tencentcloud:TdmqRocketmqEnvironmentRole
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 TdmqRocketmqEnvironmentRoleArgs
- 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 TdmqRocketmqEnvironmentRoleArgs
- 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 TdmqRocketmqEnvironmentRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TdmqRocketmqEnvironmentRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TdmqRocketmqEnvironmentRoleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TdmqRocketmqEnvironmentRole 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 TdmqRocketmqEnvironmentRole resource accepts the following input properties:
- Cluster
Id string - Cluster ID (required).
- Environment
Name string - Environment (namespace) name.
- Permissions List<string>
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - Role
Name string - Role Name.
- Tdmq
Rocketmq stringEnvironment Role Id - ID of the resource.
- Cluster
Id string - Cluster ID (required).
- Environment
Name string - Environment (namespace) name.
- Permissions []string
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - Role
Name string - Role Name.
- Tdmq
Rocketmq stringEnvironment Role Id - ID of the resource.
- cluster
Id String - Cluster ID (required).
- environment
Name String - Environment (namespace) name.
- permissions List<String>
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role
Name String - Role Name.
- tdmq
Rocketmq StringEnvironment Role Id - ID of the resource.
- cluster
Id string - Cluster ID (required).
- environment
Name string - Environment (namespace) name.
- permissions string[]
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role
Name string - Role Name.
- tdmq
Rocketmq stringEnvironment Role Id - ID of the resource.
- cluster_
id str - Cluster ID (required).
- environment_
name str - Environment (namespace) name.
- permissions Sequence[str]
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role_
name str - Role Name.
- tdmq_
rocketmq_ strenvironment_ role_ id - ID of the resource.
- cluster
Id String - Cluster ID (required).
- environment
Name String - Environment (namespace) name.
- permissions List<String>
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role
Name String - Role Name.
- tdmq
Rocketmq StringEnvironment Role Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TdmqRocketmqEnvironmentRole 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 TdmqRocketmqEnvironmentRole Resource
Get an existing TdmqRocketmqEnvironmentRole 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?: TdmqRocketmqEnvironmentRoleState, opts?: CustomResourceOptions): TdmqRocketmqEnvironmentRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
environment_name: Optional[str] = None,
permissions: Optional[Sequence[str]] = None,
role_name: Optional[str] = None,
tdmq_rocketmq_environment_role_id: Optional[str] = None) -> TdmqRocketmqEnvironmentRole
func GetTdmqRocketmqEnvironmentRole(ctx *Context, name string, id IDInput, state *TdmqRocketmqEnvironmentRoleState, opts ...ResourceOption) (*TdmqRocketmqEnvironmentRole, error)
public static TdmqRocketmqEnvironmentRole Get(string name, Input<string> id, TdmqRocketmqEnvironmentRoleState? state, CustomResourceOptions? opts = null)
public static TdmqRocketmqEnvironmentRole get(String name, Output<String> id, TdmqRocketmqEnvironmentRoleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TdmqRocketmqEnvironmentRole 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 - Cluster ID (required).
- Environment
Name string - Environment (namespace) name.
- Permissions List<string>
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - Role
Name string - Role Name.
- Tdmq
Rocketmq stringEnvironment Role Id - ID of the resource.
- Cluster
Id string - Cluster ID (required).
- Environment
Name string - Environment (namespace) name.
- Permissions []string
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - Role
Name string - Role Name.
- Tdmq
Rocketmq stringEnvironment Role Id - ID of the resource.
- cluster
Id String - Cluster ID (required).
- environment
Name String - Environment (namespace) name.
- permissions List<String>
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role
Name String - Role Name.
- tdmq
Rocketmq StringEnvironment Role Id - ID of the resource.
- cluster
Id string - Cluster ID (required).
- environment
Name string - Environment (namespace) name.
- permissions string[]
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role
Name string - Role Name.
- tdmq
Rocketmq stringEnvironment Role Id - ID of the resource.
- cluster_
id str - Cluster ID (required).
- environment_
name str - Environment (namespace) name.
- permissions Sequence[str]
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role_
name str - Role Name.
- tdmq_
rocketmq_ strenvironment_ role_ id - ID of the resource.
- cluster
Id String - Cluster ID (required).
- environment
Name String - Environment (namespace) name.
- permissions List<String>
- Permissions, which is a non-empty string array of
produce
andconsume
at the most. - role
Name String - Role Name.
- tdmq
Rocketmq StringEnvironment Role Id - ID of the resource.
Import
tdmqRocketmq environment_role can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tdmqRocketmqEnvironmentRole:TdmqRocketmqEnvironmentRole environment_role environmentRole_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.