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

opentelekomcloud.WafDedicatedBlacklistRuleV1

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 Blacklist rule you can get at documentation portal.

    Manages a WAF Dedicated Blacklist 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.WafDedicatedBlacklistRuleV1("rule1", {
        policyId: policy1.wafDedicatedPolicyV1Id,
        ipAddress: "192.168.1.0/24",
        action: 0,
        description: "test description",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    policy1 = opentelekomcloud.WafDedicatedPolicyV1("policy1")
    rule1 = opentelekomcloud.WafDedicatedBlacklistRuleV1("rule1",
        policy_id=policy1.waf_dedicated_policy_v1_id,
        ip_address="192.168.1.0/24",
        action=0,
        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.NewWafDedicatedBlacklistRuleV1(ctx, "rule1", &opentelekomcloud.WafDedicatedBlacklistRuleV1Args{
    			PolicyId:    policy1.WafDedicatedPolicyV1Id,
    			IpAddress:   pulumi.String("192.168.1.0/24"),
    			Action:      pulumi.Float64(0),
    			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.WafDedicatedBlacklistRuleV1("rule1", new()
        {
            PolicyId = policy1.WafDedicatedPolicyV1Id,
            IpAddress = "192.168.1.0/24",
            Action = 0,
            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.WafDedicatedBlacklistRuleV1;
    import com.pulumi.opentelekomcloud.WafDedicatedBlacklistRuleV1Args;
    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 WafDedicatedBlacklistRuleV1("rule1", WafDedicatedBlacklistRuleV1Args.builder()
                .policyId(policy1.wafDedicatedPolicyV1Id())
                .ipAddress("192.168.1.0/24")
                .action(0)
                .description("test description")
                .build());
    
        }
    }
    
    resources:
      policy1:
        type: opentelekomcloud:WafDedicatedPolicyV1
      rule1:
        type: opentelekomcloud:WafDedicatedBlacklistRuleV1
        properties:
          policyId: ${policy1.wafDedicatedPolicyV1Id}
          ipAddress: 192.168.1.0/24
          action: 0
          description: test description
    

    Create WafDedicatedBlacklistRuleV1 Resource

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

    Constructor syntax

    new WafDedicatedBlacklistRuleV1(name: string, args: WafDedicatedBlacklistRuleV1Args, opts?: CustomResourceOptions);
    @overload
    def WafDedicatedBlacklistRuleV1(resource_name: str,
                                    args: WafDedicatedBlacklistRuleV1Args,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafDedicatedBlacklistRuleV1(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    action: Optional[float] = None,
                                    ip_address: Optional[str] = None,
                                    policy_id: Optional[str] = None,
                                    description: Optional[str] = None,
                                    followed_action_id: Optional[str] = None,
                                    name: Optional[str] = None,
                                    timeouts: Optional[WafDedicatedBlacklistRuleV1TimeoutsArgs] = None,
                                    waf_dedicated_blacklist_rule_v1_id: Optional[str] = None)
    func NewWafDedicatedBlacklistRuleV1(ctx *Context, name string, args WafDedicatedBlacklistRuleV1Args, opts ...ResourceOption) (*WafDedicatedBlacklistRuleV1, error)
    public WafDedicatedBlacklistRuleV1(string name, WafDedicatedBlacklistRuleV1Args args, CustomResourceOptions? opts = null)
    public WafDedicatedBlacklistRuleV1(String name, WafDedicatedBlacklistRuleV1Args args)
    public WafDedicatedBlacklistRuleV1(String name, WafDedicatedBlacklistRuleV1Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:WafDedicatedBlacklistRuleV1
    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 WafDedicatedBlacklistRuleV1Args
    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 WafDedicatedBlacklistRuleV1Args
    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 WafDedicatedBlacklistRuleV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafDedicatedBlacklistRuleV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafDedicatedBlacklistRuleV1Args
    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 wafDedicatedBlacklistRuleV1Resource = new Opentelekomcloud.WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource", new()
    {
        Action = 0,
        IpAddress = "string",
        PolicyId = "string",
        Description = "string",
        FollowedActionId = "string",
        Name = "string",
        Timeouts = new Opentelekomcloud.Inputs.WafDedicatedBlacklistRuleV1TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        WafDedicatedBlacklistRuleV1Id = "string",
    });
    
    example, err := opentelekomcloud.NewWafDedicatedBlacklistRuleV1(ctx, "wafDedicatedBlacklistRuleV1Resource", &opentelekomcloud.WafDedicatedBlacklistRuleV1Args{
    	Action:           pulumi.Float64(0),
    	IpAddress:        pulumi.String("string"),
    	PolicyId:         pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	FollowedActionId: pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	Timeouts: &opentelekomcloud.WafDedicatedBlacklistRuleV1TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	WafDedicatedBlacklistRuleV1Id: pulumi.String("string"),
    })
    
    var wafDedicatedBlacklistRuleV1Resource = new WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource", WafDedicatedBlacklistRuleV1Args.builder()
        .action(0)
        .ipAddress("string")
        .policyId("string")
        .description("string")
        .followedActionId("string")
        .name("string")
        .timeouts(WafDedicatedBlacklistRuleV1TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .wafDedicatedBlacklistRuleV1Id("string")
        .build());
    
    waf_dedicated_blacklist_rule_v1_resource = opentelekomcloud.WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource",
        action=0,
        ip_address="string",
        policy_id="string",
        description="string",
        followed_action_id="string",
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
        },
        waf_dedicated_blacklist_rule_v1_id="string")
    
    const wafDedicatedBlacklistRuleV1Resource = new opentelekomcloud.WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource", {
        action: 0,
        ipAddress: "string",
        policyId: "string",
        description: "string",
        followedActionId: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
        wafDedicatedBlacklistRuleV1Id: "string",
    });
    
    type: opentelekomcloud:WafDedicatedBlacklistRuleV1
    properties:
        action: 0
        description: string
        followedActionId: string
        ipAddress: string
        name: string
        policyId: string
        timeouts:
            create: string
            delete: string
        wafDedicatedBlacklistRuleV1Id: string
    

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

    Action double
    Protective action. Changing this creates a new rule. The value can be:
    IpAddress string
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    PolicyId string
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    Description string
    Rule description. Changing this creates a new rule.
    FollowedActionId string
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    Name string
    Rule name. Changing this creates a new rule.
    Timeouts WafDedicatedBlacklistRuleV1Timeouts
    WafDedicatedBlacklistRuleV1Id string
    ID of the rule.
    Action float64
    Protective action. Changing this creates a new rule. The value can be:
    IpAddress string
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    PolicyId string
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    Description string
    Rule description. Changing this creates a new rule.
    FollowedActionId string
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    Name string
    Rule name. Changing this creates a new rule.
    Timeouts WafDedicatedBlacklistRuleV1TimeoutsArgs
    WafDedicatedBlacklistRuleV1Id string
    ID of the rule.
    action Double
    Protective action. Changing this creates a new rule. The value can be:
    ipAddress String
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    policyId String
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    description String
    Rule description. Changing this creates a new rule.
    followedActionId String
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    name String
    Rule name. Changing this creates a new rule.
    timeouts WafDedicatedBlacklistRuleV1Timeouts
    wafDedicatedBlacklistRuleV1Id String
    ID of the rule.
    action number
    Protective action. Changing this creates a new rule. The value can be:
    ipAddress string
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    policyId string
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    description string
    Rule description. Changing this creates a new rule.
    followedActionId string
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    name string
    Rule name. Changing this creates a new rule.
    timeouts WafDedicatedBlacklistRuleV1Timeouts
    wafDedicatedBlacklistRuleV1Id string
    ID of the rule.
    action float
    Protective action. Changing this creates a new rule. The value can be:
    ip_address str
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    policy_id str
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    description str
    Rule description. Changing this creates a new rule.
    followed_action_id str
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    name str
    Rule name. Changing this creates a new rule.
    timeouts WafDedicatedBlacklistRuleV1TimeoutsArgs
    waf_dedicated_blacklist_rule_v1_id str
    ID of the rule.
    action Number
    Protective action. Changing this creates a new rule. The value can be:
    ipAddress String
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    policyId String
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    description String
    Rule description. Changing this creates a new rule.
    followedActionId String
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    name String
    Rule name. Changing this creates a new rule.
    timeouts Property Map
    wafDedicatedBlacklistRuleV1Id String
    ID of the rule.

    Outputs

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

    CreatedAt double
    Timestamp the rule is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status double
    Rule status. The value can be:
    CreatedAt float64
    Timestamp the rule is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status float64
    Rule status. The value can be:
    createdAt Double
    Timestamp the rule is created.
    id String
    The provider-assigned unique ID for this managed resource.
    status Double
    Rule status. The value can be:
    createdAt number
    Timestamp the rule is created.
    id string
    The provider-assigned unique ID for this managed resource.
    status number
    Rule status. The value can be:
    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:
    createdAt Number
    Timestamp the rule is created.
    id String
    The provider-assigned unique ID for this managed resource.
    status Number
    Rule status. The value can be:

    Look up Existing WafDedicatedBlacklistRuleV1 Resource

    Get an existing WafDedicatedBlacklistRuleV1 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?: WafDedicatedBlacklistRuleV1State, opts?: CustomResourceOptions): WafDedicatedBlacklistRuleV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[float] = None,
            created_at: Optional[float] = None,
            description: Optional[str] = None,
            followed_action_id: Optional[str] = None,
            ip_address: Optional[str] = None,
            name: Optional[str] = None,
            policy_id: Optional[str] = None,
            status: Optional[float] = None,
            timeouts: Optional[WafDedicatedBlacklistRuleV1TimeoutsArgs] = None,
            waf_dedicated_blacklist_rule_v1_id: Optional[str] = None) -> WafDedicatedBlacklistRuleV1
    func GetWafDedicatedBlacklistRuleV1(ctx *Context, name string, id IDInput, state *WafDedicatedBlacklistRuleV1State, opts ...ResourceOption) (*WafDedicatedBlacklistRuleV1, error)
    public static WafDedicatedBlacklistRuleV1 Get(string name, Input<string> id, WafDedicatedBlacklistRuleV1State? state, CustomResourceOptions? opts = null)
    public static WafDedicatedBlacklistRuleV1 get(String name, Output<String> id, WafDedicatedBlacklistRuleV1State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:WafDedicatedBlacklistRuleV1    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:
    Action double
    Protective action. Changing this creates a new rule. The value can be:
    CreatedAt double
    Timestamp the rule is created.
    Description string
    Rule description. Changing this creates a new rule.
    FollowedActionId string
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    IpAddress string
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    Name string
    Rule name. Changing this creates a new rule.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    Status double
    Rule status. The value can be:
    Timeouts WafDedicatedBlacklistRuleV1Timeouts
    WafDedicatedBlacklistRuleV1Id string
    ID of the rule.
    Action float64
    Protective action. Changing this creates a new rule. The value can be:
    CreatedAt float64
    Timestamp the rule is created.
    Description string
    Rule description. Changing this creates a new rule.
    FollowedActionId string
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    IpAddress string
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    Name string
    Rule name. Changing this creates a new rule.
    PolicyId string
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    Status float64
    Rule status. The value can be:
    Timeouts WafDedicatedBlacklistRuleV1TimeoutsArgs
    WafDedicatedBlacklistRuleV1Id string
    ID of the rule.
    action Double
    Protective action. Changing this creates a new rule. The value can be:
    createdAt Double
    Timestamp the rule is created.
    description String
    Rule description. Changing this creates a new rule.
    followedActionId String
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    ipAddress String
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    name String
    Rule name. Changing this creates a new rule.
    policyId String
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    status Double
    Rule status. The value can be:
    timeouts WafDedicatedBlacklistRuleV1Timeouts
    wafDedicatedBlacklistRuleV1Id String
    ID of the rule.
    action number
    Protective action. Changing this creates a new rule. The value can be:
    createdAt number
    Timestamp the rule is created.
    description string
    Rule description. Changing this creates a new rule.
    followedActionId string
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    ipAddress string
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    name string
    Rule name. Changing this creates a new rule.
    policyId string
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    status number
    Rule status. The value can be:
    timeouts WafDedicatedBlacklistRuleV1Timeouts
    wafDedicatedBlacklistRuleV1Id string
    ID of the rule.
    action float
    Protective action. Changing this creates a new rule. The value can be:
    created_at float
    Timestamp the rule is created.
    description str
    Rule description. Changing this creates a new rule.
    followed_action_id str
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    ip_address str
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    name str
    Rule name. Changing this creates a new rule.
    policy_id str
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    status float
    Rule status. The value can be:
    timeouts WafDedicatedBlacklistRuleV1TimeoutsArgs
    waf_dedicated_blacklist_rule_v1_id str
    ID of the rule.
    action Number
    Protective action. Changing this creates a new rule. The value can be:
    createdAt Number
    Timestamp the rule is created.
    description String
    Rule description. Changing this creates a new rule.
    followedActionId String
    ID of a known attack source rule. Changing this creates a new rule. This parameter can be configured only when action is set to 0.
    ipAddress String
    IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule. For example, 192.x.x.3 or 10.x.x.0/24
    name String
    Rule name. Changing this creates a new rule.
    policyId String
    The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
    status Number
    Rule status. The value can be:
    timeouts Property Map
    wafDedicatedBlacklistRuleV1Id String
    ID of the rule.

    Supporting Types

    WafDedicatedBlacklistRuleV1Timeouts, WafDedicatedBlacklistRuleV1TimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

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

    $ pulumi import opentelekomcloud:index/wafDedicatedBlacklistRuleV1:WafDedicatedBlacklistRuleV1 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