com.pulumi.aws.wafregional.kotlin.GeoMatchSetArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.wafregional.kotlin
import com.pulumi.aws.wafregional.GeoMatchSetArgs.builder
import com.pulumi.aws.wafregional.kotlin.inputs.GeoMatchSetGeoMatchConstraintArgs
import com.pulumi.aws.wafregional.kotlin.inputs.GeoMatchSetGeoMatchConstraintArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a WAF Regional Geo Match Set Resource
* ## Example Usage
*
* ```typescript
* 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",
* },
* ],
* });
* ```
* ```python
* 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",
* },
* ])
* ```
* ```csharp
* 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",
* },
* },
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* resources:
* geoMatchSet:
* type: aws:wafregional:GeoMatchSet
* name: geo_match_set
* properties:
* name: geo_match_set
* geoMatchConstraints:
* - type: Country
* value: US
* - type: Country
* value: CA
* ```
*
* ## Import
* Using `pulumi import`, import WAF Regional Geo Match Set using the id. For example:
* ```sh
* $ pulumi import aws:wafregional/geoMatchSet:GeoMatchSet geo_match_set a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
* ```
* @property geoMatchConstraints The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.
* @property name The name or description of the Geo Match Set.
*/
public data class GeoMatchSetArgs(
public val geoMatchConstraints: Output>? = null,
public val name: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.wafregional.GeoMatchSetArgs =
com.pulumi.aws.wafregional.GeoMatchSetArgs.builder()
.geoMatchConstraints(
geoMatchConstraints?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.name(name?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [GeoMatchSetArgs].
*/
@PulumiTagMarker
public class GeoMatchSetArgsBuilder internal constructor() {
private var geoMatchConstraints: Output>? = null
private var name: Output? = null
/**
* @param value The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.
*/
@JvmName("aeqrieuntbhqqfyi")
public suspend fun geoMatchConstraints(`value`: Output>) {
this.geoMatchConstraints = value
}
@JvmName("sdqonwyjfmgpjgmu")
public suspend fun geoMatchConstraints(vararg values: Output) {
this.geoMatchConstraints = Output.all(values.asList())
}
/**
* @param values The Geo Match Constraint objects which contain the country that you want AWS WAF to search for.
*/
@JvmName("iiyqnjxouoqtcnld")
public suspend fun geoMatchConstraints(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy