opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1
Explore with Pulumi AI
Up-to-date reference of API arguments for WAF dedicated Known Attack Source rule you can get at documentation portal.
Manages a WAF Dedicated Known Attack Source 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.WafDedicatedKnownAttackSourceRuleV1("rule1", {
policyId: policy1.wafDedicatedPolicyV1Id,
blockTime: 300,
category: "long_cookie_block",
description: "test description",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
policy1 = opentelekomcloud.WafDedicatedPolicyV1("policy1")
rule1 = opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1("rule1",
policy_id=policy1.waf_dedicated_policy_v1_id,
block_time=300,
category="long_cookie_block",
description="test description")
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.NewWafDedicatedKnownAttackSourceRuleV1(ctx, "rule1", &opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1Args{
PolicyId: policy1.WafDedicatedPolicyV1Id,
BlockTime: pulumi.Float64(300),
Category: pulumi.String("long_cookie_block"),
Description: pulumi.String("test description"),
})
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.WafDedicatedKnownAttackSourceRuleV1("rule1", new()
{
PolicyId = policy1.WafDedicatedPolicyV1Id,
BlockTime = 300,
Category = "long_cookie_block",
Description = "test description",
});
});
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.WafDedicatedKnownAttackSourceRuleV1;
import com.pulumi.opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1Args;
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 WafDedicatedKnownAttackSourceRuleV1("rule1", WafDedicatedKnownAttackSourceRuleV1Args.builder()
.policyId(policy1.wafDedicatedPolicyV1Id())
.blockTime(300)
.category("long_cookie_block")
.description("test description")
.build());
}
}
resources:
policy1:
type: opentelekomcloud:WafDedicatedPolicyV1
rule1:
type: opentelekomcloud:WafDedicatedKnownAttackSourceRuleV1
properties:
policyId: ${policy1.wafDedicatedPolicyV1Id}
blockTime: 300
category: long_cookie_block
description: test description
Create WafDedicatedKnownAttackSourceRuleV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafDedicatedKnownAttackSourceRuleV1(name: string, args: WafDedicatedKnownAttackSourceRuleV1Args, opts?: CustomResourceOptions);
@overload
def WafDedicatedKnownAttackSourceRuleV1(resource_name: str,
args: WafDedicatedKnownAttackSourceRuleV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def WafDedicatedKnownAttackSourceRuleV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
block_time: Optional[float] = None,
category: Optional[str] = None,
policy_id: Optional[str] = None,
description: Optional[str] = None,
timeouts: Optional[WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs] = None,
waf_dedicated_known_attack_source_rule_v1_id: Optional[str] = None)
func NewWafDedicatedKnownAttackSourceRuleV1(ctx *Context, name string, args WafDedicatedKnownAttackSourceRuleV1Args, opts ...ResourceOption) (*WafDedicatedKnownAttackSourceRuleV1, error)
public WafDedicatedKnownAttackSourceRuleV1(string name, WafDedicatedKnownAttackSourceRuleV1Args args, CustomResourceOptions? opts = null)
public WafDedicatedKnownAttackSourceRuleV1(String name, WafDedicatedKnownAttackSourceRuleV1Args args)
public WafDedicatedKnownAttackSourceRuleV1(String name, WafDedicatedKnownAttackSourceRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafDedicatedKnownAttackSourceRuleV1
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 WafDedicatedKnownAttackSourceRuleV1Args
- 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 WafDedicatedKnownAttackSourceRuleV1Args
- 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 WafDedicatedKnownAttackSourceRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafDedicatedKnownAttackSourceRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafDedicatedKnownAttackSourceRuleV1Args
- 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 wafDedicatedKnownAttackSourceRuleV1Resource = new Opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1("wafDedicatedKnownAttackSourceRuleV1Resource", new()
{
BlockTime = 0,
Category = "string",
PolicyId = "string",
Description = "string",
Timeouts = new Opentelekomcloud.Inputs.WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
WafDedicatedKnownAttackSourceRuleV1Id = "string",
});
example, err := opentelekomcloud.NewWafDedicatedKnownAttackSourceRuleV1(ctx, "wafDedicatedKnownAttackSourceRuleV1Resource", &opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1Args{
BlockTime: pulumi.Float64(0),
Category: pulumi.String("string"),
PolicyId: pulumi.String("string"),
Description: pulumi.String("string"),
Timeouts: &opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
WafDedicatedKnownAttackSourceRuleV1Id: pulumi.String("string"),
})
var wafDedicatedKnownAttackSourceRuleV1Resource = new WafDedicatedKnownAttackSourceRuleV1("wafDedicatedKnownAttackSourceRuleV1Resource", WafDedicatedKnownAttackSourceRuleV1Args.builder()
.blockTime(0)
.category("string")
.policyId("string")
.description("string")
.timeouts(WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.wafDedicatedKnownAttackSourceRuleV1Id("string")
.build());
waf_dedicated_known_attack_source_rule_v1_resource = opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1("wafDedicatedKnownAttackSourceRuleV1Resource",
block_time=0,
category="string",
policy_id="string",
description="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
waf_dedicated_known_attack_source_rule_v1_id="string")
const wafDedicatedKnownAttackSourceRuleV1Resource = new opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1("wafDedicatedKnownAttackSourceRuleV1Resource", {
blockTime: 0,
category: "string",
policyId: "string",
description: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
wafDedicatedKnownAttackSourceRuleV1Id: "string",
});
type: opentelekomcloud:WafDedicatedKnownAttackSourceRuleV1
properties:
blockTime: 0
category: string
description: string
policyId: string
timeouts:
create: string
delete: string
update: string
wafDedicatedKnownAttackSourceRuleV1Id: string
WafDedicatedKnownAttackSourceRuleV1 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 WafDedicatedKnownAttackSourceRuleV1 resource accepts the following input properties:
- Block
Time double - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - Category string
- Type of the know attack source rule. Enumeration values:
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Description string
- Rule description.
- Timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts - Waf
Dedicated stringKnown Attack Source Rule V1Id - ID of the rule.
- Block
Time float64 - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - Category string
- Type of the know attack source rule. Enumeration values:
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Description string
- Rule description.
- Timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts Args - Waf
Dedicated stringKnown Attack Source Rule V1Id - ID of the rule.
- block
Time Double - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category String
- Type of the know attack source rule. Enumeration values:
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- description String
- Rule description.
- timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts - waf
Dedicated StringKnown Attack Source Rule V1Id - ID of the rule.
- block
Time number - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category string
- Type of the know attack source rule. Enumeration values:
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- description string
- Rule description.
- timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts - waf
Dedicated stringKnown Attack Source Rule V1Id - ID of the rule.
- block_
time float - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category str
- Type of the know attack source rule. Enumeration values:
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- description str
- Rule description.
- timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts Args - waf_
dedicated_ strknown_ attack_ source_ rule_ v1_ id - ID of the rule.
- block
Time Number - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category String
- Type of the know attack source rule. Enumeration values:
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- description String
- Rule description.
- timeouts Property Map
- waf
Dedicated StringKnown Attack Source Rule V1Id - ID of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafDedicatedKnownAttackSourceRuleV1 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.
Look up Existing WafDedicatedKnownAttackSourceRuleV1 Resource
Get an existing WafDedicatedKnownAttackSourceRuleV1 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?: WafDedicatedKnownAttackSourceRuleV1State, opts?: CustomResourceOptions): WafDedicatedKnownAttackSourceRuleV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
block_time: Optional[float] = None,
category: Optional[str] = None,
created_at: Optional[float] = None,
description: Optional[str] = None,
policy_id: Optional[str] = None,
timeouts: Optional[WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs] = None,
waf_dedicated_known_attack_source_rule_v1_id: Optional[str] = None) -> WafDedicatedKnownAttackSourceRuleV1
func GetWafDedicatedKnownAttackSourceRuleV1(ctx *Context, name string, id IDInput, state *WafDedicatedKnownAttackSourceRuleV1State, opts ...ResourceOption) (*WafDedicatedKnownAttackSourceRuleV1, error)
public static WafDedicatedKnownAttackSourceRuleV1 Get(string name, Input<string> id, WafDedicatedKnownAttackSourceRuleV1State? state, CustomResourceOptions? opts = null)
public static WafDedicatedKnownAttackSourceRuleV1 get(String name, Output<String> id, WafDedicatedKnownAttackSourceRuleV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:WafDedicatedKnownAttackSourceRuleV1 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.
- Block
Time double - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - Category string
- Type of the know attack source rule. Enumeration values:
- Created
At double - Timestamp the rule is created.
- Description string
- Rule description.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts - Waf
Dedicated stringKnown Attack Source Rule V1Id - ID of the rule.
- Block
Time float64 - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - Category string
- Type of the know attack source rule. Enumeration values:
- Created
At float64 - Timestamp the rule is created.
- Description string
- Rule description.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts Args - Waf
Dedicated stringKnown Attack Source Rule V1Id - ID of the rule.
- block
Time Double - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category String
- Type of the know attack source rule. Enumeration values:
- created
At Double - Timestamp the rule is created.
- description String
- Rule description.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts - waf
Dedicated StringKnown Attack Source Rule V1Id - ID of the rule.
- block
Time number - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category string
- Type of the know attack source rule. Enumeration values:
- created
At number - Timestamp the rule is created.
- description string
- Rule description.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts - waf
Dedicated stringKnown Attack Source Rule V1Id - ID of the rule.
- block_
time float - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category str
- Type of the know attack source rule. Enumeration values:
- created_
at float - Timestamp the rule is created.
- description str
- Rule description.
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- timeouts
Waf
Dedicated Known Attack Source Rule V1Timeouts Args - waf_
dedicated_ strknown_ attack_ source_ rule_ v1_ id - ID of the rule.
- block
Time Number - Block duration, in seconds.
If prefix long is selected for the rule type, the value for
block_time
ranges from301
to1800
. If prefix short is selected for the rule type, the value forblock_time
ranges from0
to300
. - category String
- Type of the know attack source rule. Enumeration values:
- created
At Number - Timestamp the rule is created.
- description String
- Rule description.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- timeouts Property Map
- waf
Dedicated StringKnown Attack Source Rule V1Id - ID of the rule.
Supporting Types
WafDedicatedKnownAttackSourceRuleV1Timeouts, WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs
Import
Dedicated WAF Known Attack Source Rules can be imported using policy_id/id
, e.g.
$ pulumi import opentelekomcloud:index/wafDedicatedKnownAttackSourceRuleV1:WafDedicatedKnownAttackSourceRuleV1 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.