AWS Classic

v5.16.2 published on Tuesday, Oct 4, 2022 by Pulumi

GeoMatchSet

Provides a WAF Geo Match Set Resource

Example Usage

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

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

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := waf.NewGeoMatchSet(ctx, "geoMatchSet", &waf.GeoMatchSetArgs{
			GeoMatchConstraints: waf.GeoMatchSetGeoMatchConstraintArray{
				&waf.GeoMatchSetGeoMatchConstraintArgs{
					Type:  pulumi.String("Country"),
					Value: pulumi.String("US"),
				},
				&waf.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.waf.GeoMatchSet;
import com.pulumi.aws.waf.GeoMatchSetArgs;
import com.pulumi.aws.waf.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.waf.GeoMatchSet("geoMatchSet", geo_match_constraints=[
    aws.waf.GeoMatchSetGeoMatchConstraintArgs(
        type="Country",
        value="US",
    ),
    aws.waf.GeoMatchSetGeoMatchConstraintArgs(
        type="Country",
        value="CA",
    ),
])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

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

Create a 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:waf: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 GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the GeoMatchSet.

GeoMatchConstraints []GeoMatchSetGeoMatchConstraintArgs

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the GeoMatchSet.

geoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the GeoMatchSet.

geoMatchConstraints GeoMatchSetGeoMatchConstraintArgs[]

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name string

The name or description of the GeoMatchSet.

geo_match_constraints Sequence[GeoMatchSetGeoMatchConstraintArgs]

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name str

The name or description of the GeoMatchSet.

geoMatchConstraints List<Property Map>

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the GeoMatchSet.

Outputs

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

Arn string

Amazon Resource Name (ARN)

Id string

The provider-assigned unique ID for this managed resource.

Arn string

Amazon Resource Name (ARN)

Id string

The provider-assigned unique ID for this managed resource.

arn String

Amazon Resource Name (ARN)

id String

The provider-assigned unique ID for this managed resource.

arn string

Amazon Resource Name (ARN)

id string

The provider-assigned unique ID for this managed resource.

arn str

Amazon Resource Name (ARN)

id str

The provider-assigned unique ID for this managed resource.

arn String

Amazon Resource Name (ARN)

id String

The provider-assigned unique ID for this managed resource.

Look up an 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,
        arn: Optional[str] = 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:
Arn string

Amazon Resource Name (ARN)

GeoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the GeoMatchSet.

Arn string

Amazon Resource Name (ARN)

GeoMatchConstraints []GeoMatchSetGeoMatchConstraintArgs

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

Name string

The name or description of the GeoMatchSet.

arn String

Amazon Resource Name (ARN)

geoMatchConstraints List<GeoMatchSetGeoMatchConstraintArgs>

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the GeoMatchSet.

arn string

Amazon Resource Name (ARN)

geoMatchConstraints GeoMatchSetGeoMatchConstraintArgs[]

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name string

The name or description of the GeoMatchSet.

arn str

Amazon Resource Name (ARN)

geo_match_constraints Sequence[GeoMatchSetGeoMatchConstraintArgs]

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name str

The name or description of the GeoMatchSet.

arn String

Amazon Resource Name (ARN)

geoMatchConstraints List<Property Map>

The GeoMatchConstraint objects which contain the country that you want AWS WAF to search for.

name String

The name or description of the GeoMatchSet.

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 Geo Match Set can be imported using their ID, e.g.,

 $ pulumi import aws:waf/geoMatchSet:GeoMatchSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.