tencentcloud.MqttUser
Explore with Pulumi AI
Provides a resource to create a MQTT user
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.MqttUser("example", {
instanceId: "mqtt-zxjwkr98",
password: "Password@123",
remark: "Remark.",
username: "tf-example",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.MqttUser("example",
instance_id="mqtt-zxjwkr98",
password="Password@123",
remark="Remark.",
username="tf-example")
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 {
_, err := tencentcloud.NewMqttUser(ctx, "example", &tencentcloud.MqttUserArgs{
InstanceId: pulumi.String("mqtt-zxjwkr98"),
Password: pulumi.String("Password@123"),
Remark: pulumi.String("Remark."),
Username: pulumi.String("tf-example"),
})
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 example = new Tencentcloud.MqttUser("example", new()
{
InstanceId = "mqtt-zxjwkr98",
Password = "Password@123",
Remark = "Remark.",
Username = "tf-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MqttUser;
import com.pulumi.tencentcloud.MqttUserArgs;
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 example = new MqttUser("example", MqttUserArgs.builder()
.instanceId("mqtt-zxjwkr98")
.password("Password@123")
.remark("Remark.")
.username("tf-example")
.build());
}
}
resources:
example:
type: tencentcloud:MqttUser
properties:
instanceId: mqtt-zxjwkr98
password: Password@123
remark: Remark.
username: tf-example
Create MqttUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MqttUser(name: string, args: MqttUserArgs, opts?: CustomResourceOptions);
@overload
def MqttUser(resource_name: str,
args: MqttUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MqttUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
username: Optional[str] = None,
mqtt_user_id: Optional[str] = None,
password: Optional[str] = None,
remark: Optional[str] = None)
func NewMqttUser(ctx *Context, name string, args MqttUserArgs, opts ...ResourceOption) (*MqttUser, error)
public MqttUser(string name, MqttUserArgs args, CustomResourceOptions? opts = null)
public MqttUser(String name, MqttUserArgs args)
public MqttUser(String name, MqttUserArgs args, CustomResourceOptions options)
type: tencentcloud:MqttUser
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 MqttUserArgs
- 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 MqttUserArgs
- 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 MqttUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MqttUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MqttUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MqttUser 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 MqttUser resource accepts the following input properties:
- Instance
Id string - Instance ID.
- Username string
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- Mqtt
User stringId - ID of the resource.
- Password string
- Password, when this field is empty, the backend will generate it by default.
- Remark string
- Note that the length should not exceed 128 characters.
- Instance
Id string - Instance ID.
- Username string
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- Mqtt
User stringId - ID of the resource.
- Password string
- Password, when this field is empty, the backend will generate it by default.
- Remark string
- Note that the length should not exceed 128 characters.
- instance
Id String - Instance ID.
- username String
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- mqtt
User StringId - ID of the resource.
- password String
- Password, when this field is empty, the backend will generate it by default.
- remark String
- Note that the length should not exceed 128 characters.
- instance
Id string - Instance ID.
- username string
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- mqtt
User stringId - ID of the resource.
- password string
- Password, when this field is empty, the backend will generate it by default.
- remark string
- Note that the length should not exceed 128 characters.
- instance_
id str - Instance ID.
- username str
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- mqtt_
user_ strid - ID of the resource.
- password str
- Password, when this field is empty, the backend will generate it by default.
- remark str
- Note that the length should not exceed 128 characters.
- instance
Id String - Instance ID.
- username String
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- mqtt
User StringId - ID of the resource.
- password String
- Password, when this field is empty, the backend will generate it by default.
- remark String
- Note that the length should not exceed 128 characters.
Outputs
All input properties are implicitly available as output properties. Additionally, the MqttUser resource produces the following output properties:
- Created
Time double - Creation time, millisecond timestamp.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
Time double - Modify time, millisecond timestamp.
- Created
Time float64 - Creation time, millisecond timestamp.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
Time float64 - Modify time, millisecond timestamp.
- created
Time Double - Creation time, millisecond timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
Time Double - Modify time, millisecond timestamp.
- created
Time number - Creation time, millisecond timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
Time number - Modify time, millisecond timestamp.
- created_
time float - Creation time, millisecond timestamp.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
time float - Modify time, millisecond timestamp.
- created
Time Number - Creation time, millisecond timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
Time Number - Modify time, millisecond timestamp.
Look up Existing MqttUser Resource
Get an existing MqttUser 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?: MqttUserState, opts?: CustomResourceOptions): MqttUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_time: Optional[float] = None,
instance_id: Optional[str] = None,
modified_time: Optional[float] = None,
mqtt_user_id: Optional[str] = None,
password: Optional[str] = None,
remark: Optional[str] = None,
username: Optional[str] = None) -> MqttUser
func GetMqttUser(ctx *Context, name string, id IDInput, state *MqttUserState, opts ...ResourceOption) (*MqttUser, error)
public static MqttUser Get(string name, Input<string> id, MqttUserState? state, CustomResourceOptions? opts = null)
public static MqttUser get(String name, Output<String> id, MqttUserState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MqttUser 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.
- Created
Time double - Creation time, millisecond timestamp.
- Instance
Id string - Instance ID.
- Modified
Time double - Modify time, millisecond timestamp.
- Mqtt
User stringId - ID of the resource.
- Password string
- Password, when this field is empty, the backend will generate it by default.
- Remark string
- Note that the length should not exceed 128 characters.
- Username string
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- Created
Time float64 - Creation time, millisecond timestamp.
- Instance
Id string - Instance ID.
- Modified
Time float64 - Modify time, millisecond timestamp.
- Mqtt
User stringId - ID of the resource.
- Password string
- Password, when this field is empty, the backend will generate it by default.
- Remark string
- Note that the length should not exceed 128 characters.
- Username string
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- created
Time Double - Creation time, millisecond timestamp.
- instance
Id String - Instance ID.
- modified
Time Double - Modify time, millisecond timestamp.
- mqtt
User StringId - ID of the resource.
- password String
- Password, when this field is empty, the backend will generate it by default.
- remark String
- Note that the length should not exceed 128 characters.
- username String
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- created
Time number - Creation time, millisecond timestamp.
- instance
Id string - Instance ID.
- modified
Time number - Modify time, millisecond timestamp.
- mqtt
User stringId - ID of the resource.
- password string
- Password, when this field is empty, the backend will generate it by default.
- remark string
- Note that the length should not exceed 128 characters.
- username string
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- created_
time float - Creation time, millisecond timestamp.
- instance_
id str - Instance ID.
- modified_
time float - Modify time, millisecond timestamp.
- mqtt_
user_ strid - ID of the resource.
- password str
- Password, when this field is empty, the backend will generate it by default.
- remark str
- Note that the length should not exceed 128 characters.
- username str
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
- created
Time Number - Creation time, millisecond timestamp.
- instance
Id String - Instance ID.
- modified
Time Number - Modify time, millisecond timestamp.
- mqtt
User StringId - ID of the resource.
- password String
- Password, when this field is empty, the backend will generate it by default.
- remark String
- Note that the length should not exceed 128 characters.
- username String
- Username, cannot be empty, only supports uppercase and lowercase letter separators ("_", "-"), cannot exceed 32 characters.
Import
MQTT user can be imported using the id, e.g.
$ pulumi import tencentcloud:index/mqttUser:MqttUser example mqtt-zxjwkr98#tf-example
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.