1. Packages
  2. AWS Classic
  3. API Docs
  4. wafregional
  5. IpSet

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

aws.wafregional.IpSet

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

    Provides a WAF Regional IPSet Resource for use with Application Load Balancer.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ipset = new Aws.WafRegional.IpSet("ipset", new()
        {
            IpSetDescriptors = new[]
            {
                new Aws.WafRegional.Inputs.IpSetIpSetDescriptorArgs
                {
                    Type = "IPV4",
                    Value = "192.0.7.0/24",
                },
                new Aws.WafRegional.Inputs.IpSetIpSetDescriptorArgs
                {
                    Type = "IPV4",
                    Value = "10.16.16.0/16",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := wafregional.NewIpSet(ctx, "ipset", &wafregional.IpSetArgs{
    			IpSetDescriptors: wafregional.IpSetIpSetDescriptorArray{
    				&wafregional.IpSetIpSetDescriptorArgs{
    					Type:  pulumi.String("IPV4"),
    					Value: pulumi.String("192.0.7.0/24"),
    				},
    				&wafregional.IpSetIpSetDescriptorArgs{
    					Type:  pulumi.String("IPV4"),
    					Value: pulumi.String("10.16.16.0/16"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.wafregional.IpSet;
    import com.pulumi.aws.wafregional.IpSetArgs;
    import com.pulumi.aws.wafregional.inputs.IpSetIpSetDescriptorArgs;
    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 ipset = new IpSet("ipset", IpSetArgs.builder()        
                .ipSetDescriptors(            
                    IpSetIpSetDescriptorArgs.builder()
                        .type("IPV4")
                        .value("192.0.7.0/24")
                        .build(),
                    IpSetIpSetDescriptorArgs.builder()
                        .type("IPV4")
                        .value("10.16.16.0/16")
                        .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    ipset = aws.wafregional.IpSet("ipset", ip_set_descriptors=[
        aws.wafregional.IpSetIpSetDescriptorArgs(
            type="IPV4",
            value="192.0.7.0/24",
        ),
        aws.wafregional.IpSetIpSetDescriptorArgs(
            type="IPV4",
            value="10.16.16.0/16",
        ),
    ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const ipset = new aws.wafregional.IpSet("ipset", {ipSetDescriptors: [
        {
            type: "IPV4",
            value: "192.0.7.0/24",
        },
        {
            type: "IPV4",
            value: "10.16.16.0/16",
        },
    ]});
    
    resources:
      ipset:
        type: aws:wafregional:IpSet
        properties:
          ipSetDescriptors:
            - type: IPV4
              value: 192.0.7.0/24
            - type: IPV4
              value: 10.16.16.0/16
    

    Create IpSet Resource

    new IpSet(name: string, args?: IpSetArgs, opts?: CustomResourceOptions);
    @overload
    def IpSet(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              ip_set_descriptors: Optional[Sequence[IpSetIpSetDescriptorArgs]] = None,
              name: Optional[str] = None)
    @overload
    def IpSet(resource_name: str,
              args: Optional[IpSetArgs] = None,
              opts: Optional[ResourceOptions] = None)
    func NewIpSet(ctx *Context, name string, args *IpSetArgs, opts ...ResourceOption) (*IpSet, error)
    public IpSet(string name, IpSetArgs? args = null, CustomResourceOptions? opts = null)
    public IpSet(String name, IpSetArgs args)
    public IpSet(String name, IpSetArgs args, CustomResourceOptions options)
    
    type: aws:wafregional:IpSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args IpSetArgs
    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 IpSetArgs
    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 IpSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    IpSet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IpSet resource accepts the following input properties:

    IpSetDescriptors List<IpSetIpSetDescriptor>
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    Name string
    The name or description of the IPSet.
    IpSetDescriptors []IpSetIpSetDescriptorArgs
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    Name string
    The name or description of the IPSet.
    ipSetDescriptors List<IpSetIpSetDescriptor>
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name String
    The name or description of the IPSet.
    ipSetDescriptors IpSetIpSetDescriptor[]
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name string
    The name or description of the IPSet.
    ip_set_descriptors Sequence[IpSetIpSetDescriptorArgs]
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name str
    The name or description of the IPSet.
    ipSetDescriptors List<Property Map>
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name String
    The name or description of the IPSet.

    Outputs

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

    Arn string
    The ARN of the WAF IPSet.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The ARN of the WAF IPSet.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the WAF IPSet.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN of the WAF IPSet.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The ARN of the WAF IPSet.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN of the WAF IPSet.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IpSet Resource

    Get an existing IpSet 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?: IpSetState, opts?: CustomResourceOptions): IpSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            ip_set_descriptors: Optional[Sequence[IpSetIpSetDescriptorArgs]] = None,
            name: Optional[str] = None) -> IpSet
    func GetIpSet(ctx *Context, name string, id IDInput, state *IpSetState, opts ...ResourceOption) (*IpSet, error)
    public static IpSet Get(string name, Input<string> id, IpSetState? state, CustomResourceOptions? opts = null)
    public static IpSet get(String name, Output<String> id, IpSetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Arn string
    The ARN of the WAF IPSet.
    IpSetDescriptors List<IpSetIpSetDescriptor>
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    Name string
    The name or description of the IPSet.
    Arn string
    The ARN of the WAF IPSet.
    IpSetDescriptors []IpSetIpSetDescriptorArgs
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    Name string
    The name or description of the IPSet.
    arn String
    The ARN of the WAF IPSet.
    ipSetDescriptors List<IpSetIpSetDescriptor>
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name String
    The name or description of the IPSet.
    arn string
    The ARN of the WAF IPSet.
    ipSetDescriptors IpSetIpSetDescriptor[]
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name string
    The name or description of the IPSet.
    arn str
    The ARN of the WAF IPSet.
    ip_set_descriptors Sequence[IpSetIpSetDescriptorArgs]
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name str
    The name or description of the IPSet.
    arn String
    The ARN of the WAF IPSet.
    ipSetDescriptors List<Property Map>
    One or more pairs specifying the IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) from which web requests originate.
    name String
    The name or description of the IPSet.

    Supporting Types

    IpSetIpSetDescriptor, IpSetIpSetDescriptorArgs

    Type string
    The string like IPV4 or IPV6.
    Value string
    The CIDR notation.
    Type string
    The string like IPV4 or IPV6.
    Value string
    The CIDR notation.
    type String
    The string like IPV4 or IPV6.
    value String
    The CIDR notation.
    type string
    The string like IPV4 or IPV6.
    value string
    The CIDR notation.
    type str
    The string like IPV4 or IPV6.
    value str
    The CIDR notation.
    type String
    The string like IPV4 or IPV6.
    value String
    The CIDR notation.

    Import

    Using pulumi import, import WAF Regional IPSets using their ID. For example:

     $ pulumi import aws:wafregional/ipSet:IpSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi