published on Tuesday, Jun 30, 2026 by tencentcloudstack
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Provides a resource to create a WAF api sec sensitive custom api extract rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.WafApiSecSensitiveCustomApiExtractRule("example", {
domain: "www.example.com",
ruleName: "tf-example",
status: 1,
apiName: "/api/login",
methods: [
"GET",
"POST",
],
regex: "/api/.*",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.WafApiSecSensitiveCustomApiExtractRule("example",
domain="www.example.com",
rule_name="tf-example",
status=1,
api_name="/api/login",
methods=[
"GET",
"POST",
],
regex="/api/.*")
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.NewWafApiSecSensitiveCustomApiExtractRule(ctx, "example", &tencentcloud.WafApiSecSensitiveCustomApiExtractRuleArgs{
Domain: pulumi.String("www.example.com"),
RuleName: pulumi.String("tf-example"),
Status: pulumi.Float64(1),
ApiName: pulumi.String("/api/login"),
Methods: pulumi.StringArray{
pulumi.String("GET"),
pulumi.String("POST"),
},
Regex: pulumi.String("/api/.*"),
})
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.WafApiSecSensitiveCustomApiExtractRule("example", new()
{
Domain = "www.example.com",
RuleName = "tf-example",
Status = 1,
ApiName = "/api/login",
Methods = new[]
{
"GET",
"POST",
},
Regex = "/api/.*",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.WafApiSecSensitiveCustomApiExtractRule;
import com.pulumi.tencentcloud.WafApiSecSensitiveCustomApiExtractRuleArgs;
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 WafApiSecSensitiveCustomApiExtractRule("example", WafApiSecSensitiveCustomApiExtractRuleArgs.builder()
.domain("www.example.com")
.ruleName("tf-example")
.status(1.0)
.apiName("/api/login")
.methods(
"GET",
"POST")
.regex("/api/.*")
.build());
}
}
resources:
example:
type: tencentcloud:WafApiSecSensitiveCustomApiExtractRule
properties:
domain: www.example.com
ruleName: tf-example
status: 1
apiName: /api/login
methods:
- GET
- POST
regex: /api/.*
Example coming soon!
Create WafApiSecSensitiveCustomApiExtractRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafApiSecSensitiveCustomApiExtractRule(name: string, args: WafApiSecSensitiveCustomApiExtractRuleArgs, opts?: CustomResourceOptions);@overload
def WafApiSecSensitiveCustomApiExtractRule(resource_name: str,
args: WafApiSecSensitiveCustomApiExtractRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafApiSecSensitiveCustomApiExtractRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
rule_name: Optional[str] = None,
status: Optional[float] = None,
api_name: Optional[str] = None,
methods: Optional[Sequence[str]] = None,
regex: Optional[str] = None,
waf_api_sec_sensitive_custom_api_extract_rule_id: Optional[str] = None)func NewWafApiSecSensitiveCustomApiExtractRule(ctx *Context, name string, args WafApiSecSensitiveCustomApiExtractRuleArgs, opts ...ResourceOption) (*WafApiSecSensitiveCustomApiExtractRule, error)public WafApiSecSensitiveCustomApiExtractRule(string name, WafApiSecSensitiveCustomApiExtractRuleArgs args, CustomResourceOptions? opts = null)
public WafApiSecSensitiveCustomApiExtractRule(String name, WafApiSecSensitiveCustomApiExtractRuleArgs args)
public WafApiSecSensitiveCustomApiExtractRule(String name, WafApiSecSensitiveCustomApiExtractRuleArgs args, CustomResourceOptions options)
type: tencentcloud:WafApiSecSensitiveCustomApiExtractRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_wafapisecsensitivecustomapiextractrule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args WafApiSecSensitiveCustomApiExtractRuleArgs
- 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 WafApiSecSensitiveCustomApiExtractRuleArgs
- 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 WafApiSecSensitiveCustomApiExtractRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafApiSecSensitiveCustomApiExtractRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafApiSecSensitiveCustomApiExtractRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WafApiSecSensitiveCustomApiExtractRule 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 WafApiSecSensitiveCustomApiExtractRule resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the WafApiSecSensitiveCustomApiExtractRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time double - Update timestamp.
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time float64 - Update timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- update_
time number - Update timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time Double - Update timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time number - Update timestamp.
- id str
- The provider-assigned unique ID for this managed resource.
- update_
time float - Update timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time Number - Update timestamp.
Look up Existing WafApiSecSensitiveCustomApiExtractRule Resource
Get an existing WafApiSecSensitiveCustomApiExtractRule 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?: WafApiSecSensitiveCustomApiExtractRuleState, opts?: CustomResourceOptions): WafApiSecSensitiveCustomApiExtractRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_name: Optional[str] = None,
domain: Optional[str] = None,
methods: Optional[Sequence[str]] = None,
regex: Optional[str] = None,
rule_name: Optional[str] = None,
status: Optional[float] = None,
update_time: Optional[float] = None,
waf_api_sec_sensitive_custom_api_extract_rule_id: Optional[str] = None) -> WafApiSecSensitiveCustomApiExtractRulefunc GetWafApiSecSensitiveCustomApiExtractRule(ctx *Context, name string, id IDInput, state *WafApiSecSensitiveCustomApiExtractRuleState, opts ...ResourceOption) (*WafApiSecSensitiveCustomApiExtractRule, error)public static WafApiSecSensitiveCustomApiExtractRule Get(string name, Input<string> id, WafApiSecSensitiveCustomApiExtractRuleState? state, CustomResourceOptions? opts = null)public static WafApiSecSensitiveCustomApiExtractRule get(String name, Output<String> id, WafApiSecSensitiveCustomApiExtractRuleState state, CustomResourceOptions options)resources: _: type: tencentcloud:WafApiSecSensitiveCustomApiExtractRule get: id: ${id}import {
to = tencentcloud_wafapisecsensitivecustomapiextractrule.example
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.
- Api
Name string - API name.
- Domain string
- Domain name.
- Methods List<string>
- Request method list.
- Regex string
- Regex match content.
- Rule
Name string - Rule name.
- Status double
- Rule switch, 0: off, 1: on.
- Update
Time double - Update timestamp.
- Waf
Api stringSec Sensitive Custom Api Extract Rule Id - ID of the resource.
- Api
Name string - API name.
- Domain string
- Domain name.
- Methods []string
- Request method list.
- Regex string
- Regex match content.
- Rule
Name string - Rule name.
- Status float64
- Rule switch, 0: off, 1: on.
- Update
Time float64 - Update timestamp.
- Waf
Api stringSec Sensitive Custom Api Extract Rule Id - ID of the resource.
- api_
name string - API name.
- domain string
- Domain name.
- methods list(string)
- Request method list.
- regex string
- Regex match content.
- rule_
name string - Rule name.
- status number
- Rule switch, 0: off, 1: on.
- update_
time number - Update timestamp.
- waf_
api_ stringsec_ sensitive_ custom_ api_ extract_ rule_ id - ID of the resource.
- api
Name String - API name.
- domain String
- Domain name.
- methods List<String>
- Request method list.
- regex String
- Regex match content.
- rule
Name String - Rule name.
- status Double
- Rule switch, 0: off, 1: on.
- update
Time Double - Update timestamp.
- waf
Api StringSec Sensitive Custom Api Extract Rule Id - ID of the resource.
- api
Name string - API name.
- domain string
- Domain name.
- methods string[]
- Request method list.
- regex string
- Regex match content.
- rule
Name string - Rule name.
- status number
- Rule switch, 0: off, 1: on.
- update
Time number - Update timestamp.
- waf
Api stringSec Sensitive Custom Api Extract Rule Id - ID of the resource.
- api_
name str - API name.
- domain str
- Domain name.
- methods Sequence[str]
- Request method list.
- regex str
- Regex match content.
- rule_
name str - Rule name.
- status float
- Rule switch, 0: off, 1: on.
- update_
time float - Update timestamp.
- waf_
api_ strsec_ sensitive_ custom_ api_ extract_ rule_ id - ID of the resource.
- api
Name String - API name.
- domain String
- Domain name.
- methods List<String>
- Request method list.
- regex String
- Regex match content.
- rule
Name String - Rule name.
- status Number
- Rule switch, 0: off, 1: on.
- update
Time Number - Update timestamp.
- waf
Api StringSec Sensitive Custom Api Extract Rule Id - ID of the resource.
Import
WAF api sec sensitive custom api extract rule can be imported using the domain#ruleName, e.g.
$ pulumi import tencentcloud:index/wafApiSecSensitiveCustomApiExtractRule:WafApiSecSensitiveCustomApiExtractRule example www.example.com#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
tencentcloudTerraform Provider.
published on Tuesday, Jun 30, 2026 by tencentcloudstack