Try AWS Native preview for resources not in the classic version.
aws.wafregional.GeoMatchSet
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a WAF Regional Geo Match Set Resource
Example Usage
using System.Collections.Generic;
using System.Linq;
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/v6/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:
- Geo
Match List<GeoConstraints Match Set Geo Match Constraint> 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 []GeoConstraints Match Set Geo Match Constraint Args 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 List<GeoConstraints Match Set Geo Match Constraint> 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 GeoConstraints Match Set Geo Match Constraint[] 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_ Sequence[Geoconstraints Match Set Geo Match Constraint Args] 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.
- geo
Match List<Property Map>Constraints 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.
- Geo
Match List<GeoConstraints Match Set Geo Match Constraint> 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 []GeoConstraints Match Set Geo Match Constraint Args 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 List<GeoConstraints Match Set Geo Match Constraint> 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 GeoConstraints Match Set Geo Match Constraint[] 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_ Sequence[Geoconstraints Match Set Geo Match Constraint Args] 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.
- geo
Match List<Property Map>Constraints 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, GeoMatchSetGeoMatchConstraintArgs
Import
Using pulumi import
, import WAF Regional Geo Match Set using the id. For example:
$ 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.
Try AWS Native preview for resources not in the classic version.