1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. WafDedicatedAntiCrawlerRuleV1
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.WafDedicatedAntiCrawlerRuleV1

Explore with Pulumi AI

Up-to-date reference of API arguments for WAF dedicated Anti Crawler rule you can get at documentation portal.

Manages a WAF Dedicated Anti Crawler Rule resource within OpenTelekomCloud.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";

const policy1 = new opentelekomcloud.WafDedicatedPolicyV1("policy1", {});
const rule1 = new opentelekomcloud.WafDedicatedAntiCrawlerRuleV1("rule1", {
    policyId: policy1.wafDedicatedPolicyV1Id,
    url: "/patent/id",
    logic: 3,
    protectionMode: "anticrawler_except_url",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

policy1 = opentelekomcloud.WafDedicatedPolicyV1("policy1")
rule1 = opentelekomcloud.WafDedicatedAntiCrawlerRuleV1("rule1",
    policy_id=policy1.waf_dedicated_policy_v1_id,
    url="/patent/id",
    logic=3,
    protection_mode="anticrawler_except_url")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		policy1, err := opentelekomcloud.NewWafDedicatedPolicyV1(ctx, "policy1", nil)
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewWafDedicatedAntiCrawlerRuleV1(ctx, "rule1", &opentelekomcloud.WafDedicatedAntiCrawlerRuleV1Args{
			PolicyId:       policy1.WafDedicatedPolicyV1Id,
			Url:            pulumi.String("/patent/id"),
			Logic:          pulumi.Float64(3),
			ProtectionMode: pulumi.String("anticrawler_except_url"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var policy1 = new Opentelekomcloud.WafDedicatedPolicyV1("policy1");

    var rule1 = new Opentelekomcloud.WafDedicatedAntiCrawlerRuleV1("rule1", new()
    {
        PolicyId = policy1.WafDedicatedPolicyV1Id,
        Url = "/patent/id",
        Logic = 3,
        ProtectionMode = "anticrawler_except_url",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.WafDedicatedPolicyV1;
import com.pulumi.opentelekomcloud.WafDedicatedAntiCrawlerRuleV1;
import com.pulumi.opentelekomcloud.WafDedicatedAntiCrawlerRuleV1Args;
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 policy1 = new WafDedicatedPolicyV1("policy1");

        var rule1 = new WafDedicatedAntiCrawlerRuleV1("rule1", WafDedicatedAntiCrawlerRuleV1Args.builder()
            .policyId(policy1.wafDedicatedPolicyV1Id())
            .url("/patent/id")
            .logic(3)
            .protectionMode("anticrawler_except_url")
            .build());

    }
}
Copy
resources:
  policy1:
    type: opentelekomcloud:WafDedicatedPolicyV1
  rule1:
    type: opentelekomcloud:WafDedicatedAntiCrawlerRuleV1
    properties:
      policyId: ${policy1.wafDedicatedPolicyV1Id}
      url: /patent/id
      logic: 3
      protectionMode: anticrawler_except_url
Copy

Create WafDedicatedAntiCrawlerRuleV1 Resource

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

Constructor syntax

new WafDedicatedAntiCrawlerRuleV1(name: string, args: WafDedicatedAntiCrawlerRuleV1Args, opts?: CustomResourceOptions);
@overload
def WafDedicatedAntiCrawlerRuleV1(resource_name: str,
                                  args: WafDedicatedAntiCrawlerRuleV1Args,
                                  opts: Optional[ResourceOptions] = None)

@overload
def WafDedicatedAntiCrawlerRuleV1(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  logic: Optional[float] = None,
                                  policy_id: Optional[str] = None,
                                  protection_mode: Optional[str] = None,
                                  url: Optional[str] = None,
                                  name: Optional[str] = None,
                                  timeouts: Optional[WafDedicatedAntiCrawlerRuleV1TimeoutsArgs] = None,
                                  waf_dedicated_anti_crawler_rule_v1_id: Optional[str] = None)
func NewWafDedicatedAntiCrawlerRuleV1(ctx *Context, name string, args WafDedicatedAntiCrawlerRuleV1Args, opts ...ResourceOption) (*WafDedicatedAntiCrawlerRuleV1, error)
public WafDedicatedAntiCrawlerRuleV1(string name, WafDedicatedAntiCrawlerRuleV1Args args, CustomResourceOptions? opts = null)
public WafDedicatedAntiCrawlerRuleV1(String name, WafDedicatedAntiCrawlerRuleV1Args args)
public WafDedicatedAntiCrawlerRuleV1(String name, WafDedicatedAntiCrawlerRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafDedicatedAntiCrawlerRuleV1
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. WafDedicatedAntiCrawlerRuleV1Args
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. WafDedicatedAntiCrawlerRuleV1Args
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. WafDedicatedAntiCrawlerRuleV1Args
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. WafDedicatedAntiCrawlerRuleV1Args
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. WafDedicatedAntiCrawlerRuleV1Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var wafDedicatedAntiCrawlerRuleV1Resource = new Opentelekomcloud.WafDedicatedAntiCrawlerRuleV1("wafDedicatedAntiCrawlerRuleV1Resource", new()
{
    Logic = 0,
    PolicyId = "string",
    ProtectionMode = "string",
    Url = "string",
    Name = "string",
    Timeouts = new Opentelekomcloud.Inputs.WafDedicatedAntiCrawlerRuleV1TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
    WafDedicatedAntiCrawlerRuleV1Id = "string",
});
Copy
example, err := opentelekomcloud.NewWafDedicatedAntiCrawlerRuleV1(ctx, "wafDedicatedAntiCrawlerRuleV1Resource", &opentelekomcloud.WafDedicatedAntiCrawlerRuleV1Args{
Logic: pulumi.Float64(0),
PolicyId: pulumi.String("string"),
ProtectionMode: pulumi.String("string"),
Url: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &.WafDedicatedAntiCrawlerRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
WafDedicatedAntiCrawlerRuleV1Id: pulumi.String("string"),
})
Copy
var wafDedicatedAntiCrawlerRuleV1Resource = new WafDedicatedAntiCrawlerRuleV1("wafDedicatedAntiCrawlerRuleV1Resource", WafDedicatedAntiCrawlerRuleV1Args.builder()
    .logic(0)
    .policyId("string")
    .protectionMode("string")
    .url("string")
    .name("string")
    .timeouts(WafDedicatedAntiCrawlerRuleV1TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .wafDedicatedAntiCrawlerRuleV1Id("string")
    .build());
Copy
waf_dedicated_anti_crawler_rule_v1_resource = opentelekomcloud.WafDedicatedAntiCrawlerRuleV1("wafDedicatedAntiCrawlerRuleV1Resource",
    logic=0,
    policy_id="string",
    protection_mode="string",
    url="string",
    name="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    },
    waf_dedicated_anti_crawler_rule_v1_id="string")
Copy
const wafDedicatedAntiCrawlerRuleV1Resource = new opentelekomcloud.WafDedicatedAntiCrawlerRuleV1("wafDedicatedAntiCrawlerRuleV1Resource", {
    logic: 0,
    policyId: "string",
    protectionMode: "string",
    url: "string",
    name: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
    wafDedicatedAntiCrawlerRuleV1Id: "string",
});
Copy
type: opentelekomcloud:WafDedicatedAntiCrawlerRuleV1
properties:
    logic: 0
    name: string
    policyId: string
    protectionMode: string
    timeouts:
        create: string
        delete: string
        update: string
    url: string
    wafDedicatedAntiCrawlerRuleV1Id: string
Copy

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

Logic This property is required. double
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
PolicyId This property is required. string
The WAF policy ID. Changing this creates a new rule.
ProtectionMode This property is required. string
JavaScript anti-crawler rule type. Values are:
Url This property is required. string
URL to which the rule applies.
Name string
Rule name.
Timeouts WafDedicatedAntiCrawlerRuleV1Timeouts
WafDedicatedAntiCrawlerRuleV1Id string
ID of the rule.
Logic This property is required. float64
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
PolicyId This property is required. string
The WAF policy ID. Changing this creates a new rule.
ProtectionMode This property is required. string
JavaScript anti-crawler rule type. Values are:
Url This property is required. string
URL to which the rule applies.
Name string
Rule name.
Timeouts WafDedicatedAntiCrawlerRuleV1TimeoutsArgs
WafDedicatedAntiCrawlerRuleV1Id string
ID of the rule.
logic This property is required. Double
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
policyId This property is required. String
The WAF policy ID. Changing this creates a new rule.
protectionMode This property is required. String
JavaScript anti-crawler rule type. Values are:
url This property is required. String
URL to which the rule applies.
name String
Rule name.
timeouts WafDedicatedAntiCrawlerRuleV1Timeouts
wafDedicatedAntiCrawlerRuleV1Id String
ID of the rule.
logic This property is required. number
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
policyId This property is required. string
The WAF policy ID. Changing this creates a new rule.
protectionMode This property is required. string
JavaScript anti-crawler rule type. Values are:
url This property is required. string
URL to which the rule applies.
name string
Rule name.
timeouts WafDedicatedAntiCrawlerRuleV1Timeouts
wafDedicatedAntiCrawlerRuleV1Id string
ID of the rule.
logic This property is required. float
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
policy_id This property is required. str
The WAF policy ID. Changing this creates a new rule.
protection_mode This property is required. str
JavaScript anti-crawler rule type. Values are:
url This property is required. str
URL to which the rule applies.
name str
Rule name.
timeouts WafDedicatedAntiCrawlerRuleV1TimeoutsArgs
waf_dedicated_anti_crawler_rule_v1_id str
ID of the rule.
logic This property is required. Number
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
policyId This property is required. String
The WAF policy ID. Changing this creates a new rule.
protectionMode This property is required. String
JavaScript anti-crawler rule type. Values are:
url This property is required. String
URL to which the rule applies.
name String
Rule name.
timeouts Property Map
wafDedicatedAntiCrawlerRuleV1Id String
ID of the rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the WafDedicatedAntiCrawlerRuleV1 resource produces the following output properties:

CreatedAt double
Timestamp the rule is created.
Id string
The provider-assigned unique ID for this managed resource.
Status double
Rule status. The value can be 0 or 1.
CreatedAt float64
Timestamp the rule is created.
Id string
The provider-assigned unique ID for this managed resource.
Status float64
Rule status. The value can be 0 or 1.
createdAt Double
Timestamp the rule is created.
id String
The provider-assigned unique ID for this managed resource.
status Double
Rule status. The value can be 0 or 1.
createdAt number
Timestamp the rule is created.
id string
The provider-assigned unique ID for this managed resource.
status number
Rule status. The value can be 0 or 1.
created_at float
Timestamp the rule is created.
id str
The provider-assigned unique ID for this managed resource.
status float
Rule status. The value can be 0 or 1.
createdAt Number
Timestamp the rule is created.
id String
The provider-assigned unique ID for this managed resource.
status Number
Rule status. The value can be 0 or 1.

Look up Existing WafDedicatedAntiCrawlerRuleV1 Resource

Get an existing WafDedicatedAntiCrawlerRuleV1 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?: WafDedicatedAntiCrawlerRuleV1State, opts?: CustomResourceOptions): WafDedicatedAntiCrawlerRuleV1
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[float] = None,
        logic: Optional[float] = None,
        name: Optional[str] = None,
        policy_id: Optional[str] = None,
        protection_mode: Optional[str] = None,
        status: Optional[float] = None,
        timeouts: Optional[WafDedicatedAntiCrawlerRuleV1TimeoutsArgs] = None,
        url: Optional[str] = None,
        waf_dedicated_anti_crawler_rule_v1_id: Optional[str] = None) -> WafDedicatedAntiCrawlerRuleV1
func GetWafDedicatedAntiCrawlerRuleV1(ctx *Context, name string, id IDInput, state *WafDedicatedAntiCrawlerRuleV1State, opts ...ResourceOption) (*WafDedicatedAntiCrawlerRuleV1, error)
public static WafDedicatedAntiCrawlerRuleV1 Get(string name, Input<string> id, WafDedicatedAntiCrawlerRuleV1State? state, CustomResourceOptions? opts = null)
public static WafDedicatedAntiCrawlerRuleV1 get(String name, Output<String> id, WafDedicatedAntiCrawlerRuleV1State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:WafDedicatedAntiCrawlerRuleV1    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:
CreatedAt double
Timestamp the rule is created.
Logic double
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
Name string
Rule name.
PolicyId string
The WAF policy ID. Changing this creates a new rule.
ProtectionMode string
JavaScript anti-crawler rule type. Values are:
Status double
Rule status. The value can be 0 or 1.
Timeouts WafDedicatedAntiCrawlerRuleV1Timeouts
Url string
URL to which the rule applies.
WafDedicatedAntiCrawlerRuleV1Id string
ID of the rule.
CreatedAt float64
Timestamp the rule is created.
Logic float64
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
Name string
Rule name.
PolicyId string
The WAF policy ID. Changing this creates a new rule.
ProtectionMode string
JavaScript anti-crawler rule type. Values are:
Status float64
Rule status. The value can be 0 or 1.
Timeouts WafDedicatedAntiCrawlerRuleV1TimeoutsArgs
Url string
URL to which the rule applies.
WafDedicatedAntiCrawlerRuleV1Id string
ID of the rule.
createdAt Double
Timestamp the rule is created.
logic Double
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
name String
Rule name.
policyId String
The WAF policy ID. Changing this creates a new rule.
protectionMode String
JavaScript anti-crawler rule type. Values are:
status Double
Rule status. The value can be 0 or 1.
timeouts WafDedicatedAntiCrawlerRuleV1Timeouts
url String
URL to which the rule applies.
wafDedicatedAntiCrawlerRuleV1Id String
ID of the rule.
createdAt number
Timestamp the rule is created.
logic number
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
name string
Rule name.
policyId string
The WAF policy ID. Changing this creates a new rule.
protectionMode string
JavaScript anti-crawler rule type. Values are:
status number
Rule status. The value can be 0 or 1.
timeouts WafDedicatedAntiCrawlerRuleV1Timeouts
url string
URL to which the rule applies.
wafDedicatedAntiCrawlerRuleV1Id string
ID of the rule.
created_at float
Timestamp the rule is created.
logic float
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
name str
Rule name.
policy_id str
The WAF policy ID. Changing this creates a new rule.
protection_mode str
JavaScript anti-crawler rule type. Values are:
status float
Rule status. The value can be 0 or 1.
timeouts WafDedicatedAntiCrawlerRuleV1TimeoutsArgs
url str
URL to which the rule applies.
waf_dedicated_anti_crawler_rule_v1_id str
ID of the rule.
createdAt Number
Timestamp the rule is created.
logic Number
Rule matching logic. Values are:

  • 1: Include
  • 2: Not include
  • 3: Equal
  • 4: Not equal
  • 5: Prefix is
  • 6: Prefix is not
  • 7: Suffix is
  • 8: Suffix is not
name String
Rule name.
policyId String
The WAF policy ID. Changing this creates a new rule.
protectionMode String
JavaScript anti-crawler rule type. Values are:
status Number
Rule status. The value can be 0 or 1.
timeouts Property Map
url String
URL to which the rule applies.
wafDedicatedAntiCrawlerRuleV1Id String
ID of the rule.

Supporting Types

WafDedicatedAntiCrawlerRuleV1Timeouts
, WafDedicatedAntiCrawlerRuleV1TimeoutsArgs

Create string
Delete string
Update string
Create string
Delete string
Update string
create String
delete String
update String
create string
delete string
update string
create str
delete str
update str
create String
delete String
update String

Import

Dedicated WAF Anti Crawler Rules can be imported using policy_id/id, e.g.

$ pulumi import opentelekomcloud:index/wafDedicatedAntiCrawlerRuleV1:WafDedicatedAntiCrawlerRuleV1 rule_1 ff95e71c8ae74eba9887193ab22c5757/b39f3a5a1b4f447a8030f0b0703f47f5
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.