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

tencentcloud.MqttHttpAuthenticator

Explore with Pulumi AI

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

    Provides a resource to create a MQTT http authenticator

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.MqttHttpAuthenticator("example", {
        bodies: [{
            key: "bodyKey",
            value: "bodyValue",
        }],
        concurrency: 8,
        connectTimeout: 10,
        endpoint: "https://example.com",
        headers: [{
            key: "Content-type",
            value: "application/json",
        }],
        instanceId: "mqtt-zxjwkr98",
        method: "POST",
        readTimeout: 10,
        remark: "Remark.",
        status: "open",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.MqttHttpAuthenticator("example",
        bodies=[{
            "key": "bodyKey",
            "value": "bodyValue",
        }],
        concurrency=8,
        connect_timeout=10,
        endpoint="https://example.com",
        headers=[{
            "key": "Content-type",
            "value": "application/json",
        }],
        instance_id="mqtt-zxjwkr98",
        method="POST",
        read_timeout=10,
        remark="Remark.",
        status="open")
    
    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.NewMqttHttpAuthenticator(ctx, "example", &tencentcloud.MqttHttpAuthenticatorArgs{
    			Bodies: tencentcloud.MqttHttpAuthenticatorBodyArray{
    				&tencentcloud.MqttHttpAuthenticatorBodyArgs{
    					Key:   pulumi.String("bodyKey"),
    					Value: pulumi.String("bodyValue"),
    				},
    			},
    			Concurrency:    pulumi.Float64(8),
    			ConnectTimeout: pulumi.Float64(10),
    			Endpoint:       pulumi.String("https://example.com"),
    			Headers: tencentcloud.MqttHttpAuthenticatorHeaderArray{
    				&tencentcloud.MqttHttpAuthenticatorHeaderArgs{
    					Key:   pulumi.String("Content-type"),
    					Value: pulumi.String("application/json"),
    				},
    			},
    			InstanceId:  pulumi.String("mqtt-zxjwkr98"),
    			Method:      pulumi.String("POST"),
    			ReadTimeout: pulumi.Float64(10),
    			Remark:      pulumi.String("Remark."),
    			Status:      pulumi.String("open"),
    		})
    		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.MqttHttpAuthenticator("example", new()
        {
            Bodies = new[]
            {
                new Tencentcloud.Inputs.MqttHttpAuthenticatorBodyArgs
                {
                    Key = "bodyKey",
                    Value = "bodyValue",
                },
            },
            Concurrency = 8,
            ConnectTimeout = 10,
            Endpoint = "https://example.com",
            Headers = new[]
            {
                new Tencentcloud.Inputs.MqttHttpAuthenticatorHeaderArgs
                {
                    Key = "Content-type",
                    Value = "application/json",
                },
            },
            InstanceId = "mqtt-zxjwkr98",
            Method = "POST",
            ReadTimeout = 10,
            Remark = "Remark.",
            Status = "open",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MqttHttpAuthenticator;
    import com.pulumi.tencentcloud.MqttHttpAuthenticatorArgs;
    import com.pulumi.tencentcloud.inputs.MqttHttpAuthenticatorBodyArgs;
    import com.pulumi.tencentcloud.inputs.MqttHttpAuthenticatorHeaderArgs;
    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 MqttHttpAuthenticator("example", MqttHttpAuthenticatorArgs.builder()
                .bodies(MqttHttpAuthenticatorBodyArgs.builder()
                    .key("bodyKey")
                    .value("bodyValue")
                    .build())
                .concurrency(8)
                .connectTimeout(10)
                .endpoint("https://example.com")
                .headers(MqttHttpAuthenticatorHeaderArgs.builder()
                    .key("Content-type")
                    .value("application/json")
                    .build())
                .instanceId("mqtt-zxjwkr98")
                .method("POST")
                .readTimeout(10)
                .remark("Remark.")
                .status("open")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:MqttHttpAuthenticator
        properties:
          bodies:
            - key: bodyKey
              value: bodyValue
          concurrency: 8
          connectTimeout: 10
          endpoint: https://example.com
          headers:
            - key: Content-type
              value: application/json
          instanceId: mqtt-zxjwkr98
          method: POST
          readTimeout: 10
          remark: Remark.
          status: open
    

    Create MqttHttpAuthenticator Resource

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

    Constructor syntax

    new MqttHttpAuthenticator(name: string, args: MqttHttpAuthenticatorArgs, opts?: CustomResourceOptions);
    @overload
    def MqttHttpAuthenticator(resource_name: str,
                              args: MqttHttpAuthenticatorArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def MqttHttpAuthenticator(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              endpoint: Optional[str] = None,
                              instance_id: Optional[str] = None,
                              bodies: Optional[Sequence[MqttHttpAuthenticatorBodyArgs]] = None,
                              concurrency: Optional[float] = None,
                              connect_timeout: Optional[float] = None,
                              headers: Optional[Sequence[MqttHttpAuthenticatorHeaderArgs]] = None,
                              method: Optional[str] = None,
                              mqtt_http_authenticator_id: Optional[str] = None,
                              read_timeout: Optional[float] = None,
                              remark: Optional[str] = None,
                              status: Optional[str] = None)
    func NewMqttHttpAuthenticator(ctx *Context, name string, args MqttHttpAuthenticatorArgs, opts ...ResourceOption) (*MqttHttpAuthenticator, error)
    public MqttHttpAuthenticator(string name, MqttHttpAuthenticatorArgs args, CustomResourceOptions? opts = null)
    public MqttHttpAuthenticator(String name, MqttHttpAuthenticatorArgs args)
    public MqttHttpAuthenticator(String name, MqttHttpAuthenticatorArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MqttHttpAuthenticator
    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 MqttHttpAuthenticatorArgs
    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 MqttHttpAuthenticatorArgs
    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 MqttHttpAuthenticatorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MqttHttpAuthenticatorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MqttHttpAuthenticatorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Endpoint string
    JWKS endpoint.
    InstanceId string
    Instance ID.
    Bodies List<MqttHttpAuthenticatorBody>
    Forwarding request body.
    Concurrency double
    Maximum concurrent connections, default 8, range: 1-20.
    ConnectTimeout double
    Connection timeout, unit: seconds, range: 1-30.
    Headers List<MqttHttpAuthenticatorHeader>
    Forwarding request header.
    Method string
    Network request method GET or POST, default POST.
    MqttHttpAuthenticatorId string
    ID of the resource.
    ReadTimeout double
    Request timeout, unit: seconds, range: 1-30.
    Remark string
    Remark.
    Status string
    Is the authenticator enabled: open enable; Close close.
    Endpoint string
    JWKS endpoint.
    InstanceId string
    Instance ID.
    Bodies []MqttHttpAuthenticatorBodyArgs
    Forwarding request body.
    Concurrency float64
    Maximum concurrent connections, default 8, range: 1-20.
    ConnectTimeout float64
    Connection timeout, unit: seconds, range: 1-30.
    Headers []MqttHttpAuthenticatorHeaderArgs
    Forwarding request header.
    Method string
    Network request method GET or POST, default POST.
    MqttHttpAuthenticatorId string
    ID of the resource.
    ReadTimeout float64
    Request timeout, unit: seconds, range: 1-30.
    Remark string
    Remark.
    Status string
    Is the authenticator enabled: open enable; Close close.
    endpoint String
    JWKS endpoint.
    instanceId String
    Instance ID.
    bodies List<MqttHttpAuthenticatorBody>
    Forwarding request body.
    concurrency Double
    Maximum concurrent connections, default 8, range: 1-20.
    connectTimeout Double
    Connection timeout, unit: seconds, range: 1-30.
    headers List<MqttHttpAuthenticatorHeader>
    Forwarding request header.
    method String
    Network request method GET or POST, default POST.
    mqttHttpAuthenticatorId String
    ID of the resource.
    readTimeout Double
    Request timeout, unit: seconds, range: 1-30.
    remark String
    Remark.
    status String
    Is the authenticator enabled: open enable; Close close.
    endpoint string
    JWKS endpoint.
    instanceId string
    Instance ID.
    bodies MqttHttpAuthenticatorBody[]
    Forwarding request body.
    concurrency number
    Maximum concurrent connections, default 8, range: 1-20.
    connectTimeout number
    Connection timeout, unit: seconds, range: 1-30.
    headers MqttHttpAuthenticatorHeader[]
    Forwarding request header.
    method string
    Network request method GET or POST, default POST.
    mqttHttpAuthenticatorId string
    ID of the resource.
    readTimeout number
    Request timeout, unit: seconds, range: 1-30.
    remark string
    Remark.
    status string
    Is the authenticator enabled: open enable; Close close.
    endpoint str
    JWKS endpoint.
    instance_id str
    Instance ID.
    bodies Sequence[MqttHttpAuthenticatorBodyArgs]
    Forwarding request body.
    concurrency float
    Maximum concurrent connections, default 8, range: 1-20.
    connect_timeout float
    Connection timeout, unit: seconds, range: 1-30.
    headers Sequence[MqttHttpAuthenticatorHeaderArgs]
    Forwarding request header.
    method str
    Network request method GET or POST, default POST.
    mqtt_http_authenticator_id str
    ID of the resource.
    read_timeout float
    Request timeout, unit: seconds, range: 1-30.
    remark str
    Remark.
    status str
    Is the authenticator enabled: open enable; Close close.
    endpoint String
    JWKS endpoint.
    instanceId String
    Instance ID.
    bodies List<Property Map>
    Forwarding request body.
    concurrency Number
    Maximum concurrent connections, default 8, range: 1-20.
    connectTimeout Number
    Connection timeout, unit: seconds, range: 1-30.
    headers List<Property Map>
    Forwarding request header.
    method String
    Network request method GET or POST, default POST.
    mqttHttpAuthenticatorId String
    ID of the resource.
    readTimeout Number
    Request timeout, unit: seconds, range: 1-30.
    remark String
    Remark.
    status String
    Is the authenticator enabled: open enable; Close close.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MqttHttpAuthenticator 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 MqttHttpAuthenticator Resource

    Get an existing MqttHttpAuthenticator 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?: MqttHttpAuthenticatorState, opts?: CustomResourceOptions): MqttHttpAuthenticator
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bodies: Optional[Sequence[MqttHttpAuthenticatorBodyArgs]] = None,
            concurrency: Optional[float] = None,
            connect_timeout: Optional[float] = None,
            endpoint: Optional[str] = None,
            headers: Optional[Sequence[MqttHttpAuthenticatorHeaderArgs]] = None,
            instance_id: Optional[str] = None,
            method: Optional[str] = None,
            mqtt_http_authenticator_id: Optional[str] = None,
            read_timeout: Optional[float] = None,
            remark: Optional[str] = None,
            status: Optional[str] = None) -> MqttHttpAuthenticator
    func GetMqttHttpAuthenticator(ctx *Context, name string, id IDInput, state *MqttHttpAuthenticatorState, opts ...ResourceOption) (*MqttHttpAuthenticator, error)
    public static MqttHttpAuthenticator Get(string name, Input<string> id, MqttHttpAuthenticatorState? state, CustomResourceOptions? opts = null)
    public static MqttHttpAuthenticator get(String name, Output<String> id, MqttHttpAuthenticatorState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MqttHttpAuthenticator    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:
    Bodies List<MqttHttpAuthenticatorBody>
    Forwarding request body.
    Concurrency double
    Maximum concurrent connections, default 8, range: 1-20.
    ConnectTimeout double
    Connection timeout, unit: seconds, range: 1-30.
    Endpoint string
    JWKS endpoint.
    Headers List<MqttHttpAuthenticatorHeader>
    Forwarding request header.
    InstanceId string
    Instance ID.
    Method string
    Network request method GET or POST, default POST.
    MqttHttpAuthenticatorId string
    ID of the resource.
    ReadTimeout double
    Request timeout, unit: seconds, range: 1-30.
    Remark string
    Remark.
    Status string
    Is the authenticator enabled: open enable; Close close.
    Bodies []MqttHttpAuthenticatorBodyArgs
    Forwarding request body.
    Concurrency float64
    Maximum concurrent connections, default 8, range: 1-20.
    ConnectTimeout float64
    Connection timeout, unit: seconds, range: 1-30.
    Endpoint string
    JWKS endpoint.
    Headers []MqttHttpAuthenticatorHeaderArgs
    Forwarding request header.
    InstanceId string
    Instance ID.
    Method string
    Network request method GET or POST, default POST.
    MqttHttpAuthenticatorId string
    ID of the resource.
    ReadTimeout float64
    Request timeout, unit: seconds, range: 1-30.
    Remark string
    Remark.
    Status string
    Is the authenticator enabled: open enable; Close close.
    bodies List<MqttHttpAuthenticatorBody>
    Forwarding request body.
    concurrency Double
    Maximum concurrent connections, default 8, range: 1-20.
    connectTimeout Double
    Connection timeout, unit: seconds, range: 1-30.
    endpoint String
    JWKS endpoint.
    headers List<MqttHttpAuthenticatorHeader>
    Forwarding request header.
    instanceId String
    Instance ID.
    method String
    Network request method GET or POST, default POST.
    mqttHttpAuthenticatorId String
    ID of the resource.
    readTimeout Double
    Request timeout, unit: seconds, range: 1-30.
    remark String
    Remark.
    status String
    Is the authenticator enabled: open enable; Close close.
    bodies MqttHttpAuthenticatorBody[]
    Forwarding request body.
    concurrency number
    Maximum concurrent connections, default 8, range: 1-20.
    connectTimeout number
    Connection timeout, unit: seconds, range: 1-30.
    endpoint string
    JWKS endpoint.
    headers MqttHttpAuthenticatorHeader[]
    Forwarding request header.
    instanceId string
    Instance ID.
    method string
    Network request method GET or POST, default POST.
    mqttHttpAuthenticatorId string
    ID of the resource.
    readTimeout number
    Request timeout, unit: seconds, range: 1-30.
    remark string
    Remark.
    status string
    Is the authenticator enabled: open enable; Close close.
    bodies Sequence[MqttHttpAuthenticatorBodyArgs]
    Forwarding request body.
    concurrency float
    Maximum concurrent connections, default 8, range: 1-20.
    connect_timeout float
    Connection timeout, unit: seconds, range: 1-30.
    endpoint str
    JWKS endpoint.
    headers Sequence[MqttHttpAuthenticatorHeaderArgs]
    Forwarding request header.
    instance_id str
    Instance ID.
    method str
    Network request method GET or POST, default POST.
    mqtt_http_authenticator_id str
    ID of the resource.
    read_timeout float
    Request timeout, unit: seconds, range: 1-30.
    remark str
    Remark.
    status str
    Is the authenticator enabled: open enable; Close close.
    bodies List<Property Map>
    Forwarding request body.
    concurrency Number
    Maximum concurrent connections, default 8, range: 1-20.
    connectTimeout Number
    Connection timeout, unit: seconds, range: 1-30.
    endpoint String
    JWKS endpoint.
    headers List<Property Map>
    Forwarding request header.
    instanceId String
    Instance ID.
    method String
    Network request method GET or POST, default POST.
    mqttHttpAuthenticatorId String
    ID of the resource.
    readTimeout Number
    Request timeout, unit: seconds, range: 1-30.
    remark String
    Remark.
    status String
    Is the authenticator enabled: open enable; Close close.

    Supporting Types

    MqttHttpAuthenticatorBody, MqttHttpAuthenticatorBodyArgs

    Key string
    Body key.
    Value string
    Body key.
    Key string
    Body key.
    Value string
    Body key.
    key String
    Body key.
    value String
    Body key.
    key string
    Body key.
    value string
    Body key.
    key str
    Body key.
    value str
    Body key.
    key String
    Body key.
    value String
    Body key.

    MqttHttpAuthenticatorHeader, MqttHttpAuthenticatorHeaderArgs

    Key string
    Header key.
    Value string
    Header value.
    Key string
    Header key.
    Value string
    Header value.
    key String
    Header key.
    value String
    Header value.
    key string
    Header key.
    value string
    Header value.
    key str
    Header key.
    value str
    Header value.
    key String
    Header key.
    value String
    Header value.

    Import

    MQTT http authenticator can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/mqttHttpAuthenticator:MqttHttpAuthenticator example mqtt-zxjwkr98
    

    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