1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. WafDedicatedKnownAttackSourceRuleV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.WafDedicatedKnownAttackSourceRuleV1

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    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:

    BlockTime double
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    Category string
    Type of the know attack source rule. Enumeration values:
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Description string
    Rule description.
    Timeouts WafDedicatedKnownAttackSourceRuleV1Timeouts
    WafDedicatedKnownAttackSourceRuleV1Id string
    ID of the rule.
    BlockTime float64
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    Category string
    Type of the know attack source rule. Enumeration values:
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Description string
    Rule description.
    Timeouts WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs
    WafDedicatedKnownAttackSourceRuleV1Id string
    ID of the rule.
    blockTime Double
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    category String
    Type of the know attack source rule. Enumeration values:
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    description String
    Rule description.
    timeouts WafDedicatedKnownAttackSourceRuleV1Timeouts
    wafDedicatedKnownAttackSourceRuleV1Id String
    ID of the rule.
    blockTime number
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    category string
    Type of the know attack source rule. Enumeration values:
    policyId string
    The WAF policy ID. Changing this creates a new rule.
    description string
    Rule description.
    timeouts WafDedicatedKnownAttackSourceRuleV1Timeouts
    wafDedicatedKnownAttackSourceRuleV1Id string
    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 from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    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 WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs
    waf_dedicated_known_attack_source_rule_v1_id str
    ID of the rule.
    blockTime Number
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    category String
    Type of the know attack source rule. Enumeration values:
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    description String
    Rule description.
    timeouts Property Map
    wafDedicatedKnownAttackSourceRuleV1Id String
    ID of the rule.

    Outputs

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

    CreatedAt double
    Timestamp the rule is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt float64
    Timestamp the rule is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdAt Double
    Timestamp the rule is created.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt number
    Timestamp the rule is created.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at float
    Timestamp the rule is created.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt Number
    Timestamp the rule is created.
    id String
    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.
    The following state arguments are supported:
    BlockTime double
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    Category string
    Type of the know attack source rule. Enumeration values:
    CreatedAt double
    Timestamp the rule is created.
    Description string
    Rule description.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Timeouts WafDedicatedKnownAttackSourceRuleV1Timeouts
    WafDedicatedKnownAttackSourceRuleV1Id string
    ID of the rule.
    BlockTime float64
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    Category string
    Type of the know attack source rule. Enumeration values:
    CreatedAt float64
    Timestamp the rule is created.
    Description string
    Rule description.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule.
    Timeouts WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs
    WafDedicatedKnownAttackSourceRuleV1Id string
    ID of the rule.
    blockTime Double
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    category String
    Type of the know attack source rule. Enumeration values:
    createdAt Double
    Timestamp the rule is created.
    description String
    Rule description.
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    timeouts WafDedicatedKnownAttackSourceRuleV1Timeouts
    wafDedicatedKnownAttackSourceRuleV1Id String
    ID of the rule.
    blockTime number
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    category string
    Type of the know attack source rule. Enumeration values:
    createdAt number
    Timestamp the rule is created.
    description string
    Rule description.
    policyId string
    The WAF policy ID. Changing this creates a new rule.
    timeouts WafDedicatedKnownAttackSourceRuleV1Timeouts
    wafDedicatedKnownAttackSourceRuleV1Id string
    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 from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    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 WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs
    waf_dedicated_known_attack_source_rule_v1_id str
    ID of the rule.
    blockTime Number
    Block duration, in seconds. If prefix long is selected for the rule type, the value for block_time ranges from 301 to 1800. If prefix short is selected for the rule type, the value for block_time ranges from 0 to 300.
    category String
    Type of the know attack source rule. Enumeration values:
    createdAt Number
    Timestamp the rule is created.
    description String
    Rule description.
    policyId String
    The WAF policy ID. Changing this creates a new rule.
    timeouts Property Map
    wafDedicatedKnownAttackSourceRuleV1Id String
    ID of the rule.

    Supporting Types

    WafDedicatedKnownAttackSourceRuleV1Timeouts, WafDedicatedKnownAttackSourceRuleV1TimeoutsArgs

    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 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.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud