flexibleengine.WafRulePreciseProtection
Explore with Pulumi AI
Manages a WAF Precise Protection Rule resource within FlexibleEngine.
Example Usage
A rule takes effect immediately
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const rule1 = new flexibleengine.WafRulePreciseProtection("rule1", {
policyId: _var.policy_id,
priority: 10,
conditions: [{
field: "path",
logic: "prefix",
content: "/login",
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
rule1 = flexibleengine.WafRulePreciseProtection("rule1",
policy_id=var["policy_id"],
priority=10,
conditions=[{
"field": "path",
"logic": "prefix",
"content": "/login",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewWafRulePreciseProtection(ctx, "rule1", &flexibleengine.WafRulePreciseProtectionArgs{
PolicyId: pulumi.Any(_var.Policy_id),
Priority: pulumi.Float64(10),
Conditions: flexibleengine.WafRulePreciseProtectionConditionArray{
&flexibleengine.WafRulePreciseProtectionConditionArgs{
Field: pulumi.String("path"),
Logic: pulumi.String("prefix"),
Content: pulumi.String("/login"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var rule1 = new Flexibleengine.WafRulePreciseProtection("rule1", new()
{
PolicyId = @var.Policy_id,
Priority = 10,
Conditions = new[]
{
new Flexibleengine.Inputs.WafRulePreciseProtectionConditionArgs
{
Field = "path",
Logic = "prefix",
Content = "/login",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.WafRulePreciseProtection;
import com.pulumi.flexibleengine.WafRulePreciseProtectionArgs;
import com.pulumi.flexibleengine.inputs.WafRulePreciseProtectionConditionArgs;
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 rule1 = new WafRulePreciseProtection("rule1", WafRulePreciseProtectionArgs.builder()
.policyId(var_.policy_id())
.priority(10)
.conditions(WafRulePreciseProtectionConditionArgs.builder()
.field("path")
.logic("prefix")
.content("/login")
.build())
.build());
}
}
resources:
rule1:
type: flexibleengine:WafRulePreciseProtection
properties:
policyId: ${var.policy_id}
priority: 10
conditions:
- field: path
logic: prefix
content: /login
A rule takes effect at the scheduled time
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const rule1 = new flexibleengine.WafRulePreciseProtection("rule1", {
policyId: _var.policy_id,
action: "block",
priority: 20,
startTime: "2021-07-01 00:00:00",
endTime: "2021-12-31 23:59:59",
conditions: [{
field: "ip",
logic: "equal",
content: "192.168.1.1",
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
rule1 = flexibleengine.WafRulePreciseProtection("rule1",
policy_id=var["policy_id"],
action="block",
priority=20,
start_time="2021-07-01 00:00:00",
end_time="2021-12-31 23:59:59",
conditions=[{
"field": "ip",
"logic": "equal",
"content": "192.168.1.1",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewWafRulePreciseProtection(ctx, "rule1", &flexibleengine.WafRulePreciseProtectionArgs{
PolicyId: pulumi.Any(_var.Policy_id),
Action: pulumi.String("block"),
Priority: pulumi.Float64(20),
StartTime: pulumi.String("2021-07-01 00:00:00"),
EndTime: pulumi.String("2021-12-31 23:59:59"),
Conditions: flexibleengine.WafRulePreciseProtectionConditionArray{
&flexibleengine.WafRulePreciseProtectionConditionArgs{
Field: pulumi.String("ip"),
Logic: pulumi.String("equal"),
Content: pulumi.String("192.168.1.1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var rule1 = new Flexibleengine.WafRulePreciseProtection("rule1", new()
{
PolicyId = @var.Policy_id,
Action = "block",
Priority = 20,
StartTime = "2021-07-01 00:00:00",
EndTime = "2021-12-31 23:59:59",
Conditions = new[]
{
new Flexibleengine.Inputs.WafRulePreciseProtectionConditionArgs
{
Field = "ip",
Logic = "equal",
Content = "192.168.1.1",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.WafRulePreciseProtection;
import com.pulumi.flexibleengine.WafRulePreciseProtectionArgs;
import com.pulumi.flexibleengine.inputs.WafRulePreciseProtectionConditionArgs;
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 rule1 = new WafRulePreciseProtection("rule1", WafRulePreciseProtectionArgs.builder()
.policyId(var_.policy_id())
.action("block")
.priority(20)
.startTime("2021-07-01 00:00:00")
.endTime("2021-12-31 23:59:59")
.conditions(WafRulePreciseProtectionConditionArgs.builder()
.field("ip")
.logic("equal")
.content("192.168.1.1")
.build())
.build());
}
}
resources:
rule1:
type: flexibleengine:WafRulePreciseProtection
properties:
policyId: ${var.policy_id}
action: block
priority: 20
startTime: 2021-07-01 00:00:00
endTime: 2021-12-31 23:59:59
conditions:
- field: ip
logic: equal
content: 192.168.1.1
Create WafRulePreciseProtection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafRulePreciseProtection(name: string, args: WafRulePreciseProtectionArgs, opts?: CustomResourceOptions);
@overload
def WafRulePreciseProtection(resource_name: str,
args: WafRulePreciseProtectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafRulePreciseProtection(resource_name: str,
opts: Optional[ResourceOptions] = None,
conditions: Optional[Sequence[WafRulePreciseProtectionConditionArgs]] = None,
policy_id: Optional[str] = None,
priority: Optional[float] = None,
action: Optional[str] = None,
end_time: Optional[str] = None,
name: Optional[str] = None,
start_time: Optional[str] = None,
waf_rule_precise_protection_id: Optional[str] = None)
func NewWafRulePreciseProtection(ctx *Context, name string, args WafRulePreciseProtectionArgs, opts ...ResourceOption) (*WafRulePreciseProtection, error)
public WafRulePreciseProtection(string name, WafRulePreciseProtectionArgs args, CustomResourceOptions? opts = null)
public WafRulePreciseProtection(String name, WafRulePreciseProtectionArgs args)
public WafRulePreciseProtection(String name, WafRulePreciseProtectionArgs args, CustomResourceOptions options)
type: flexibleengine:WafRulePreciseProtection
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 WafRulePreciseProtectionArgs
- 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 WafRulePreciseProtectionArgs
- 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 WafRulePreciseProtectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafRulePreciseProtectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafRulePreciseProtectionArgs
- 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 wafRulePreciseProtectionResource = new Flexibleengine.WafRulePreciseProtection("wafRulePreciseProtectionResource", new()
{
Conditions = new[]
{
new Flexibleengine.Inputs.WafRulePreciseProtectionConditionArgs
{
Content = "string",
Field = "string",
Logic = "string",
Subfield = "string",
},
},
PolicyId = "string",
Priority = 0,
Action = "string",
EndTime = "string",
Name = "string",
StartTime = "string",
WafRulePreciseProtectionId = "string",
});
example, err := flexibleengine.NewWafRulePreciseProtection(ctx, "wafRulePreciseProtectionResource", &flexibleengine.WafRulePreciseProtectionArgs{
Conditions: flexibleengine.WafRulePreciseProtectionConditionArray{
&flexibleengine.WafRulePreciseProtectionConditionArgs{
Content: pulumi.String("string"),
Field: pulumi.String("string"),
Logic: pulumi.String("string"),
Subfield: pulumi.String("string"),
},
},
PolicyId: pulumi.String("string"),
Priority: pulumi.Float64(0),
Action: pulumi.String("string"),
EndTime: pulumi.String("string"),
Name: pulumi.String("string"),
StartTime: pulumi.String("string"),
WafRulePreciseProtectionId: pulumi.String("string"),
})
var wafRulePreciseProtectionResource = new WafRulePreciseProtection("wafRulePreciseProtectionResource", WafRulePreciseProtectionArgs.builder()
.conditions(WafRulePreciseProtectionConditionArgs.builder()
.content("string")
.field("string")
.logic("string")
.subfield("string")
.build())
.policyId("string")
.priority(0)
.action("string")
.endTime("string")
.name("string")
.startTime("string")
.wafRulePreciseProtectionId("string")
.build());
waf_rule_precise_protection_resource = flexibleengine.WafRulePreciseProtection("wafRulePreciseProtectionResource",
conditions=[{
"content": "string",
"field": "string",
"logic": "string",
"subfield": "string",
}],
policy_id="string",
priority=0,
action="string",
end_time="string",
name="string",
start_time="string",
waf_rule_precise_protection_id="string")
const wafRulePreciseProtectionResource = new flexibleengine.WafRulePreciseProtection("wafRulePreciseProtectionResource", {
conditions: [{
content: "string",
field: "string",
logic: "string",
subfield: "string",
}],
policyId: "string",
priority: 0,
action: "string",
endTime: "string",
name: "string",
startTime: "string",
wafRulePreciseProtectionId: "string",
});
type: flexibleengine:WafRulePreciseProtection
properties:
action: string
conditions:
- content: string
field: string
logic: string
subfield: string
endTime: string
name: string
policyId: string
priority: 0
startTime: string
wafRulePreciseProtectionId: string
WafRulePreciseProtection 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 WafRulePreciseProtection resource accepts the following input properties:
- Conditions
List<Waf
Rule Precise Protection Condition> - Specifies the condition parameters. The object structure is documented below.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Priority double
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- Action string
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- End
Time string - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- Name string
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- Start
Time string - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- Waf
Rule stringPrecise Protection Id - The rule ID in UUID format.
- Conditions
[]Waf
Rule Precise Protection Condition Args - Specifies the condition parameters. The object structure is documented below.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Priority float64
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- Action string
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- End
Time string - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- Name string
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- Start
Time string - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- Waf
Rule stringPrecise Protection Id - The rule ID in UUID format.
- conditions
List<Waf
Rule Precise Protection Condition> - Specifies the condition parameters. The object structure is documented below.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- priority Double
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- action String
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- end
Time String - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name String
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- start
Time String - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf
Rule StringPrecise Protection Id - The rule ID in UUID format.
- conditions
Waf
Rule Precise Protection Condition[] - Specifies the condition parameters. The object structure is documented below.
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- priority number
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- action string
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- end
Time string - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name string
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- start
Time string - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf
Rule stringPrecise Protection Id - The rule ID in UUID format.
- conditions
Sequence[Waf
Rule Precise Protection Condition Args] - Specifies the condition parameters. The object structure is documented below.
- policy_
id str - Specifies the WAF policy ID. Changing this creates a new rule.
- priority float
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- action str
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- end_
time str - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name str
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- start_
time str - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf_
rule_ strprecise_ protection_ id - The rule ID in UUID format.
- conditions List<Property Map>
- Specifies the condition parameters. The object structure is documented below.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- priority Number
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- action String
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- end
Time String - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name String
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- start
Time String - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf
Rule StringPrecise Protection Id - The rule ID in UUID format.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafRulePreciseProtection 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 WafRulePreciseProtection Resource
Get an existing WafRulePreciseProtection 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?: WafRulePreciseProtectionState, opts?: CustomResourceOptions): WafRulePreciseProtection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
conditions: Optional[Sequence[WafRulePreciseProtectionConditionArgs]] = None,
end_time: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
priority: Optional[float] = None,
start_time: Optional[str] = None,
waf_rule_precise_protection_id: Optional[str] = None) -> WafRulePreciseProtection
func GetWafRulePreciseProtection(ctx *Context, name string, id IDInput, state *WafRulePreciseProtectionState, opts ...ResourceOption) (*WafRulePreciseProtection, error)
public static WafRulePreciseProtection Get(string name, Input<string> id, WafRulePreciseProtectionState? state, CustomResourceOptions? opts = null)
public static WafRulePreciseProtection get(String name, Output<String> id, WafRulePreciseProtectionState state, CustomResourceOptions options)
resources: _: type: flexibleengine:WafRulePreciseProtection 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.
- Action string
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- Conditions
List<Waf
Rule Precise Protection Condition> - Specifies the condition parameters. The object structure is documented below.
- End
Time string - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- Name string
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Priority double
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- Start
Time string - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- Waf
Rule stringPrecise Protection Id - The rule ID in UUID format.
- Action string
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- Conditions
[]Waf
Rule Precise Protection Condition Args - Specifies the condition parameters. The object structure is documented below.
- End
Time string - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- Name string
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Priority float64
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- Start
Time string - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- Waf
Rule stringPrecise Protection Id - The rule ID in UUID format.
- action String
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- conditions
List<Waf
Rule Precise Protection Condition> - Specifies the condition parameters. The object structure is documented below.
- end
Time String - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name String
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- priority Double
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- start
Time String - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf
Rule StringPrecise Protection Id - The rule ID in UUID format.
- action string
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- conditions
Waf
Rule Precise Protection Condition[] - Specifies the condition parameters. The object structure is documented below.
- end
Time string - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name string
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- priority number
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- start
Time string - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf
Rule stringPrecise Protection Id - The rule ID in UUID format.
- action str
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- conditions
Sequence[Waf
Rule Precise Protection Condition Args] - Specifies the condition parameters. The object structure is documented below.
- end_
time str - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name str
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- policy_
id str - Specifies the WAF policy ID. Changing this creates a new rule.
- priority float
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- start_
time str - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf_
rule_ strprecise_ protection_ id - The rule ID in UUID format.
- action String
- Specifies the protective action after the precise protection rule is matched. The value can be block or pass. Defaults to block.
- conditions List<Property Map>
- Specifies the condition parameters. The object structure is documented below.
- end
Time String - Specifies the UTC time when the precise protection rule expires. The time must be in "yyyy-MM-dd HH:mm:ss" format.
- name String
- Specifies the name of a precise protection rule. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- priority Number
- Specifies the priority of a rule being executed. Smaller values correspond to higher priorities. If two rules are assigned with the same priority, the rule added earlier has higher priority, the rule added earlier has higher priority. The value ranges from 0 to 65535.
- start
Time String - Specifies the UTC time when the precise protection rule takes effect. The time must be in "yyyy-MM-dd HH:mm:ss" format. If not specified, the rule takes effect immediately.
- waf
Rule StringPrecise Protection Id - The rule ID in UUID format.
Supporting Types
WafRulePreciseProtectionCondition, WafRulePreciseProtectionConditionArgs
- Content string
- Specifies the content matching the condition.
- Field string
- Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
- Logic string
- Specifies the logic relationship. The value can be contain, not_contain,
equal, not_equal, prefix, not_prefix, suffix, and not_suffix.
If
field
is set to ip,logic
can only be equal or not_equal. - Subfield string
- Specifies the matched subfield.
- If
field
is set to cookie, subfield indicates cookie name. - If
field
is set to params, subfield indicates param name. - If
field
is set to header, subfield indicates an option in the header.
- If
- Content string
- Specifies the content matching the condition.
- Field string
- Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
- Logic string
- Specifies the logic relationship. The value can be contain, not_contain,
equal, not_equal, prefix, not_prefix, suffix, and not_suffix.
If
field
is set to ip,logic
can only be equal or not_equal. - Subfield string
- Specifies the matched subfield.
- If
field
is set to cookie, subfield indicates cookie name. - If
field
is set to params, subfield indicates param name. - If
field
is set to header, subfield indicates an option in the header.
- If
- content String
- Specifies the content matching the condition.
- field String
- Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
- logic String
- Specifies the logic relationship. The value can be contain, not_contain,
equal, not_equal, prefix, not_prefix, suffix, and not_suffix.
If
field
is set to ip,logic
can only be equal or not_equal. - subfield String
- Specifies the matched subfield.
- If
field
is set to cookie, subfield indicates cookie name. - If
field
is set to params, subfield indicates param name. - If
field
is set to header, subfield indicates an option in the header.
- If
- content string
- Specifies the content matching the condition.
- field string
- Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
- logic string
- Specifies the logic relationship. The value can be contain, not_contain,
equal, not_equal, prefix, not_prefix, suffix, and not_suffix.
If
field
is set to ip,logic
can only be equal or not_equal. - subfield string
- Specifies the matched subfield.
- If
field
is set to cookie, subfield indicates cookie name. - If
field
is set to params, subfield indicates param name. - If
field
is set to header, subfield indicates an option in the header.
- If
- content str
- Specifies the content matching the condition.
- field str
- Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
- logic str
- Specifies the logic relationship. The value can be contain, not_contain,
equal, not_equal, prefix, not_prefix, suffix, and not_suffix.
If
field
is set to ip,logic
can only be equal or not_equal. - subfield str
- Specifies the matched subfield.
- If
field
is set to cookie, subfield indicates cookie name. - If
field
is set to params, subfield indicates param name. - If
field
is set to header, subfield indicates an option in the header.
- If
- content String
- Specifies the content matching the condition.
- field String
- Specifies the matched field. The value can be path, user-agent, ip, params, cookie, referer, and header.
- logic String
- Specifies the logic relationship. The value can be contain, not_contain,
equal, not_equal, prefix, not_prefix, suffix, and not_suffix.
If
field
is set to ip,logic
can only be equal or not_equal. - subfield String
- Specifies the matched subfield.
- If
field
is set to cookie, subfield indicates cookie name. - If
field
is set to params, subfield indicates param name. - If
field
is set to header, subfield indicates an option in the header.
- If
Import
Precise Protection Rules can be imported using the policy ID and rule ID
separated by a slash, e.g.:
$ pulumi import flexibleengine:index/wafRulePreciseProtection:WafRulePreciseProtection rule_1 523083f4543c497faecd25fcfcc0b2a0/620801321b254f8fbc7dafa6bbebe652
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.