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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
policy1:
type: opentelekomcloud:WafDedicatedPolicyV1
rule1:
type: opentelekomcloud:WafDedicatedAntiCrawlerRuleV1
properties:
policyId: ${policy1.wafDedicatedPolicyV1Id}
url: /patent/id
logic: 3
protectionMode: anticrawler_except_url
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 string
- The unique name of the resource.
- args WafDedicatedAntiCrawlerRuleV1Args
- 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 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 string
- The unique name of the resource.
- args WafDedicatedAntiCrawlerRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafDedicatedAntiCrawlerRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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: &opentelekomcloud.WafDedicatedAntiCrawlerRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
WafDedicatedAntiCrawlerRuleV1Id: pulumi.String("string"),
})
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());
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")
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",
});
type: opentelekomcloud:WafDedicatedAntiCrawlerRuleV1
properties:
logic: 0
name: string
policyId: string
protectionMode: string
timeouts:
create: string
delete: string
update: string
url: string
wafDedicatedAntiCrawlerRuleV1Id: string
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 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
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Protection
Mode string - JavaScript anti-crawler rule type. Values are:
- Url string
- URL to which the rule applies.
- Name string
- Rule name.
- Timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts - Waf
Dedicated stringAnti Crawler Rule V1Id - ID of the rule.
- 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
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Protection
Mode string - JavaScript anti-crawler rule type. Values are:
- Url string
- URL to which the rule applies.
- Name string
- Rule name.
- Timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts Args - Waf
Dedicated stringAnti Crawler Rule V1Id - ID of the rule.
- 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
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- protection
Mode String - JavaScript anti-crawler rule type. Values are:
- url String
- URL to which the rule applies.
- name String
- Rule name.
- timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts - waf
Dedicated StringAnti Crawler Rule V1Id - ID of the rule.
- 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
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- protection
Mode string - JavaScript anti-crawler rule type. Values are:
- url string
- URL to which the rule applies.
- name string
- Rule name.
- timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts - waf
Dedicated stringAnti Crawler Rule V1Id - ID of the rule.
- 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
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- protection_
mode str - JavaScript anti-crawler rule type. Values are:
- url str
- URL to which the rule applies.
- name str
- Rule name.
- timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts Args - waf_
dedicated_ stranti_ crawler_ rule_ v1_ id - ID of the rule.
- 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
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- protection
Mode String - JavaScript anti-crawler rule type. Values are:
- url String
- URL to which the rule applies.
- name String
- Rule name.
- timeouts Property Map
- waf
Dedicated StringAnti Crawler Rule V1Id - ID of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafDedicatedAntiCrawlerRuleV1 resource produces the following output properties:
- 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
or1
.
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
- 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.
- Created
At 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.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Protection
Mode string - JavaScript anti-crawler rule type. Values are:
- Status double
- Rule status. The value can be
0
or1
. - Timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts - Url string
- URL to which the rule applies.
- Waf
Dedicated stringAnti Crawler Rule V1Id - ID of the rule.
- Created
At 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.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Protection
Mode string - JavaScript anti-crawler rule type. Values are:
- Status float64
- Rule status. The value can be
0
or1
. - Timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts Args - Url string
- URL to which the rule applies.
- Waf
Dedicated stringAnti Crawler Rule V1Id - ID of the rule.
- created
At 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.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- protection
Mode String - JavaScript anti-crawler rule type. Values are:
- status Double
- Rule status. The value can be
0
or1
. - timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts - url String
- URL to which the rule applies.
- waf
Dedicated StringAnti Crawler Rule V1Id - ID of the rule.
- created
At 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.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- protection
Mode string - JavaScript anti-crawler rule type. Values are:
- status number
- Rule status. The value can be
0
or1
. - timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts - url string
- URL to which the rule applies.
- waf
Dedicated stringAnti Crawler Rule V1Id - 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
or1
. - timeouts
Waf
Dedicated Anti Crawler Rule V1Timeouts Args - url str
- URL to which the rule applies.
- waf_
dedicated_ stranti_ crawler_ rule_ v1_ id - ID of the rule.
- created
At 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.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- protection
Mode String - JavaScript anti-crawler rule type. Values are:
- status Number
- Rule status. The value can be
0
or1
. - timeouts Property Map
- url String
- URL to which the rule applies.
- waf
Dedicated StringAnti Crawler Rule V1Id - ID of the rule.
Supporting Types
WafDedicatedAntiCrawlerRuleV1Timeouts, WafDedicatedAntiCrawlerRuleV1TimeoutsArgs
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
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.