aws logo
AWS Classic v5.34.0, Mar 30 23

aws.wafregional.GeoMatchSet

Provides a WAF Regional Geo Match Set Resource

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var geoMatchSet = new Aws.WafRegional.GeoMatchSet("geoMatchSet", new()
    {
        GeoMatchConstraints = new[]
        {
            new Aws.WafRegional.Inputs.GeoMatchSetGeoMatchConstraintArgs
            {
                Type = "Country",
                Value = "US",
            },
            new Aws.WafRegional.Inputs.GeoMatchSetGeoMatchConstraintArgs
            {
                Type = "Country",
                Value = "CA",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/wafregional"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := wafregional.NewGeoMatchSet(ctx, "geoMatchSet", &wafregional.GeoMatchSetArgs{
			GeoMatchConstraints: wafregional.GeoMatchSetGeoMatchConstraintArray{
				&wafregional.GeoMatchSetGeoMatchConstraintArgs{
					Type:  pulumi.String("Country"),
					Value: pulumi.String("US"),
				},
				&wafregional.GeoMatchSetGeoMatchConstraintArgs{
					Type:  pulumi.String("Country"),
					Value: pulumi.String("CA"),
				},
			},
		})
		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.GeoMatchSet;
import com.pulumi.aws.wafregional.GeoMatchSetArgs;
import com.pulumi.aws.wafregional.inputs.GeoMatchSetGeoMatchConstraintArgs;
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 geoMatchSet = new GeoMatchSet("geoMatchSet", GeoMatchSetArgs.builder()        
            .geoMatchConstraints(            
                GeoMatchSetGeoMatchConstraintArgs.builder()
                    .type("Country")
                    .value("US")
                    .build(),
                GeoMatchSetGeoMatchConstraintArgs.builder()
                    .type("Country")
                    .value("CA")
                    .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

geo_match_set = aws.wafregional.GeoMatchSet("geoMatchSet", geo_match_constraints=[
    aws.wafregional.GeoMatchSetGeoMatchConstraintArgs(
        type="Country",
        value="US",
    ),
    aws.wafregional.GeoMatchSetGeoMatchConstraintArgs(
        type="Country",
        value="CA",
    ),
])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const geoMatchSet = new aws.wafregional.GeoMatchSet("geoMatchSet", {geoMatchConstraints: [
    {
        type: "Country",
        value: "US",
    },
    {
        type: "Country",
        value: "CA",
    },
]});
resources:
  geoMatchSet:
    type: aws:wafregional:GeoMatchSet
    properties:
      geoMatchConstraints:
        - type: Country
          value: US
        - type: Country
          value: CA

Create GeoMatchSet Resource

new GeoMatchSet(name: string, args?: GeoMatchSetArgs, opts?: CustomResourceOptions);
@overload
def GeoMatchSet(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                geo_match_constraints: Optional[Sequence[GeoMatchSetGeoMatchConstraintArgs]] = None,
                name: Optional[str] = None)
@overload
def GeoMatchSet(resource_name: str,
                args: Optional[GeoMatchSetArgs] = None,
                opts: Optional[ResourceOptions] = None)
func NewGeoMatchSet(ctx *Context, name string, args *GeoMatchSetArgs, opts ...ResourceOption) (*GeoMatchSet, error)
public GeoMatchSet(string name, GeoMatchSetArgs? args = null, CustomResourceOptions? opts = null)
public GeoMatchSet(String name, GeoMatchSetArgs args)
public GeoMatchSet(String name, GeoMatchSetArgs args, CustomResourceOptions options)
type: aws:wafregional:GeoMatchSet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args GeoMatchSetArgs
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 GeoMatchSetArgs
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 GeoMatchSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GeoMatchSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args GeoMatchSetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

GeoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the Geo Match Set.

GeoMatchConstraints []GeoMatchSetGeoMatchConstraintArgs

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the Geo Match Set.

geoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the Geo Match Set.

geoMatchConstraints GeoMatchSetGeoMatchConstraintArgs[]

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name string

The name or description of the Geo Match Set.

geo_match_constraints Sequence[GeoMatchSetGeoMatchConstraintArgs]

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name str

The name or description of the Geo Match Set.

geoMatchConstraints List<Property Map>

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the Geo Match Set.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing GeoMatchSet Resource

Get an existing GeoMatchSet 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?: GeoMatchSetState, opts?: CustomResourceOptions): GeoMatchSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        geo_match_constraints: Optional[Sequence[GeoMatchSetGeoMatchConstraintArgs]] = None,
        name: Optional[str] = None) -> GeoMatchSet
func GetGeoMatchSet(ctx *Context, name string, id IDInput, state *GeoMatchSetState, opts ...ResourceOption) (*GeoMatchSet, error)
public static GeoMatchSet Get(string name, Input<string> id, GeoMatchSetState? state, CustomResourceOptions? opts = null)
public static GeoMatchSet get(String name, Output<String> id, GeoMatchSetState 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:
GeoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the Geo Match Set.

GeoMatchConstraints []GeoMatchSetGeoMatchConstraintArgs

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the Geo Match Set.

geoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the Geo Match Set.

geoMatchConstraints GeoMatchSetGeoMatchConstraintArgs[]

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name string

The name or description of the Geo Match Set.

geo_match_constraints Sequence[GeoMatchSetGeoMatchConstraintArgs]

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name str

The name or description of the Geo Match Set.

geoMatchConstraints List<Property Map>

The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the Geo Match Set.

Supporting Types

GeoMatchSetGeoMatchConstraint

Type string

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

Value string

The country that you want AWS WAF to search for. This is the two-letter country code, e.g., US, CA, RU, CN, etc. See docs for all supported values.

Type string

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

Value string

The country that you want AWS WAF to search for. This is the two-letter country code, e.g., US, CA, RU, CN, etc. See docs for all supported values.

type String

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

value String

The country that you want AWS WAF to search for. This is the two-letter country code, e.g., US, CA, RU, CN, etc. See docs for all supported values.

type string

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

value string

The country that you want AWS WAF to search for. This is the two-letter country code, e.g., US, CA, RU, CN, etc. See docs for all supported values.

type str

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

value str

The country that you want AWS WAF to search for. This is the two-letter country code, e.g., US, CA, RU, CN, etc. See docs for all supported values.

type String

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

value String

The country that you want AWS WAF to search for. This is the two-letter country code, e.g., US, CA, RU, CN, etc. See docs for all supported values.

Import

WAF Regional Geo Match Set can be imported using the id, e.g.,

 $ pulumi import aws:wafregional/geoMatchSet:GeoMatchSet geo_match_set 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.