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

tencentcloud.ClsWebCallback

Explore with Pulumi AI

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

    Provides a resource to create a CLS web callback

    Example Usage

    If type is WeCom

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsWebCallback("example", {
        type: "WeCom",
        webhook: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7ac695f9-8af1-443f-b2c9-9a112f0647b5",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsWebCallback("example",
        type="WeCom",
        webhook="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7ac695f9-8af1-443f-b2c9-9a112f0647b5")
    
    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.NewClsWebCallback(ctx, "example", &tencentcloud.ClsWebCallbackArgs{
    			Type:    pulumi.String("WeCom"),
    			Webhook: pulumi.String("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7ac695f9-8af1-443f-b2c9-9a112f0647b5"),
    		})
    		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.ClsWebCallback("example", new()
        {
            Type = "WeCom",
            Webhook = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7ac695f9-8af1-443f-b2c9-9a112f0647b5",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsWebCallback;
    import com.pulumi.tencentcloud.ClsWebCallbackArgs;
    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 ClsWebCallback("example", ClsWebCallbackArgs.builder()
                .type("WeCom")
                .webhook("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7ac695f9-8af1-443f-b2c9-9a112f0647b5")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsWebCallback
        properties:
          type: WeCom
          webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=7ac695f9-8af1-443f-b2c9-9a112f0647b5
    

    If type is Http

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsWebCallback("example", {
        method: "POST",
        type: "Http",
        webhook: "https://demo.com",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsWebCallback("example",
        method="POST",
        type="Http",
        webhook="https://demo.com")
    
    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.NewClsWebCallback(ctx, "example", &tencentcloud.ClsWebCallbackArgs{
    			Method:  pulumi.String("POST"),
    			Type:    pulumi.String("Http"),
    			Webhook: pulumi.String("https://demo.com"),
    		})
    		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.ClsWebCallback("example", new()
        {
            Method = "POST",
            Type = "Http",
            Webhook = "https://demo.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsWebCallback;
    import com.pulumi.tencentcloud.ClsWebCallbackArgs;
    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 ClsWebCallback("example", ClsWebCallbackArgs.builder()
                .method("POST")
                .type("Http")
                .webhook("https://demo.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsWebCallback
        properties:
          method: POST
          type: Http
          webhook: https://demo.com
    

    Create ClsWebCallback Resource

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

    Constructor syntax

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

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

    Type string
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    Webhook string
    Webhook address.
    ClsWebCallbackId string
    ID of the resource.
    Key string
    Secret key.
    Method string
    Request method. Supports POST and PUT. Required when Type is Http.
    Name string
    Notification content name.
    Type string
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    Webhook string
    Webhook address.
    ClsWebCallbackId string
    ID of the resource.
    Key string
    Secret key.
    Method string
    Request method. Supports POST and PUT. Required when Type is Http.
    Name string
    Notification content name.
    type String
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook String
    Webhook address.
    clsWebCallbackId String
    ID of the resource.
    key String
    Secret key.
    method String
    Request method. Supports POST and PUT. Required when Type is Http.
    name String
    Notification content name.
    type string
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook string
    Webhook address.
    clsWebCallbackId string
    ID of the resource.
    key string
    Secret key.
    method string
    Request method. Supports POST and PUT. Required when Type is Http.
    name string
    Notification content name.
    type str
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook str
    Webhook address.
    cls_web_callback_id str
    ID of the resource.
    key str
    Secret key.
    method str
    Request method. Supports POST and PUT. Required when Type is Http.
    name str
    Notification content name.
    type String
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook String
    Webhook address.
    clsWebCallbackId String
    ID of the resource.
    key String
    Secret key.
    method String
    Request method. Supports POST and PUT. Required when Type is Http.
    name String
    Notification content name.

    Outputs

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

    Get an existing ClsWebCallback 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?: ClsWebCallbackState, opts?: CustomResourceOptions): ClsWebCallback
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cls_web_callback_id: Optional[str] = None,
            key: Optional[str] = None,
            method: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None,
            webhook: Optional[str] = None) -> ClsWebCallback
    func GetClsWebCallback(ctx *Context, name string, id IDInput, state *ClsWebCallbackState, opts ...ResourceOption) (*ClsWebCallback, error)
    public static ClsWebCallback Get(string name, Input<string> id, ClsWebCallbackState? state, CustomResourceOptions? opts = null)
    public static ClsWebCallback get(String name, Output<String> id, ClsWebCallbackState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClsWebCallback    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:
    ClsWebCallbackId string
    ID of the resource.
    Key string
    Secret key.
    Method string
    Request method. Supports POST and PUT. Required when Type is Http.
    Name string
    Notification content name.
    Type string
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    Webhook string
    Webhook address.
    ClsWebCallbackId string
    ID of the resource.
    Key string
    Secret key.
    Method string
    Request method. Supports POST and PUT. Required when Type is Http.
    Name string
    Notification content name.
    Type string
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    Webhook string
    Webhook address.
    clsWebCallbackId String
    ID of the resource.
    key String
    Secret key.
    method String
    Request method. Supports POST and PUT. Required when Type is Http.
    name String
    Notification content name.
    type String
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook String
    Webhook address.
    clsWebCallbackId string
    ID of the resource.
    key string
    Secret key.
    method string
    Request method. Supports POST and PUT. Required when Type is Http.
    name string
    Notification content name.
    type string
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook string
    Webhook address.
    cls_web_callback_id str
    ID of the resource.
    key str
    Secret key.
    method str
    Request method. Supports POST and PUT. Required when Type is Http.
    name str
    Notification content name.
    type str
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook str
    Webhook address.
    clsWebCallbackId String
    ID of the resource.
    key String
    Secret key.
    method String
    Request method. Supports POST and PUT. Required when Type is Http.
    name String
    Notification content name.
    type String
    Channel type. WeCom: WeChat for Enterprise; DingTalk: DingTalk; Lark: Feishu; Http: custom callback.
    webhook String
    Webhook address.

    Import

    CLS web callback can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/clsWebCallback:ClsWebCallback example webcallback-f2124b3d-e1e5-412c-9034-8e2fedeec952
    

    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