volcengine.waf.IpGroup
Explore with Pulumi AI
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:
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.
- Ip
Count int - The number of IP addresses within the address group.
- Ip
Group intId - The ID of the ip group.
- List<Ip
Group Related Rule> - The list of associated rules.
- Update
Time string - ip group update time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Count int - The number of IP addresses within the address group.
- Ip
Group intId - The ID of the ip group.
- []Ip
Group Related Rule - The list of associated rules.
- Update
Time string - ip group update time.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Count Integer - The number of IP addresses within the address group.
- ip
Group IntegerId - The ID of the ip group.
- List<Ip
Group Related Rule> - The list of associated rules.
- update
Time String - ip group update time.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Count number - The number of IP addresses within the address group.
- ip
Group numberId - The ID of the ip group.
- Ip
Group Related Rule[] - The list of associated rules.
- update
Time 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_ intid - The ID of the ip group.
- Sequence[Ip
Group Related Rule] - The list of associated rules.
- update_
time str - ip group update time.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Count Number - The number of IP addresses within the address group.
- ip
Group NumberId - The ID of the ip group.
- List<Property Map>
- The list of associated rules.
- update
Time 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.
- Add
Type string - The way of addition.
- Ip
Count int - The number of IP addresses within the address group.
- Ip
Group intId - The ID of the ip group.
- Ip
Lists List<string> - The IP address to be added.
- Name string
- The name of ip group.
- List<Ip
Group Related Rule> - The list of associated rules.
- Update
Time string - ip group update time.
- Add
Type string - The way of addition.
- Ip
Count int - The number of IP addresses within the address group.
- Ip
Group intId - The ID of the ip group.
- Ip
Lists []string - The IP address to be added.
- Name string
- The name of ip group.
- []Ip
Group Related Rule Args - The list of associated rules.
- Update
Time string - ip group update time.
- add
Type String - The way of addition.
- ip
Count Integer - The number of IP addresses within the address group.
- ip
Group IntegerId - The ID of the ip group.
- ip
Lists List<String> - The IP address to be added.
- name String
- The name of ip group.
- List<Ip
Group Related Rule> - The list of associated rules.
- update
Time String - ip group update time.
- add
Type string - The way of addition.
- ip
Count number - The number of IP addresses within the address group.
- ip
Group numberId - The ID of the ip group.
- ip
Lists string[] - The IP address to be added.
- name string
- The name of ip group.
- Ip
Group Related Rule[] - The list of associated rules.
- update
Time 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_ intid - The ID of the ip group.
- ip_
lists Sequence[str] - The IP address to be added.
- name str
- The name of ip group.
- Sequence[Ip
Group Related Rule Args] - The list of associated rules.
- update_
time str - ip group update time.
- add
Type String - The way of addition.
- ip
Count Number - The number of IP addresses within the address group.
- ip
Group NumberId - The ID of the ip group.
- ip
Lists List<String> - The IP address to be added.
- name String
- The name of ip group.
- List<Property Map>
- The list of associated rules.
- update
Time String - ip group update time.
Supporting Types
IpGroupRelatedRule, IpGroupRelatedRuleArgs
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.