1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. WafAntiInfoLeak
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.WafAntiInfoLeak

Explore with Pulumi AI

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
resources:
  example:
    type: tencentcloud:WafAntiInfoLeak
    properties:
      actionType: 0
      domain: tf.example.com
      status: 1
      strategies:
        - content: phone
          field: information
      uri: /anti_info_leak_url
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. WafAntiInfoLeakArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. WafAntiInfoLeakArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WafAntiInfoLeakArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 This property is required. double
Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
Domain This property is required. string
Domain.
Strategies This property is required. List<WafAntiInfoLeakStrategy>
Strategies detail.
Uri This property is required. string
Uri.
Name string
Rule Name.
Status double
status.
WafAntiInfoLeakId string
ID of the resource.
ActionType This property is required. float64
Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
Domain This property is required. string
Domain.
Strategies This property is required. []WafAntiInfoLeakStrategyArgs
Strategies detail.
Uri This property is required. string
Uri.
Name string
Rule Name.
Status float64
status.
WafAntiInfoLeakId string
ID of the resource.
actionType This property is required. Double
Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
domain This property is required. String
Domain.
strategies This property is required. List<WafAntiInfoLeakStrategy>
Strategies detail.
uri This property is required. String
Uri.
name String
Rule Name.
status Double
status.
wafAntiInfoLeakId String
ID of the resource.
actionType This property is required. number
Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
domain This property is required. string
Domain.
strategies This property is required. WafAntiInfoLeakStrategy[]
Strategies detail.
uri This property is required. string
Uri.
name string
Rule Name.
status number
status.
wafAntiInfoLeakId string
ID of the resource.
action_type This property is required. float
Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
domain This property is required. str
Domain.
strategies This property is required. Sequence[WafAntiInfoLeakStrategyArgs]
Strategies detail.
uri This property is required. str
Uri.
name str
Rule Name.
status float
status.
waf_anti_info_leak_id str
ID of the resource.
actionType This property is required. Number
Rule Action, 0 (log), 1 (replace), 2 (only display the first four digits), 3 (only display the last four digits), 4 (deny).
domain This property is required. String
Domain.
strategies This property is required. List<Property Map>
Strategies detail.
uri This property is required. 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required. 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 This property is required. string
Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
Content This property is required. 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 This property is required. string
Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
content This property is required. 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 This property is required. String
Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
content This property is required. 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 This property is required. string
Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
content This property is required. 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 This property is required. str
Matching Criteria, returncode (Response Code), keywords (Keywords), information (Sensitive Information).
content This property is required. 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 This property is required. 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
Copy

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.