aws.wafregional.GeoMatchSet
Explore with Pulumi AI
Provides a WAF Regional Geo Match Set Resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const geoMatchSet = new aws.wafregional.GeoMatchSet("geo_match_set", {
name: "geo_match_set",
geoMatchConstraints: [
{
type: "Country",
value: "US",
},
{
type: "Country",
value: "CA",
},
],
});
import pulumi
import pulumi_aws as aws
geo_match_set = aws.wafregional.GeoMatchSet("geo_match_set",
name="geo_match_set",
geo_match_constraints=[
{
"type": "Country",
"value": "US",
},
{
"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, "geo_match_set", &wafregional.GeoMatchSetArgs{
Name: pulumi.String("geo_match_set"),
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var geoMatchSet = new Aws.WafRegional.GeoMatchSet("geo_match_set", new()
{
Name = "geo_match_set",
GeoMatchConstraints = new[]
{
new Aws.WafRegional.Inputs.GeoMatchSetGeoMatchConstraintArgs
{
Type = "Country",
Value = "US",
},
new Aws.WafRegional.Inputs.GeoMatchSetGeoMatchConstraintArgs
{
Type = "Country",
Value = "CA",
},
},
});
});
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()
.name("geo_match_set")
.geoMatchConstraints(
GeoMatchSetGeoMatchConstraintArgs.builder()
.type("Country")
.value("US")
.build(),
GeoMatchSetGeoMatchConstraintArgs.builder()
.type("Country")
.value("CA")
.build())
.build());
}
}
resources:
geoMatchSet:
type: aws:wafregional:GeoMatchSet
name: geo_match_set
properties:
name: geo_match_set
geoMatchConstraints:
- type: Country
value: US
- type: Country
value: CA
Create GeoMatchSet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GeoMatchSet(name: string, args?: GeoMatchSetArgs, opts?: CustomResourceOptions);
@overload
def GeoMatchSet(resource_name: str,
args: Optional[GeoMatchSetArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def GeoMatchSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
geo_match_constraints: Optional[Sequence[GeoMatchSetGeoMatchConstraintArgs]] = None,
name: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsGeoMatchSetResource = new Aws.WafRegional.GeoMatchSet("awsGeoMatchSetResource", new()
{
GeoMatchConstraints = new[]
{
new Aws.WafRegional.Inputs.GeoMatchSetGeoMatchConstraintArgs
{
Type = "string",
Value = "string",
},
},
Name = "string",
});
example, err := wafregional.NewGeoMatchSet(ctx, "awsGeoMatchSetResource", &wafregional.GeoMatchSetArgs{
GeoMatchConstraints: wafregional.GeoMatchSetGeoMatchConstraintArray{
&wafregional.GeoMatchSetGeoMatchConstraintArgs{
Type: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
})
var awsGeoMatchSetResource = new GeoMatchSet("awsGeoMatchSetResource", GeoMatchSetArgs.builder()
.geoMatchConstraints(GeoMatchSetGeoMatchConstraintArgs.builder()
.type("string")
.value("string")
.build())
.name("string")
.build());
aws_geo_match_set_resource = aws.wafregional.GeoMatchSet("awsGeoMatchSetResource",
geo_match_constraints=[{
"type": "string",
"value": "string",
}],
name="string")
const awsGeoMatchSetResource = new aws.wafregional.GeoMatchSet("awsGeoMatchSetResource", {
geoMatchConstraints: [{
type: "string",
value: "string",
}],
name: "string",
});
type: aws:wafregional:GeoMatchSet
properties:
geoMatchConstraints:
- type: string
value: string
name: string
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.