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

tencentcloud.WafAntiInfoLeak

Explore with Pulumi AI

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

    Provides a resource to create a waf anti_info_leak

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.WafAntiInfoLeak("example", {
        actionType: 0,
        domain: "tf.example.com",
        status: 1,
        strategies: [{
            content: "phone",
            field: "information",
        }],
        uri: "/anti_info_leak_url",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.WafAntiInfoLeak("example",
        action_type=0,
        domain="tf.example.com",
        status=1,
        strategies=[{
            "content": "phone",
            "field": "information",
        }],
        uri="/anti_info_leak_url")
    
    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.NewWafAntiInfoLeak(ctx, "example", &tencentcloud.WafAntiInfoLeakArgs{
    			ActionType: pulumi.Float64(0),
    			Domain:     pulumi.String("tf.example.com"),
    			Status:     pulumi.Float64(1),
    			Strategies: tencentcloud.WafAntiInfoLeakStrategyArray{
    				&tencentcloud.WafAntiInfoLeakStrategyArgs{
    					Content: pulumi.String("phone"),
    					Field:   pulumi.String("information"),
    				},
    			},
    			Uri: pulumi.String("/anti_info_leak_url"),
    		})
    		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.WafAntiInfoLeak("example", new()
        {
            ActionType = 0,
            Domain = "tf.example.com",
            Status = 1,
            Strategies = new[]
            {
                new Tencentcloud.Inputs.WafAntiInfoLeakStrategyArgs
                {
                    Content = "phone",
                    Field = "information",
                },
            },
            Uri = "/anti_info_leak_url",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.WafAntiInfoLeak;
    import com.pulumi.tencentcloud.WafAntiInfoLeakArgs;
    import com.pulumi.tencentcloud.inputs.WafAntiInfoLeakStrategyArgs;
    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 WafAntiInfoLeak("example", WafAntiInfoLeakArgs.builder()
                .actionType(0)
                .domain("tf.example.com")
                .status(1)
                .strategies(WafAntiInfoLeakStrategyArgs.builder()
                    .content("phone")
                    .field("information")
                    .build())
                .uri("/anti_info_leak_url")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:WafAntiInfoLeak
        properties:
          actionType: 0
          domain: tf.example.com
          status: 1
          strategies:
            - content: phone
              field: information
          uri: /anti_info_leak_url
    

    Create WafAntiInfoLeak Resource

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

    Constructor syntax

    new WafAntiInfoLeak(name: string, args: WafAntiInfoLeakArgs, opts?: CustomResourceOptions);
    @overload
    def WafAntiInfoLeak(resource_name: str,
                        args: WafAntiInfoLeakArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafAntiInfoLeak(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        action_type: Optional[float] = None,
                        domain: Optional[str] = None,
                        strategies: Optional[Sequence[WafAntiInfoLeakStrategyArgs]] = None,
                        uri: Optional[str] = None,
                        name: Optional[str] = None,
                        status: Optional[float] = None,
                        waf_anti_info_leak_id: Optional[str] = None)
    func NewWafAntiInfoLeak(ctx *Context, name string, args WafAntiInfoLeakArgs, opts ...ResourceOption) (*WafAntiInfoLeak, error)
    public WafAntiInfoLeak(string name, WafAntiInfoLeakArgs args, CustomResourceOptions? opts = null)
    public WafAntiInfoLeak(String name, WafAntiInfoLeakArgs args)
    public WafAntiInfoLeak(String name, WafAntiInfoLeakArgs args, CustomResourceOptions options)
    
    type: tencentcloud:WafAntiInfoLeak
    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 WafAntiInfoLeakArgs
    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 WafAntiInfoLeakArgs
    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 WafAntiInfoLeakArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafAntiInfoLeakArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafAntiInfoLeakArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ActionType double
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    Domain string
    Domain.
    Strategies List<WafAntiInfoLeakStrategy>
    Strategies detail.
    Uri string
    Uri.
    Name string
    Rule Name.
    Status double
    status.
    WafAntiInfoLeakId string
    ID of the resource.
    ActionType float64
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    Domain string
    Domain.
    Strategies []WafAntiInfoLeakStrategyArgs
    Strategies detail.
    Uri string
    Uri.
    Name string
    Rule Name.
    Status float64
    status.
    WafAntiInfoLeakId string
    ID of the resource.
    actionType Double
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain String
    Domain.
    strategies List<WafAntiInfoLeakStrategy>
    Strategies detail.
    uri String
    Uri.
    name String
    Rule Name.
    status Double
    status.
    wafAntiInfoLeakId String
    ID of the resource.
    actionType number
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain string
    Domain.
    strategies WafAntiInfoLeakStrategy[]
    Strategies detail.
    uri string
    Uri.
    name string
    Rule Name.
    status number
    status.
    wafAntiInfoLeakId string
    ID of the resource.
    action_type float
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain str
    Domain.
    strategies Sequence[WafAntiInfoLeakStrategyArgs]
    Strategies detail.
    uri str
    Uri.
    name str
    Rule Name.
    status float
    status.
    waf_anti_info_leak_id str
    ID of the resource.
    actionType Number
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain String
    Domain.
    strategies List<Property Map>
    Strategies detail.
    uri String
    Uri.
    name String
    Rule Name.
    status Number
    status.
    wafAntiInfoLeakId String
    ID of the resource.

    Outputs

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

    Get an existing WafAntiInfoLeak 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?: WafAntiInfoLeakState, opts?: CustomResourceOptions): WafAntiInfoLeak
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action_type: Optional[float] = None,
            domain: Optional[str] = None,
            name: Optional[str] = None,
            status: Optional[float] = None,
            strategies: Optional[Sequence[WafAntiInfoLeakStrategyArgs]] = None,
            uri: Optional[str] = None,
            waf_anti_info_leak_id: Optional[str] = None) -> WafAntiInfoLeak
    func GetWafAntiInfoLeak(ctx *Context, name string, id IDInput, state *WafAntiInfoLeakState, opts ...ResourceOption) (*WafAntiInfoLeak, error)
    public static WafAntiInfoLeak Get(string name, Input<string> id, WafAntiInfoLeakState? state, CustomResourceOptions? opts = null)
    public static WafAntiInfoLeak get(String name, Output<String> id, WafAntiInfoLeakState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:WafAntiInfoLeak    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:
    ActionType double
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    Domain string
    Domain.
    Name string
    Rule Name.
    Status double
    status.
    Strategies List<WafAntiInfoLeakStrategy>
    Strategies detail.
    Uri string
    Uri.
    WafAntiInfoLeakId string
    ID of the resource.
    ActionType float64
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    Domain string
    Domain.
    Name string
    Rule Name.
    Status float64
    status.
    Strategies []WafAntiInfoLeakStrategyArgs
    Strategies detail.
    Uri string
    Uri.
    WafAntiInfoLeakId string
    ID of the resource.
    actionType Double
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain String
    Domain.
    name String
    Rule Name.
    status Double
    status.
    strategies List<WafAntiInfoLeakStrategy>
    Strategies detail.
    uri String
    Uri.
    wafAntiInfoLeakId String
    ID of the resource.
    actionType number
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain string
    Domain.
    name string
    Rule Name.
    status number
    status.
    strategies WafAntiInfoLeakStrategy[]
    Strategies detail.
    uri string
    Uri.
    wafAntiInfoLeakId string
    ID of the resource.
    action_type float
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain str
    Domain.
    name str
    Rule Name.
    status float
    status.
    strategies Sequence[WafAntiInfoLeakStrategyArgs]
    Strategies detail.
    uri str
    Uri.
    waf_anti_info_leak_id str
    ID of the resource.
    actionType Number
    Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
    domain String
    Domain.
    name String
    Rule Name.
    status Number
    status.
    strategies List<Property Map>
    Strategies detail.
    uri String
    Uri.
    wafAntiInfoLeakId String
    ID of the resource.

    Supporting Types

    WafAntiInfoLeakStrategy, WafAntiInfoLeakStrategyArgs

    Content string
    Matching content The following options are available when Field is set to information: idcard (ID card), phone (phone number), and bankcard (bank card). The following options are available when Field is set to returncode: 400 (status code 400), 403 (status code 403), 404 (status code 404), 4xx (other 4xx status codes), 500 (status code 500), 501 (status code 501), 502 (status code 502), 504 (status code 504), and 5xx (other 5xx status codes). When Field is set to keywords, users need to input the matching content themselves.
    Field string
    Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
    Content string
    Matching content The following options are available when Field is set to information: idcard (ID card), phone (phone number), and bankcard (bank card). The following options are available when Field is set to returncode: 400 (status code 400), 403 (status code 403), 404 (status code 404), 4xx (other 4xx status codes), 500 (status code 500), 501 (status code 501), 502 (status code 502), 504 (status code 504), and 5xx (other 5xx status codes). When Field is set to keywords, users need to input the matching content themselves.
    Field string
    Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
    content String
    Matching content The following options are available when Field is set to information: idcard (ID card), phone (phone number), and bankcard (bank card). The following options are available when Field is set to returncode: 400 (status code 400), 403 (status code 403), 404 (status code 404), 4xx (other 4xx status codes), 500 (status code 500), 501 (status code 501), 502 (status code 502), 504 (status code 504), and 5xx (other 5xx status codes). When Field is set to keywords, users need to input the matching content themselves.
    field String
    Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
    content string
    Matching content The following options are available when Field is set to information: idcard (ID card), phone (phone number), and bankcard (bank card). The following options are available when Field is set to returncode: 400 (status code 400), 403 (status code 403), 404 (status code 404), 4xx (other 4xx status codes), 500 (status code 500), 501 (status code 501), 502 (status code 502), 504 (status code 504), and 5xx (other 5xx status codes). When Field is set to keywords, users need to input the matching content themselves.
    field string
    Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
    content str
    Matching content The following options are available when Field is set to information: idcard (ID card), phone (phone number), and bankcard (bank card). The following options are available when Field is set to returncode: 400 (status code 400), 403 (status code 403), 404 (status code 404), 4xx (other 4xx status codes), 500 (status code 500), 501 (status code 501), 502 (status code 502), 504 (status code 504), and 5xx (other 5xx status codes). When Field is set to keywords, users need to input the matching content themselves.
    field str
    Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
    content String
    Matching content The following options are available when Field is set to information: idcard (ID card), phone (phone number), and bankcard (bank card). The following options are available when Field is set to returncode: 400 (status code 400), 403 (status code 403), 404 (status code 404), 4xx (other 4xx status codes), 500 (status code 500), 501 (status code 501), 502 (status code 502), 504 (status code 504), and 5xx (other 5xx status codes). When Field is set to keywords, users need to input the matching content themselves.
    field String
    Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).

    Import

    waf anti_info_leak can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/wafAntiInfoLeak:WafAntiInfoLeak example 3100077499#tf.example.com
    

    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