1. Packages
  2. Volcengine
  3. API Docs
  4. waf
  5. AclRule
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.waf.AclRule

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage waf acl rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.waf.AclRule("foo", {
        accurateGroup: {
            accurateRules: [{
                httpObj: "request.uri",
                objType: 1,
                opretar: 2,
                property: 0,
                valueString: "GET",
            }],
            logic: 1,
        },
        aclType: "Allow",
        action: "block",
        advanced: 1,
        description: "tf-test",
        enable: 1,
        hostAddType: 3,
        hostLists: ["www.tf-test.com"],
        ipAddType: 3,
        ipLists: [
            "1.2.2.2",
            "1.2.3.30",
        ],
        projectName: "default",
        url: "/",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.waf.AclRule("foo",
        accurate_group=volcengine.waf.AclRuleAccurateGroupArgs(
            accurate_rules=[volcengine.waf.AclRuleAccurateGroupAccurateRuleArgs(
                http_obj="request.uri",
                obj_type=1,
                opretar=2,
                property=0,
                value_string="GET",
            )],
            logic=1,
        ),
        acl_type="Allow",
        action="block",
        advanced=1,
        description="tf-test",
        enable=1,
        host_add_type=3,
        host_lists=["www.tf-test.com"],
        ip_add_type=3,
        ip_lists=[
            "1.2.2.2",
            "1.2.3.30",
        ],
        project_name="default",
        url="/")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/waf"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := waf.NewAclRule(ctx, "foo", &waf.AclRuleArgs{
    			AccurateGroup: &waf.AclRuleAccurateGroupArgs{
    				AccurateRules: waf.AclRuleAccurateGroupAccurateRuleArray{
    					&waf.AclRuleAccurateGroupAccurateRuleArgs{
    						HttpObj:     pulumi.String("request.uri"),
    						ObjType:     pulumi.Int(1),
    						Opretar:     pulumi.Int(2),
    						Property:    pulumi.Int(0),
    						ValueString: pulumi.String("GET"),
    					},
    				},
    				Logic: pulumi.Int(1),
    			},
    			AclType:     pulumi.String("Allow"),
    			Action:      pulumi.String("block"),
    			Advanced:    pulumi.Int(1),
    			Description: pulumi.String("tf-test"),
    			Enable:      pulumi.Int(1),
    			HostAddType: pulumi.Int(3),
    			HostLists: pulumi.StringArray{
    				pulumi.String("www.tf-test.com"),
    			},
    			IpAddType: pulumi.Int(3),
    			IpLists: pulumi.StringArray{
    				pulumi.String("1.2.2.2"),
    				pulumi.String("1.2.3.30"),
    			},
    			ProjectName: pulumi.String("default"),
    			Url:         pulumi.String("/"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Waf.AclRule("foo", new()
        {
            AccurateGroup = new Volcengine.Waf.Inputs.AclRuleAccurateGroupArgs
            {
                AccurateRules = new[]
                {
                    new Volcengine.Waf.Inputs.AclRuleAccurateGroupAccurateRuleArgs
                    {
                        HttpObj = "request.uri",
                        ObjType = 1,
                        Opretar = 2,
                        Property = 0,
                        ValueString = "GET",
                    },
                },
                Logic = 1,
            },
            AclType = "Allow",
            Action = "block",
            Advanced = 1,
            Description = "tf-test",
            Enable = 1,
            HostAddType = 3,
            HostLists = new[]
            {
                "www.tf-test.com",
            },
            IpAddType = 3,
            IpLists = new[]
            {
                "1.2.2.2",
                "1.2.3.30",
            },
            ProjectName = "default",
            Url = "/",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.waf.AclRule;
    import com.pulumi.volcengine.waf.AclRuleArgs;
    import com.pulumi.volcengine.waf.inputs.AclRuleAccurateGroupArgs;
    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 foo = new AclRule("foo", AclRuleArgs.builder()        
                .accurateGroup(AclRuleAccurateGroupArgs.builder()
                    .accurateRules(AclRuleAccurateGroupAccurateRuleArgs.builder()
                        .httpObj("request.uri")
                        .objType(1)
                        .opretar(2)
                        .property(0)
                        .valueString("GET")
                        .build())
                    .logic(1)
                    .build())
                .aclType("Allow")
                .action("block")
                .advanced(1)
                .description("tf-test")
                .enable(1)
                .hostAddType(3)
                .hostLists("www.tf-test.com")
                .ipAddType(3)
                .ipLists(            
                    "1.2.2.2",
                    "1.2.3.30")
                .projectName("default")
                .url("/")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:waf:AclRule
        properties:
          accurateGroup:
            accurateRules:
              - httpObj: request.uri
                objType: 1
                opretar: 2
                property: 0
                valueString: GET
            logic: 1
          aclType: Allow
          action: block
          advanced: 1
          description: tf-test
          enable: 1
          hostAddType: 3
          hostLists:
            - www.tf-test.com
          ipAddType: 3
          ipLists:
            - 1.2.2.2
            - 1.2.3.30
          projectName: default
          url: /
    

    Create AclRule Resource

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

    Constructor syntax

    new AclRule(name: string, args: AclRuleArgs, opts?: CustomResourceOptions);
    @overload
    def AclRule(resource_name: str,
                args: AclRuleArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def AclRule(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                enable: Optional[int] = None,
                acl_type: Optional[str] = None,
                url: Optional[str] = None,
                ip_add_type: Optional[int] = None,
                host_add_type: Optional[int] = None,
                host_lists: Optional[Sequence[str]] = None,
                description: Optional[str] = None,
                host_group_ids: Optional[Sequence[int]] = None,
                accurate_group: Optional[AclRuleAccurateGroupArgs] = None,
                advanced: Optional[int] = None,
                ip_group_ids: Optional[Sequence[int]] = None,
                ip_lists: Optional[Sequence[str]] = None,
                ip_location_countries: Optional[Sequence[str]] = None,
                ip_location_subregions: Optional[Sequence[str]] = None,
                name: Optional[str] = None,
                project_name: Optional[str] = None,
                action: Optional[str] = None)
    func NewAclRule(ctx *Context, name string, args AclRuleArgs, opts ...ResourceOption) (*AclRule, error)
    public AclRule(string name, AclRuleArgs args, CustomResourceOptions? opts = null)
    public AclRule(String name, AclRuleArgs args)
    public AclRule(String name, AclRuleArgs args, CustomResourceOptions options)
    
    type: volcengine:waf:AclRule
    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 AclRuleArgs
    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 AclRuleArgs
    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 AclRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AclRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AclRuleArgs
    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 aclRuleResource = new Volcengine.Waf.AclRule("aclRuleResource", new()
    {
        Enable = 0,
        AclType = "string",
        Url = "string",
        IpAddType = 0,
        HostAddType = 0,
        HostLists = new[]
        {
            "string",
        },
        Description = "string",
        HostGroupIds = new[]
        {
            0,
        },
        AccurateGroup = new Volcengine.Waf.Inputs.AclRuleAccurateGroupArgs
        {
            AccurateRules = new[]
            {
                new Volcengine.Waf.Inputs.AclRuleAccurateGroupAccurateRuleArgs
                {
                    HttpObj = "string",
                    ObjType = 0,
                    Opretar = 0,
                    Property = 0,
                    ValueString = "string",
                },
            },
            Logic = 0,
        },
        Advanced = 0,
        IpGroupIds = new[]
        {
            0,
        },
        IpLists = new[]
        {
            "string",
        },
        IpLocationCountries = new[]
        {
            "string",
        },
        IpLocationSubregions = new[]
        {
            "string",
        },
        Name = "string",
        ProjectName = "string",
        Action = "string",
    });
    
    example, err := waf.NewAclRule(ctx, "aclRuleResource", &waf.AclRuleArgs{
    	Enable:      pulumi.Int(0),
    	AclType:     pulumi.String("string"),
    	Url:         pulumi.String("string"),
    	IpAddType:   pulumi.Int(0),
    	HostAddType: pulumi.Int(0),
    	HostLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	HostGroupIds: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	AccurateGroup: &waf.AclRuleAccurateGroupArgs{
    		AccurateRules: waf.AclRuleAccurateGroupAccurateRuleArray{
    			&waf.AclRuleAccurateGroupAccurateRuleArgs{
    				HttpObj:     pulumi.String("string"),
    				ObjType:     pulumi.Int(0),
    				Opretar:     pulumi.Int(0),
    				Property:    pulumi.Int(0),
    				ValueString: pulumi.String("string"),
    			},
    		},
    		Logic: pulumi.Int(0),
    	},
    	Advanced: pulumi.Int(0),
    	IpGroupIds: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	IpLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IpLocationCountries: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IpLocationSubregions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:        pulumi.String("string"),
    	ProjectName: pulumi.String("string"),
    	Action:      pulumi.String("string"),
    })
    
    var aclRuleResource = new AclRule("aclRuleResource", AclRuleArgs.builder()
        .enable(0)
        .aclType("string")
        .url("string")
        .ipAddType(0)
        .hostAddType(0)
        .hostLists("string")
        .description("string")
        .hostGroupIds(0)
        .accurateGroup(AclRuleAccurateGroupArgs.builder()
            .accurateRules(AclRuleAccurateGroupAccurateRuleArgs.builder()
                .httpObj("string")
                .objType(0)
                .opretar(0)
                .property(0)
                .valueString("string")
                .build())
            .logic(0)
            .build())
        .advanced(0)
        .ipGroupIds(0)
        .ipLists("string")
        .ipLocationCountries("string")
        .ipLocationSubregions("string")
        .name("string")
        .projectName("string")
        .action("string")
        .build());
    
    acl_rule_resource = volcengine.waf.AclRule("aclRuleResource",
        enable=0,
        acl_type="string",
        url="string",
        ip_add_type=0,
        host_add_type=0,
        host_lists=["string"],
        description="string",
        host_group_ids=[0],
        accurate_group={
            "accurate_rules": [{
                "http_obj": "string",
                "obj_type": 0,
                "opretar": 0,
                "property": 0,
                "value_string": "string",
            }],
            "logic": 0,
        },
        advanced=0,
        ip_group_ids=[0],
        ip_lists=["string"],
        ip_location_countries=["string"],
        ip_location_subregions=["string"],
        name="string",
        project_name="string",
        action="string")
    
    const aclRuleResource = new volcengine.waf.AclRule("aclRuleResource", {
        enable: 0,
        aclType: "string",
        url: "string",
        ipAddType: 0,
        hostAddType: 0,
        hostLists: ["string"],
        description: "string",
        hostGroupIds: [0],
        accurateGroup: {
            accurateRules: [{
                httpObj: "string",
                objType: 0,
                opretar: 0,
                property: 0,
                valueString: "string",
            }],
            logic: 0,
        },
        advanced: 0,
        ipGroupIds: [0],
        ipLists: ["string"],
        ipLocationCountries: ["string"],
        ipLocationSubregions: ["string"],
        name: "string",
        projectName: "string",
        action: "string",
    });
    
    type: volcengine:waf:AclRule
    properties:
        accurateGroup:
            accurateRules:
                - httpObj: string
                  objType: 0
                  opretar: 0
                  property: 0
                  valueString: string
            logic: 0
        aclType: string
        action: string
        advanced: 0
        description: string
        enable: 0
        hostAddType: 0
        hostGroupIds:
            - 0
        hostLists:
            - string
        ipAddType: 0
        ipGroupIds:
            - 0
        ipLists:
            - string
        ipLocationCountries:
            - string
        ipLocationSubregions:
            - string
        name: string
        projectName: string
        url: string
    

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

    AclType string
    The type of access control rules.
    Enable int
    Whether to enable the rule.
    HostAddType int
    Type of domain name addition.
    IpAddType int
    Type of IP address addition.
    Url string
    The path of Matching.
    AccurateGroup AclRuleAccurateGroup
    Advanced conditions.
    Action string
    Action to be taken on requests that match the rule.
    Advanced int
    Whether to set advanced conditions.
    Description string
    Rule description.
    HostGroupIds List<int>
    The ID of the domain group.
    HostLists List<string>
    Required if HostAddType = 3. Single or multiple domain names are supported.
    IpGroupIds List<int>
    Required if IpAddType = 2.
    IpLists List<string>
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    IpLocationCountries List<string>
    Country or region code.
    IpLocationSubregions List<string>
    Domestic region code.
    Name string
    Rule name.
    ProjectName string
    The name of the project to which your domain names belong.
    AclType string
    The type of access control rules.
    Enable int
    Whether to enable the rule.
    HostAddType int
    Type of domain name addition.
    IpAddType int
    Type of IP address addition.
    Url string
    The path of Matching.
    AccurateGroup AclRuleAccurateGroupArgs
    Advanced conditions.
    Action string
    Action to be taken on requests that match the rule.
    Advanced int
    Whether to set advanced conditions.
    Description string
    Rule description.
    HostGroupIds []int
    The ID of the domain group.
    HostLists []string
    Required if HostAddType = 3. Single or multiple domain names are supported.
    IpGroupIds []int
    Required if IpAddType = 2.
    IpLists []string
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    IpLocationCountries []string
    Country or region code.
    IpLocationSubregions []string
    Domestic region code.
    Name string
    Rule name.
    ProjectName string
    The name of the project to which your domain names belong.
    aclType String
    The type of access control rules.
    enable Integer
    Whether to enable the rule.
    hostAddType Integer
    Type of domain name addition.
    ipAddType Integer
    Type of IP address addition.
    url String
    The path of Matching.
    accurateGroup AclRuleAccurateGroup
    Advanced conditions.
    action String
    Action to be taken on requests that match the rule.
    advanced Integer
    Whether to set advanced conditions.
    description String
    Rule description.
    hostGroupIds List<Integer>
    The ID of the domain group.
    hostLists List<String>
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ipGroupIds List<Integer>
    Required if IpAddType = 2.
    ipLists List<String>
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ipLocationCountries List<String>
    Country or region code.
    ipLocationSubregions List<String>
    Domestic region code.
    name String
    Rule name.
    projectName String
    The name of the project to which your domain names belong.
    aclType string
    The type of access control rules.
    enable number
    Whether to enable the rule.
    hostAddType number
    Type of domain name addition.
    ipAddType number
    Type of IP address addition.
    url string
    The path of Matching.
    accurateGroup AclRuleAccurateGroup
    Advanced conditions.
    action string
    Action to be taken on requests that match the rule.
    advanced number
    Whether to set advanced conditions.
    description string
    Rule description.
    hostGroupIds number[]
    The ID of the domain group.
    hostLists string[]
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ipGroupIds number[]
    Required if IpAddType = 2.
    ipLists string[]
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ipLocationCountries string[]
    Country or region code.
    ipLocationSubregions string[]
    Domestic region code.
    name string
    Rule name.
    projectName string
    The name of the project to which your domain names belong.
    acl_type str
    The type of access control rules.
    enable int
    Whether to enable the rule.
    host_add_type int
    Type of domain name addition.
    ip_add_type int
    Type of IP address addition.
    url str
    The path of Matching.
    accurate_group AclRuleAccurateGroupArgs
    Advanced conditions.
    action str
    Action to be taken on requests that match the rule.
    advanced int
    Whether to set advanced conditions.
    description str
    Rule description.
    host_group_ids Sequence[int]
    The ID of the domain group.
    host_lists Sequence[str]
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ip_group_ids Sequence[int]
    Required if IpAddType = 2.
    ip_lists Sequence[str]
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ip_location_countries Sequence[str]
    Country or region code.
    ip_location_subregions Sequence[str]
    Domestic region code.
    name str
    Rule name.
    project_name str
    The name of the project to which your domain names belong.
    aclType String
    The type of access control rules.
    enable Number
    Whether to enable the rule.
    hostAddType Number
    Type of domain name addition.
    ipAddType Number
    Type of IP address addition.
    url String
    The path of Matching.
    accurateGroup Property Map
    Advanced conditions.
    action String
    Action to be taken on requests that match the rule.
    advanced Number
    Whether to set advanced conditions.
    description String
    Rule description.
    hostGroupIds List<Number>
    The ID of the domain group.
    hostLists List<String>
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ipGroupIds List<Number>
    Required if IpAddType = 2.
    ipLists List<String>
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ipLocationCountries List<String>
    Country or region code.
    ipLocationSubregions List<String>
    Domestic region code.
    name String
    Rule name.
    projectName String
    The name of the project to which your domain names belong.

    Outputs

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

    ClientIp string
    IP address.
    HostGroups List<AclRuleHostGroup>
    The list of domain name groups.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpGroups List<AclRuleIpGroup>
    The list of domain name groups.
    RuleTag string
    Rule unique identifier.
    UpdateTime string
    Update time of the rule.
    ClientIp string
    IP address.
    HostGroups []AclRuleHostGroup
    The list of domain name groups.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpGroups []AclRuleIpGroup
    The list of domain name groups.
    RuleTag string
    Rule unique identifier.
    UpdateTime string
    Update time of the rule.
    clientIp String
    IP address.
    hostGroups List<AclRuleHostGroup>
    The list of domain name groups.
    id String
    The provider-assigned unique ID for this managed resource.
    ipGroups List<AclRuleIpGroup>
    The list of domain name groups.
    ruleTag String
    Rule unique identifier.
    updateTime String
    Update time of the rule.
    clientIp string
    IP address.
    hostGroups AclRuleHostGroup[]
    The list of domain name groups.
    id string
    The provider-assigned unique ID for this managed resource.
    ipGroups AclRuleIpGroup[]
    The list of domain name groups.
    ruleTag string
    Rule unique identifier.
    updateTime string
    Update time of the rule.
    client_ip str
    IP address.
    host_groups Sequence[AclRuleHostGroup]
    The list of domain name groups.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_groups Sequence[AclRuleIpGroup]
    The list of domain name groups.
    rule_tag str
    Rule unique identifier.
    update_time str
    Update time of the rule.
    clientIp String
    IP address.
    hostGroups List<Property Map>
    The list of domain name groups.
    id String
    The provider-assigned unique ID for this managed resource.
    ipGroups List<Property Map>
    The list of domain name groups.
    ruleTag String
    Rule unique identifier.
    updateTime String
    Update time of the rule.

    Look up Existing AclRule Resource

    Get an existing AclRule 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?: AclRuleState, opts?: CustomResourceOptions): AclRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accurate_group: Optional[AclRuleAccurateGroupArgs] = None,
            acl_type: Optional[str] = None,
            action: Optional[str] = None,
            advanced: Optional[int] = None,
            client_ip: Optional[str] = None,
            description: Optional[str] = None,
            enable: Optional[int] = None,
            host_add_type: Optional[int] = None,
            host_group_ids: Optional[Sequence[int]] = None,
            host_groups: Optional[Sequence[AclRuleHostGroupArgs]] = None,
            host_lists: Optional[Sequence[str]] = None,
            ip_add_type: Optional[int] = None,
            ip_group_ids: Optional[Sequence[int]] = None,
            ip_groups: Optional[Sequence[AclRuleIpGroupArgs]] = None,
            ip_lists: Optional[Sequence[str]] = None,
            ip_location_countries: Optional[Sequence[str]] = None,
            ip_location_subregions: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            project_name: Optional[str] = None,
            rule_tag: Optional[str] = None,
            update_time: Optional[str] = None,
            url: Optional[str] = None) -> AclRule
    func GetAclRule(ctx *Context, name string, id IDInput, state *AclRuleState, opts ...ResourceOption) (*AclRule, error)
    public static AclRule Get(string name, Input<string> id, AclRuleState? state, CustomResourceOptions? opts = null)
    public static AclRule get(String name, Output<String> id, AclRuleState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:waf:AclRule    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:
    AccurateGroup AclRuleAccurateGroup
    Advanced conditions.
    AclType string
    The type of access control rules.
    Action string
    Action to be taken on requests that match the rule.
    Advanced int
    Whether to set advanced conditions.
    ClientIp string
    IP address.
    Description string
    Rule description.
    Enable int
    Whether to enable the rule.
    HostAddType int
    Type of domain name addition.
    HostGroupIds List<int>
    The ID of the domain group.
    HostGroups List<AclRuleHostGroup>
    The list of domain name groups.
    HostLists List<string>
    Required if HostAddType = 3. Single or multiple domain names are supported.
    IpAddType int
    Type of IP address addition.
    IpGroupIds List<int>
    Required if IpAddType = 2.
    IpGroups List<AclRuleIpGroup>
    The list of domain name groups.
    IpLists List<string>
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    IpLocationCountries List<string>
    Country or region code.
    IpLocationSubregions List<string>
    Domestic region code.
    Name string
    Rule name.
    ProjectName string
    The name of the project to which your domain names belong.
    RuleTag string
    Rule unique identifier.
    UpdateTime string
    Update time of the rule.
    Url string
    The path of Matching.
    AccurateGroup AclRuleAccurateGroupArgs
    Advanced conditions.
    AclType string
    The type of access control rules.
    Action string
    Action to be taken on requests that match the rule.
    Advanced int
    Whether to set advanced conditions.
    ClientIp string
    IP address.
    Description string
    Rule description.
    Enable int
    Whether to enable the rule.
    HostAddType int
    Type of domain name addition.
    HostGroupIds []int
    The ID of the domain group.
    HostGroups []AclRuleHostGroupArgs
    The list of domain name groups.
    HostLists []string
    Required if HostAddType = 3. Single or multiple domain names are supported.
    IpAddType int
    Type of IP address addition.
    IpGroupIds []int
    Required if IpAddType = 2.
    IpGroups []AclRuleIpGroupArgs
    The list of domain name groups.
    IpLists []string
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    IpLocationCountries []string
    Country or region code.
    IpLocationSubregions []string
    Domestic region code.
    Name string
    Rule name.
    ProjectName string
    The name of the project to which your domain names belong.
    RuleTag string
    Rule unique identifier.
    UpdateTime string
    Update time of the rule.
    Url string
    The path of Matching.
    accurateGroup AclRuleAccurateGroup
    Advanced conditions.
    aclType String
    The type of access control rules.
    action String
    Action to be taken on requests that match the rule.
    advanced Integer
    Whether to set advanced conditions.
    clientIp String
    IP address.
    description String
    Rule description.
    enable Integer
    Whether to enable the rule.
    hostAddType Integer
    Type of domain name addition.
    hostGroupIds List<Integer>
    The ID of the domain group.
    hostGroups List<AclRuleHostGroup>
    The list of domain name groups.
    hostLists List<String>
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ipAddType Integer
    Type of IP address addition.
    ipGroupIds List<Integer>
    Required if IpAddType = 2.
    ipGroups List<AclRuleIpGroup>
    The list of domain name groups.
    ipLists List<String>
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ipLocationCountries List<String>
    Country or region code.
    ipLocationSubregions List<String>
    Domestic region code.
    name String
    Rule name.
    projectName String
    The name of the project to which your domain names belong.
    ruleTag String
    Rule unique identifier.
    updateTime String
    Update time of the rule.
    url String
    The path of Matching.
    accurateGroup AclRuleAccurateGroup
    Advanced conditions.
    aclType string
    The type of access control rules.
    action string
    Action to be taken on requests that match the rule.
    advanced number
    Whether to set advanced conditions.
    clientIp string
    IP address.
    description string
    Rule description.
    enable number
    Whether to enable the rule.
    hostAddType number
    Type of domain name addition.
    hostGroupIds number[]
    The ID of the domain group.
    hostGroups AclRuleHostGroup[]
    The list of domain name groups.
    hostLists string[]
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ipAddType number
    Type of IP address addition.
    ipGroupIds number[]
    Required if IpAddType = 2.
    ipGroups AclRuleIpGroup[]
    The list of domain name groups.
    ipLists string[]
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ipLocationCountries string[]
    Country or region code.
    ipLocationSubregions string[]
    Domestic region code.
    name string
    Rule name.
    projectName string
    The name of the project to which your domain names belong.
    ruleTag string
    Rule unique identifier.
    updateTime string
    Update time of the rule.
    url string
    The path of Matching.
    accurate_group AclRuleAccurateGroupArgs
    Advanced conditions.
    acl_type str
    The type of access control rules.
    action str
    Action to be taken on requests that match the rule.
    advanced int
    Whether to set advanced conditions.
    client_ip str
    IP address.
    description str
    Rule description.
    enable int
    Whether to enable the rule.
    host_add_type int
    Type of domain name addition.
    host_group_ids Sequence[int]
    The ID of the domain group.
    host_groups Sequence[AclRuleHostGroupArgs]
    The list of domain name groups.
    host_lists Sequence[str]
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ip_add_type int
    Type of IP address addition.
    ip_group_ids Sequence[int]
    Required if IpAddType = 2.
    ip_groups Sequence[AclRuleIpGroupArgs]
    The list of domain name groups.
    ip_lists Sequence[str]
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ip_location_countries Sequence[str]
    Country or region code.
    ip_location_subregions Sequence[str]
    Domestic region code.
    name str
    Rule name.
    project_name str
    The name of the project to which your domain names belong.
    rule_tag str
    Rule unique identifier.
    update_time str
    Update time of the rule.
    url str
    The path of Matching.
    accurateGroup Property Map
    Advanced conditions.
    aclType String
    The type of access control rules.
    action String
    Action to be taken on requests that match the rule.
    advanced Number
    Whether to set advanced conditions.
    clientIp String
    IP address.
    description String
    Rule description.
    enable Number
    Whether to enable the rule.
    hostAddType Number
    Type of domain name addition.
    hostGroupIds List<Number>
    The ID of the domain group.
    hostGroups List<Property Map>
    The list of domain name groups.
    hostLists List<String>
    Required if HostAddType = 3. Single or multiple domain names are supported.
    ipAddType Number
    Type of IP address addition.
    ipGroupIds List<Number>
    Required if IpAddType = 2.
    ipGroups List<Property Map>
    The list of domain name groups.
    ipLists List<String>
    Required if IpAddType = 3. Single or multiple IP addresses are supported.
    ipLocationCountries List<String>
    Country or region code.
    ipLocationSubregions List<String>
    Domestic region code.
    name String
    Rule name.
    projectName String
    The name of the project to which your domain names belong.
    ruleTag String
    Rule unique identifier.
    updateTime String
    Update time of the rule.
    url String
    The path of Matching.

    Supporting Types

    AclRuleAccurateGroup, AclRuleAccurateGroupArgs

    AccurateRules List<AclRuleAccurateGroupAccurateRule>
    Details of advanced conditions.
    Logic int
    The logical relationship of advanced conditions.
    AccurateRules []AclRuleAccurateGroupAccurateRule
    Details of advanced conditions.
    Logic int
    The logical relationship of advanced conditions.
    accurateRules List<AclRuleAccurateGroupAccurateRule>
    Details of advanced conditions.
    logic Integer
    The logical relationship of advanced conditions.
    accurateRules AclRuleAccurateGroupAccurateRule[]
    Details of advanced conditions.
    logic number
    The logical relationship of advanced conditions.
    accurate_rules Sequence[AclRuleAccurateGroupAccurateRule]
    Details of advanced conditions.
    logic int
    The logical relationship of advanced conditions.
    accurateRules List<Property Map>
    Details of advanced conditions.
    logic Number
    The logical relationship of advanced conditions.

    AclRuleAccurateGroupAccurateRule, AclRuleAccurateGroupAccurateRuleArgs

    HttpObj string
    The HTTP object to be added to the advanced conditions.
    ObjType int
    The matching field for HTTP objects.
    Opretar int
    The logical operator for the condition.
    Property int
    Operate the properties of the http object.
    ValueString string
    The value to be matched.
    HttpObj string
    The HTTP object to be added to the advanced conditions.
    ObjType int
    The matching field for HTTP objects.
    Opretar int
    The logical operator for the condition.
    Property int
    Operate the properties of the http object.
    ValueString string
    The value to be matched.
    httpObj String
    The HTTP object to be added to the advanced conditions.
    objType Integer
    The matching field for HTTP objects.
    opretar Integer
    The logical operator for the condition.
    property Integer
    Operate the properties of the http object.
    valueString String
    The value to be matched.
    httpObj string
    The HTTP object to be added to the advanced conditions.
    objType number
    The matching field for HTTP objects.
    opretar number
    The logical operator for the condition.
    property number
    Operate the properties of the http object.
    valueString string
    The value to be matched.
    http_obj str
    The HTTP object to be added to the advanced conditions.
    obj_type int
    The matching field for HTTP objects.
    opretar int
    The logical operator for the condition.
    property int
    Operate the properties of the http object.
    value_string str
    The value to be matched.
    httpObj String
    The HTTP object to be added to the advanced conditions.
    objType Number
    The matching field for HTTP objects.
    opretar Number
    The logical operator for the condition.
    property Number
    Operate the properties of the http object.
    valueString String
    The value to be matched.

    AclRuleHostGroup, AclRuleHostGroupArgs

    HostGroupId int
    The ID of the domain group.
    Name string
    Rule name.
    HostGroupId int
    The ID of the domain group.
    Name string
    Rule name.
    hostGroupId Integer
    The ID of the domain group.
    name String
    Rule name.
    hostGroupId number
    The ID of the domain group.
    name string
    Rule name.
    host_group_id int
    The ID of the domain group.
    name str
    Rule name.
    hostGroupId Number
    The ID of the domain group.
    name String
    Rule name.

    AclRuleIpGroup, AclRuleIpGroupArgs

    IpGroupId int
    Required if IpAddType = 2.
    Name string
    Rule name.
    IpGroupId int
    Required if IpAddType = 2.
    Name string
    Rule name.
    ipGroupId Integer
    Required if IpAddType = 2.
    name String
    Rule name.
    ipGroupId number
    Required if IpAddType = 2.
    name string
    Rule name.
    ip_group_id int
    Required if IpAddType = 2.
    name str
    Rule name.
    ipGroupId Number
    Required if IpAddType = 2.
    name String
    Rule name.

    Import

    WafAclRule can be imported using the id, e.g.

    $ pulumi import volcengine:waf/aclRule:AclRule default resource_id:AclType
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine