tencentcloud.TrocketRocketmqRole
Explore with Pulumi AI
Provides a resource to create a trocket rocketmq_role
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const rocketmqInstance = new tencentcloud.TrocketRocketmqInstance("rocketmqInstance", {
instanceType: "EXPERIMENT",
skuCode: "experiment_500",
remark: "test",
vpcId: "vpc-xxxxx",
subnetId: "subnet-xxxxx",
tags: {
tag_key: "rocketmq",
tag_value: "5.x",
},
});
const rocketmqRole = new tencentcloud.TrocketRocketmqRole("rocketmqRole", {
instanceId: rocketmqInstance.trocketRocketmqInstanceId,
role: "test_role",
remark: "test for terraform",
permWrite: false,
permRead: true,
});
export const accessKey = rocketmqRole.accessKey;
export const secretKey = rocketmqRole.secretKey;
import pulumi
import pulumi_tencentcloud as tencentcloud
rocketmq_instance = tencentcloud.TrocketRocketmqInstance("rocketmqInstance",
instance_type="EXPERIMENT",
sku_code="experiment_500",
remark="test",
vpc_id="vpc-xxxxx",
subnet_id="subnet-xxxxx",
tags={
"tag_key": "rocketmq",
"tag_value": "5.x",
})
rocketmq_role = tencentcloud.TrocketRocketmqRole("rocketmqRole",
instance_id=rocketmq_instance.trocket_rocketmq_instance_id,
role="test_role",
remark="test for terraform",
perm_write=False,
perm_read=True)
pulumi.export("accessKey", rocketmq_role.access_key)
pulumi.export("secretKey", rocketmq_role.secret_key)
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 {
rocketmqInstance, err := tencentcloud.NewTrocketRocketmqInstance(ctx, "rocketmqInstance", &tencentcloud.TrocketRocketmqInstanceArgs{
InstanceType: pulumi.String("EXPERIMENT"),
SkuCode: pulumi.String("experiment_500"),
Remark: pulumi.String("test"),
VpcId: pulumi.String("vpc-xxxxx"),
SubnetId: pulumi.String("subnet-xxxxx"),
Tags: pulumi.StringMap{
"tag_key": pulumi.String("rocketmq"),
"tag_value": pulumi.String("5.x"),
},
})
if err != nil {
return err
}
rocketmqRole, err := tencentcloud.NewTrocketRocketmqRole(ctx, "rocketmqRole", &tencentcloud.TrocketRocketmqRoleArgs{
InstanceId: rocketmqInstance.TrocketRocketmqInstanceId,
Role: pulumi.String("test_role"),
Remark: pulumi.String("test for terraform"),
PermWrite: pulumi.Bool(false),
PermRead: pulumi.Bool(true),
})
if err != nil {
return err
}
ctx.Export("accessKey", rocketmqRole.AccessKey)
ctx.Export("secretKey", rocketmqRole.SecretKey)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var rocketmqInstance = new Tencentcloud.TrocketRocketmqInstance("rocketmqInstance", new()
{
InstanceType = "EXPERIMENT",
SkuCode = "experiment_500",
Remark = "test",
VpcId = "vpc-xxxxx",
SubnetId = "subnet-xxxxx",
Tags =
{
{ "tag_key", "rocketmq" },
{ "tag_value", "5.x" },
},
});
var rocketmqRole = new Tencentcloud.TrocketRocketmqRole("rocketmqRole", new()
{
InstanceId = rocketmqInstance.TrocketRocketmqInstanceId,
Role = "test_role",
Remark = "test for terraform",
PermWrite = false,
PermRead = true,
});
return new Dictionary<string, object?>
{
["accessKey"] = rocketmqRole.AccessKey,
["secretKey"] = rocketmqRole.SecretKey,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TrocketRocketmqInstance;
import com.pulumi.tencentcloud.TrocketRocketmqInstanceArgs;
import com.pulumi.tencentcloud.TrocketRocketmqRole;
import com.pulumi.tencentcloud.TrocketRocketmqRoleArgs;
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 rocketmqInstance = new TrocketRocketmqInstance("rocketmqInstance", TrocketRocketmqInstanceArgs.builder()
.instanceType("EXPERIMENT")
.skuCode("experiment_500")
.remark("test")
.vpcId("vpc-xxxxx")
.subnetId("subnet-xxxxx")
.tags(Map.ofEntries(
Map.entry("tag_key", "rocketmq"),
Map.entry("tag_value", "5.x")
))
.build());
var rocketmqRole = new TrocketRocketmqRole("rocketmqRole", TrocketRocketmqRoleArgs.builder()
.instanceId(rocketmqInstance.trocketRocketmqInstanceId())
.role("test_role")
.remark("test for terraform")
.permWrite(false)
.permRead(true)
.build());
ctx.export("accessKey", rocketmqRole.accessKey());
ctx.export("secretKey", rocketmqRole.secretKey());
}
}
resources:
rocketmqInstance:
type: tencentcloud:TrocketRocketmqInstance
properties:
instanceType: EXPERIMENT
skuCode: experiment_500
remark: test
vpcId: vpc-xxxxx
subnetId: subnet-xxxxx
tags:
tag_key: rocketmq
tag_value: 5.x
rocketmqRole:
type: tencentcloud:TrocketRocketmqRole
properties:
instanceId: ${rocketmqInstance.trocketRocketmqInstanceId}
role: test_role
remark: test for terraform
permWrite: false
permRead: true
outputs:
accessKey: ${rocketmqRole.accessKey}
secretKey: ${rocketmqRole.secretKey}
Create TrocketRocketmqRole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrocketRocketmqRole(name: string, args: TrocketRocketmqRoleArgs, opts?: CustomResourceOptions);
@overload
def TrocketRocketmqRole(resource_name: str,
args: TrocketRocketmqRoleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrocketRocketmqRole(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
perm_read: Optional[bool] = None,
perm_write: Optional[bool] = None,
remark: Optional[str] = None,
role: Optional[str] = None,
trocket_rocketmq_role_id: Optional[str] = None)
func NewTrocketRocketmqRole(ctx *Context, name string, args TrocketRocketmqRoleArgs, opts ...ResourceOption) (*TrocketRocketmqRole, error)
public TrocketRocketmqRole(string name, TrocketRocketmqRoleArgs args, CustomResourceOptions? opts = null)
public TrocketRocketmqRole(String name, TrocketRocketmqRoleArgs args)
public TrocketRocketmqRole(String name, TrocketRocketmqRoleArgs args, CustomResourceOptions options)
type: tencentcloud:TrocketRocketmqRole
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 TrocketRocketmqRoleArgs
- 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 TrocketRocketmqRoleArgs
- 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 TrocketRocketmqRoleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrocketRocketmqRoleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrocketRocketmqRoleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TrocketRocketmqRole 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 TrocketRocketmqRole resource accepts the following input properties:
- Instance
Id string - ID of instance.
- Perm
Read bool - Whether to enable consumption permission.
- Perm
Write bool - Whether to enable production permission.
- Remark string
- remark.
- Role string
- Name of role.
- Trocket
Rocketmq stringRole Id - ID of the resource.
- Instance
Id string - ID of instance.
- Perm
Read bool - Whether to enable consumption permission.
- Perm
Write bool - Whether to enable production permission.
- Remark string
- remark.
- Role string
- Name of role.
- Trocket
Rocketmq stringRole Id - ID of the resource.
- instance
Id String - ID of instance.
- perm
Read Boolean - Whether to enable consumption permission.
- perm
Write Boolean - Whether to enable production permission.
- remark String
- remark.
- role String
- Name of role.
- trocket
Rocketmq StringRole Id - ID of the resource.
- instance
Id string - ID of instance.
- perm
Read boolean - Whether to enable consumption permission.
- perm
Write boolean - Whether to enable production permission.
- remark string
- remark.
- role string
- Name of role.
- trocket
Rocketmq stringRole Id - ID of the resource.
- instance_
id str - ID of instance.
- perm_
read bool - Whether to enable consumption permission.
- perm_
write bool - Whether to enable production permission.
- remark str
- remark.
- role str
- Name of role.
- trocket_
rocketmq_ strrole_ id - ID of the resource.
- instance
Id String - ID of instance.
- perm
Read Boolean - Whether to enable consumption permission.
- perm
Write Boolean - Whether to enable production permission.
- remark String
- remark.
- role String
- Name of role.
- trocket
Rocketmq StringRole Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrocketRocketmqRole resource produces the following output properties:
- Access
Key string - Access key.
- Created
Time double - Created time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
Time double - Modified time.
- Secret
Key string - Secret key.
- Access
Key string - Access key.
- Created
Time float64 - Created time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
Time float64 - Modified time.
- Secret
Key string - Secret key.
- access
Key String - Access key.
- created
Time Double - Created time.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
Time Double - Modified time.
- secret
Key String - Secret key.
- access
Key string - Access key.
- created
Time number - Created time.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
Time number - Modified time.
- secret
Key string - Secret key.
- access_
key str - Access key.
- created_
time float - Created time.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
time float - Modified time.
- secret_
key str - Secret key.
- access
Key String - Access key.
- created
Time Number - Created time.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
Time Number - Modified time.
- secret
Key String - Secret key.
Look up Existing TrocketRocketmqRole Resource
Get an existing TrocketRocketmqRole 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?: TrocketRocketmqRoleState, opts?: CustomResourceOptions): TrocketRocketmqRole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
created_time: Optional[float] = None,
instance_id: Optional[str] = None,
modified_time: Optional[float] = None,
perm_read: Optional[bool] = None,
perm_write: Optional[bool] = None,
remark: Optional[str] = None,
role: Optional[str] = None,
secret_key: Optional[str] = None,
trocket_rocketmq_role_id: Optional[str] = None) -> TrocketRocketmqRole
func GetTrocketRocketmqRole(ctx *Context, name string, id IDInput, state *TrocketRocketmqRoleState, opts ...ResourceOption) (*TrocketRocketmqRole, error)
public static TrocketRocketmqRole Get(string name, Input<string> id, TrocketRocketmqRoleState? state, CustomResourceOptions? opts = null)
public static TrocketRocketmqRole get(String name, Output<String> id, TrocketRocketmqRoleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TrocketRocketmqRole 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.
- Access
Key string - Access key.
- Created
Time double - Created time.
- Instance
Id string - ID of instance.
- Modified
Time double - Modified time.
- Perm
Read bool - Whether to enable consumption permission.
- Perm
Write bool - Whether to enable production permission.
- Remark string
- remark.
- Role string
- Name of role.
- Secret
Key string - Secret key.
- Trocket
Rocketmq stringRole Id - ID of the resource.
- Access
Key string - Access key.
- Created
Time float64 - Created time.
- Instance
Id string - ID of instance.
- Modified
Time float64 - Modified time.
- Perm
Read bool - Whether to enable consumption permission.
- Perm
Write bool - Whether to enable production permission.
- Remark string
- remark.
- Role string
- Name of role.
- Secret
Key string - Secret key.
- Trocket
Rocketmq stringRole Id - ID of the resource.
- access
Key String - Access key.
- created
Time Double - Created time.
- instance
Id String - ID of instance.
- modified
Time Double - Modified time.
- perm
Read Boolean - Whether to enable consumption permission.
- perm
Write Boolean - Whether to enable production permission.
- remark String
- remark.
- role String
- Name of role.
- secret
Key String - Secret key.
- trocket
Rocketmq StringRole Id - ID of the resource.
- access
Key string - Access key.
- created
Time number - Created time.
- instance
Id string - ID of instance.
- modified
Time number - Modified time.
- perm
Read boolean - Whether to enable consumption permission.
- perm
Write boolean - Whether to enable production permission.
- remark string
- remark.
- role string
- Name of role.
- secret
Key string - Secret key.
- trocket
Rocketmq stringRole Id - ID of the resource.
- access_
key str - Access key.
- created_
time float - Created time.
- instance_
id str - ID of instance.
- modified_
time float - Modified time.
- perm_
read bool - Whether to enable consumption permission.
- perm_
write bool - Whether to enable production permission.
- remark str
- remark.
- role str
- Name of role.
- secret_
key str - Secret key.
- trocket_
rocketmq_ strrole_ id - ID of the resource.
- access
Key String - Access key.
- created
Time Number - Created time.
- instance
Id String - ID of instance.
- modified
Time Number - Modified time.
- perm
Read Boolean - Whether to enable consumption permission.
- perm
Write Boolean - Whether to enable production permission.
- remark String
- remark.
- role String
- Name of role.
- secret
Key String - Secret key.
- trocket
Rocketmq StringRole Id - ID of the resource.
Import
trocket rocketmq_role can be imported using the id, e.g.
$ pulumi import tencentcloud:index/trocketRocketmqRole:TrocketRocketmqRole rocketmq_role instanceId#role
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.