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

volcengine.waf.IpGroup

Explore with Pulumi AI

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

    Provides a resource to manage waf ip group

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.waf.IpGroup("foo", {
        addType: "List",
        ipLists: [
            "1.1.1.1",
            "1.1.1.2",
            "1.1.1.3",
        ],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.waf.IpGroup("foo",
        add_type="List",
        ip_lists=[
            "1.1.1.1",
            "1.1.1.2",
            "1.1.1.3",
        ])
    
    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.NewIpGroup(ctx, "foo", &waf.IpGroupArgs{
    			AddType: pulumi.String("List"),
    			IpLists: pulumi.StringArray{
    				pulumi.String("1.1.1.1"),
    				pulumi.String("1.1.1.2"),
    				pulumi.String("1.1.1.3"),
    			},
    		})
    		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.IpGroup("foo", new()
        {
            AddType = "List",
            IpLists = new[]
            {
                "1.1.1.1",
                "1.1.1.2",
                "1.1.1.3",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.waf.IpGroup;
    import com.pulumi.volcengine.waf.IpGroupArgs;
    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 IpGroup("foo", IpGroupArgs.builder()        
                .addType("List")
                .ipLists(            
                    "1.1.1.1",
                    "1.1.1.2",
                    "1.1.1.3")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:waf:IpGroup
        properties:
          addType: List
          ipLists:
            - 1.1.1.1
            - 1.1.1.2
            - 1.1.1.3
    

    Create IpGroup Resource

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

    Constructor syntax

    new IpGroup(name: string, args: IpGroupArgs, opts?: CustomResourceOptions);
    @overload
    def IpGroup(resource_name: str,
                args: IpGroupArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpGroup(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                add_type: Optional[str] = None,
                ip_lists: Optional[Sequence[str]] = None,
                name: Optional[str] = None)
    func NewIpGroup(ctx *Context, name string, args IpGroupArgs, opts ...ResourceOption) (*IpGroup, error)
    public IpGroup(string name, IpGroupArgs args, CustomResourceOptions? opts = null)
    public IpGroup(String name, IpGroupArgs args)
    public IpGroup(String name, IpGroupArgs args, CustomResourceOptions options)
    
    type: volcengine:waf:IpGroup
    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 IpGroupArgs
    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 IpGroupArgs
    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 IpGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpGroupArgs
    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 ipGroupResource = new Volcengine.Waf.IpGroup("ipGroupResource", new()
    {
        AddType = "string",
        IpLists = new[]
        {
            "string",
        },
        Name = "string",
    });
    
    example, err := waf.NewIpGroup(ctx, "ipGroupResource", &waf.IpGroupArgs{
    	AddType: pulumi.String("string"),
    	IpLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var ipGroupResource = new IpGroup("ipGroupResource", IpGroupArgs.builder()
        .addType("string")
        .ipLists("string")
        .name("string")
        .build());
    
    ip_group_resource = volcengine.waf.IpGroup("ipGroupResource",
        add_type="string",
        ip_lists=["string"],
        name="string")
    
    const ipGroupResource = new volcengine.waf.IpGroup("ipGroupResource", {
        addType: "string",
        ipLists: ["string"],
        name: "string",
    });
    
    type: volcengine:waf:IpGroup
    properties:
        addType: string
        ipLists:
            - string
        name: string
    

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

    AddType string
    The way of addition.
    IpLists List<string>
    The IP address to be added.
    Name string
    The name of ip group.
    AddType string
    The way of addition.
    IpLists []string
    The IP address to be added.
    Name string
    The name of ip group.
    addType String
    The way of addition.
    ipLists List<String>
    The IP address to be added.
    name String
    The name of ip group.
    addType string
    The way of addition.
    ipLists string[]
    The IP address to be added.
    name string
    The name of ip group.
    add_type str
    The way of addition.
    ip_lists Sequence[str]
    The IP address to be added.
    name str
    The name of ip group.
    addType String
    The way of addition.
    ipLists List<String>
    The IP address to be added.
    name String
    The name of ip group.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    IpCount int
    The number of IP addresses within the address group.
    IpGroupId int
    The ID of the ip group.
    RelatedRules List<IpGroupRelatedRule>
    The list of associated rules.
    UpdateTime string
    ip group update time.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpCount int
    The number of IP addresses within the address group.
    IpGroupId int
    The ID of the ip group.
    RelatedRules []IpGroupRelatedRule
    The list of associated rules.
    UpdateTime string
    ip group update time.
    id String
    The provider-assigned unique ID for this managed resource.
    ipCount Integer
    The number of IP addresses within the address group.
    ipGroupId Integer
    The ID of the ip group.
    relatedRules List<IpGroupRelatedRule>
    The list of associated rules.
    updateTime String
    ip group update time.
    id string
    The provider-assigned unique ID for this managed resource.
    ipCount number
    The number of IP addresses within the address group.
    ipGroupId number
    The ID of the ip group.
    relatedRules IpGroupRelatedRule[]
    The list of associated rules.
    updateTime string
    ip group update time.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_count int
    The number of IP addresses within the address group.
    ip_group_id int
    The ID of the ip group.
    related_rules Sequence[IpGroupRelatedRule]
    The list of associated rules.
    update_time str
    ip group update time.
    id String
    The provider-assigned unique ID for this managed resource.
    ipCount Number
    The number of IP addresses within the address group.
    ipGroupId Number
    The ID of the ip group.
    relatedRules List<Property Map>
    The list of associated rules.
    updateTime String
    ip group update time.

    Look up Existing IpGroup Resource

    Get an existing IpGroup 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?: IpGroupState, opts?: CustomResourceOptions): IpGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            add_type: Optional[str] = None,
            ip_count: Optional[int] = None,
            ip_group_id: Optional[int] = None,
            ip_lists: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            related_rules: Optional[Sequence[IpGroupRelatedRuleArgs]] = None,
            update_time: Optional[str] = None) -> IpGroup
    func GetIpGroup(ctx *Context, name string, id IDInput, state *IpGroupState, opts ...ResourceOption) (*IpGroup, error)
    public static IpGroup Get(string name, Input<string> id, IpGroupState? state, CustomResourceOptions? opts = null)
    public static IpGroup get(String name, Output<String> id, IpGroupState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:waf:IpGroup    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:
    AddType string
    The way of addition.
    IpCount int
    The number of IP addresses within the address group.
    IpGroupId int
    The ID of the ip group.
    IpLists List<string>
    The IP address to be added.
    Name string
    The name of ip group.
    RelatedRules List<IpGroupRelatedRule>
    The list of associated rules.
    UpdateTime string
    ip group update time.
    AddType string
    The way of addition.
    IpCount int
    The number of IP addresses within the address group.
    IpGroupId int
    The ID of the ip group.
    IpLists []string
    The IP address to be added.
    Name string
    The name of ip group.
    RelatedRules []IpGroupRelatedRuleArgs
    The list of associated rules.
    UpdateTime string
    ip group update time.
    addType String
    The way of addition.
    ipCount Integer
    The number of IP addresses within the address group.
    ipGroupId Integer
    The ID of the ip group.
    ipLists List<String>
    The IP address to be added.
    name String
    The name of ip group.
    relatedRules List<IpGroupRelatedRule>
    The list of associated rules.
    updateTime String
    ip group update time.
    addType string
    The way of addition.
    ipCount number
    The number of IP addresses within the address group.
    ipGroupId number
    The ID of the ip group.
    ipLists string[]
    The IP address to be added.
    name string
    The name of ip group.
    relatedRules IpGroupRelatedRule[]
    The list of associated rules.
    updateTime string
    ip group update time.
    add_type str
    The way of addition.
    ip_count int
    The number of IP addresses within the address group.
    ip_group_id int
    The ID of the ip group.
    ip_lists Sequence[str]
    The IP address to be added.
    name str
    The name of ip group.
    related_rules Sequence[IpGroupRelatedRuleArgs]
    The list of associated rules.
    update_time str
    ip group update time.
    addType String
    The way of addition.
    ipCount Number
    The number of IP addresses within the address group.
    ipGroupId Number
    The ID of the ip group.
    ipLists List<String>
    The IP address to be added.
    name String
    The name of ip group.
    relatedRules List<Property Map>
    The list of associated rules.
    updateTime String
    ip group update time.

    Supporting Types

    IpGroupRelatedRule, IpGroupRelatedRuleArgs

    Host string
    The information of the protected domain names associated with the rules.
    RuleName string
    The name of the rule.
    RuleTag string
    The ID of the rule.
    RuleType string
    The type of the rule.
    Host string
    The information of the protected domain names associated with the rules.
    RuleName string
    The name of the rule.
    RuleTag string
    The ID of the rule.
    RuleType string
    The type of the rule.
    host String
    The information of the protected domain names associated with the rules.
    ruleName String
    The name of the rule.
    ruleTag String
    The ID of the rule.
    ruleType String
    The type of the rule.
    host string
    The information of the protected domain names associated with the rules.
    ruleName string
    The name of the rule.
    ruleTag string
    The ID of the rule.
    ruleType string
    The type of the rule.
    host str
    The information of the protected domain names associated with the rules.
    rule_name str
    The name of the rule.
    rule_tag str
    The ID of the rule.
    rule_type str
    The type of the rule.
    host String
    The information of the protected domain names associated with the rules.
    ruleName String
    The name of the rule.
    ruleTag String
    The ID of the rule.
    ruleType String
    The type of the rule.

    Import

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

    $ pulumi import volcengine:waf/ipGroup:IpGroup default resource_id
    

    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