All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.route53.kotlin.ResolverEndpointArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.route53.kotlin

import com.pulumi.aws.route53.ResolverEndpointArgs.builder
import com.pulumi.aws.route53.kotlin.inputs.ResolverEndpointIpAddressArgs
import com.pulumi.aws.route53.kotlin.inputs.ResolverEndpointIpAddressArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a Route 53 Resolver endpoint resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const foo = new aws.route53.ResolverEndpoint("foo", {
 *     name: "foo",
 *     direction: "INBOUND",
 *     resolverEndpointType: "IPV4",
 *     securityGroupIds: [
 *         sg1.id,
 *         sg2.id,
 *     ],
 *     ipAddresses: [
 *         {
 *             subnetId: sn1.id,
 *         },
 *         {
 *             subnetId: sn2.id,
 *             ip: "10.0.64.4",
 *         },
 *     ],
 *     protocols: [
 *         "Do53",
 *         "DoH",
 *     ],
 *     tags: {
 *         Environment: "Prod",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * foo = aws.route53.ResolverEndpoint("foo",
 *     name="foo",
 *     direction="INBOUND",
 *     resolver_endpoint_type="IPV4",
 *     security_group_ids=[
 *         sg1["id"],
 *         sg2["id"],
 *     ],
 *     ip_addresses=[
 *         {
 *             "subnet_id": sn1["id"],
 *         },
 *         {
 *             "subnet_id": sn2["id"],
 *             "ip": "10.0.64.4",
 *         },
 *     ],
 *     protocols=[
 *         "Do53",
 *         "DoH",
 *     ],
 *     tags={
 *         "Environment": "Prod",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foo = new Aws.Route53.ResolverEndpoint("foo", new()
 *     {
 *         Name = "foo",
 *         Direction = "INBOUND",
 *         ResolverEndpointType = "IPV4",
 *         SecurityGroupIds = new[]
 *         {
 *             sg1.Id,
 *             sg2.Id,
 *         },
 *         IpAddresses = new[]
 *         {
 *             new Aws.Route53.Inputs.ResolverEndpointIpAddressArgs
 *             {
 *                 SubnetId = sn1.Id,
 *             },
 *             new Aws.Route53.Inputs.ResolverEndpointIpAddressArgs
 *             {
 *                 SubnetId = sn2.Id,
 *                 Ip = "10.0.64.4",
 *             },
 *         },
 *         Protocols = new[]
 *         {
 *             "Do53",
 *             "DoH",
 *         },
 *         Tags =
 *         {
 *             { "Environment", "Prod" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := route53.NewResolverEndpoint(ctx, "foo", &route53.ResolverEndpointArgs{
 * 			Name:                 pulumi.String("foo"),
 * 			Direction:            pulumi.String("INBOUND"),
 * 			ResolverEndpointType: pulumi.String("IPV4"),
 * 			SecurityGroupIds: pulumi.StringArray{
 * 				sg1.Id,
 * 				sg2.Id,
 * 			},
 * 			IpAddresses: route53.ResolverEndpointIpAddressArray{
 * 				&route53.ResolverEndpointIpAddressArgs{
 * 					SubnetId: pulumi.Any(sn1.Id),
 * 				},
 * 				&route53.ResolverEndpointIpAddressArgs{
 * 					SubnetId: pulumi.Any(sn2.Id),
 * 					Ip:       pulumi.String("10.0.64.4"),
 * 				},
 * 			},
 * 			Protocols: pulumi.StringArray{
 * 				pulumi.String("Do53"),
 * 				pulumi.String("DoH"),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Environment": pulumi.String("Prod"),
 * 			},
 * 		})
 * 		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.route53.ResolverEndpoint;
 * import com.pulumi.aws.route53.ResolverEndpointArgs;
 * import com.pulumi.aws.route53.inputs.ResolverEndpointIpAddressArgs;
 * 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 foo = new ResolverEndpoint("foo", ResolverEndpointArgs.builder()
 *             .name("foo")
 *             .direction("INBOUND")
 *             .resolverEndpointType("IPV4")
 *             .securityGroupIds(
 *                 sg1.id(),
 *                 sg2.id())
 *             .ipAddresses(
 *                 ResolverEndpointIpAddressArgs.builder()
 *                     .subnetId(sn1.id())
 *                     .build(),
 *                 ResolverEndpointIpAddressArgs.builder()
 *                     .subnetId(sn2.id())
 *                     .ip("10.0.64.4")
 *                     .build())
 *             .protocols(
 *                 "Do53",
 *                 "DoH")
 *             .tags(Map.of("Environment", "Prod"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foo:
 *     type: aws:route53:ResolverEndpoint
 *     properties:
 *       name: foo
 *       direction: INBOUND
 *       resolverEndpointType: IPV4
 *       securityGroupIds:
 *         - ${sg1.id}
 *         - ${sg2.id}
 *       ipAddresses:
 *         - subnetId: ${sn1.id}
 *         - subnetId: ${sn2.id}
 *           ip: 10.0.64.4
 *       protocols:
 *         - Do53
 *         - DoH
 *       tags:
 *         Environment: Prod
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import  Route 53 Resolver endpoints using the Route 53 Resolver endpoint ID. For example:
 * ```sh
 * $ pulumi import aws:route53/resolverEndpoint:ResolverEndpoint foo rslvr-in-abcdef01234567890
 * ```
 * @property direction Direction of DNS queries to or from the Route 53 Resolver endpoint.
 * Valid values are `INBOUND` (resolver forwards DNS queries to the DNS service for a VPC from your network or another VPC)
 * or `OUTBOUND` (resolver forwards DNS queries from the DNS service for a VPC to your network or another VPC).
 * @property ipAddresses Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
 * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
 * @property name Friendly name of the Route 53 Resolver endpoint.
 * @property protocols Protocols you want to use for the Route 53 Resolver endpoint. Valid values: `DoH`, `Do53`, `DoH-FIPS`.
 * @property resolverEndpointType Route 53 Resolver endpoint IP address type. Valid values: `IPV4`, `IPV6`, `DUALSTACK`.
 * @property securityGroupIds ID of one or more security groups that you want to use to control access to this VPC.
 * @property tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class ResolverEndpointArgs(
    public val direction: Output? = null,
    public val ipAddresses: Output>? = null,
    public val name: Output? = null,
    public val protocols: Output>? = null,
    public val resolverEndpointType: Output? = null,
    public val securityGroupIds: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.route53.ResolverEndpointArgs =
        com.pulumi.aws.route53.ResolverEndpointArgs.builder()
            .direction(direction?.applyValue({ args0 -> args0 }))
            .ipAddresses(
                ipAddresses?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .protocols(protocols?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .resolverEndpointType(resolverEndpointType?.applyValue({ args0 -> args0 }))
            .securityGroupIds(securityGroupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ResolverEndpointArgs].
 */
@PulumiTagMarker
public class ResolverEndpointArgsBuilder internal constructor() {
    private var direction: Output? = null

    private var ipAddresses: Output>? = null

    private var name: Output? = null

    private var protocols: Output>? = null

    private var resolverEndpointType: Output? = null

    private var securityGroupIds: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Direction of DNS queries to or from the Route 53 Resolver endpoint.
     * Valid values are `INBOUND` (resolver forwards DNS queries to the DNS service for a VPC from your network or another VPC)
     * or `OUTBOUND` (resolver forwards DNS queries from the DNS service for a VPC to your network or another VPC).
     */
    @JvmName("qjtpwjadkkvtbmdc")
    public suspend fun direction(`value`: Output) {
        this.direction = value
    }

    /**
     * @param value Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("ipaiivfetxduaocx")
    public suspend fun ipAddresses(`value`: Output>) {
        this.ipAddresses = value
    }

    @JvmName("nuyinhoopkvrtblu")
    public suspend fun ipAddresses(vararg values: Output) {
        this.ipAddresses = Output.all(values.asList())
    }

    /**
     * @param values Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("uleuxgcibsncyghr")
    public suspend fun ipAddresses(values: List>) {
        this.ipAddresses = Output.all(values)
    }

    /**
     * @param value Friendly name of the Route 53 Resolver endpoint.
     */
    @JvmName("sahfksduluqpjibf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Protocols you want to use for the Route 53 Resolver endpoint. Valid values: `DoH`, `Do53`, `DoH-FIPS`.
     */
    @JvmName("lhwahqheedxajmkv")
    public suspend fun protocols(`value`: Output>) {
        this.protocols = value
    }

    @JvmName("soolofljoglacevo")
    public suspend fun protocols(vararg values: Output) {
        this.protocols = Output.all(values.asList())
    }

    /**
     * @param values Protocols you want to use for the Route 53 Resolver endpoint. Valid values: `DoH`, `Do53`, `DoH-FIPS`.
     */
    @JvmName("uylcyebtpgnugmie")
    public suspend fun protocols(values: List>) {
        this.protocols = Output.all(values)
    }

    /**
     * @param value Route 53 Resolver endpoint IP address type. Valid values: `IPV4`, `IPV6`, `DUALSTACK`.
     */
    @JvmName("dtsnrykbbhndhipe")
    public suspend fun resolverEndpointType(`value`: Output) {
        this.resolverEndpointType = value
    }

    /**
     * @param value ID of one or more security groups that you want to use to control access to this VPC.
     */
    @JvmName("fsxxrmhdwioaaupo")
    public suspend fun securityGroupIds(`value`: Output>) {
        this.securityGroupIds = value
    }

    @JvmName("hctaatwrjopmcgil")
    public suspend fun securityGroupIds(vararg values: Output) {
        this.securityGroupIds = Output.all(values.asList())
    }

    /**
     * @param values ID of one or more security groups that you want to use to control access to this VPC.
     */
    @JvmName("dwimsmrnrsqnstii")
    public suspend fun securityGroupIds(values: List>) {
        this.securityGroupIds = Output.all(values)
    }

    /**
     * @param value Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("awyoenlepnkmjvio")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Direction of DNS queries to or from the Route 53 Resolver endpoint.
     * Valid values are `INBOUND` (resolver forwards DNS queries to the DNS service for a VPC from your network or another VPC)
     * or `OUTBOUND` (resolver forwards DNS queries from the DNS service for a VPC to your network or another VPC).
     */
    @JvmName("fkdpmcfhmrcgfetg")
    public suspend fun direction(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.direction = mapped
    }

    /**
     * @param value Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("mtelgxejhhviinnm")
    public suspend fun ipAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipAddresses = mapped
    }

    /**
     * @param argument Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("edshstjualspahun")
    public suspend fun ipAddresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResolverEndpointIpAddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipAddresses = mapped
    }

    /**
     * @param argument Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("qlmjgliglcqqwlro")
    public suspend fun ipAddresses(vararg argument: suspend ResolverEndpointIpAddressArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResolverEndpointIpAddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipAddresses = mapped
    }

    /**
     * @param argument Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("ksphfwifewnudoed")
    public suspend fun ipAddresses(argument: suspend ResolverEndpointIpAddressArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ResolverEndpointIpAddressArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipAddresses = mapped
    }

    /**
     * @param values Subnets and IP addresses in your VPC that you want DNS queries to pass through on the way from your VPCs
     * to your network (for outbound endpoints) or on the way from your network to your VPCs (for inbound endpoints). Described below.
     */
    @JvmName("qjgjlxhksyofhcpe")
    public suspend fun ipAddresses(vararg values: ResolverEndpointIpAddressArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipAddresses = mapped
    }

    /**
     * @param value Friendly name of the Route 53 Resolver endpoint.
     */
    @JvmName("aqyjukovkwroweqa")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Protocols you want to use for the Route 53 Resolver endpoint. Valid values: `DoH`, `Do53`, `DoH-FIPS`.
     */
    @JvmName("ueylkctjptcxubjm")
    public suspend fun protocols(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param values Protocols you want to use for the Route 53 Resolver endpoint. Valid values: `DoH`, `Do53`, `DoH-FIPS`.
     */
    @JvmName("yxiyddcunhispjwe")
    public suspend fun protocols(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param value Route 53 Resolver endpoint IP address type. Valid values: `IPV4`, `IPV6`, `DUALSTACK`.
     */
    @JvmName("xqovphbknvbmnvpb")
    public suspend fun resolverEndpointType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resolverEndpointType = mapped
    }

    /**
     * @param value ID of one or more security groups that you want to use to control access to this VPC.
     */
    @JvmName("rrilycoxktquxdbh")
    public suspend fun securityGroupIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param values ID of one or more security groups that you want to use to control access to this VPC.
     */
    @JvmName("ifijtmbgqplqtefu")
    public suspend fun securityGroupIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param value Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("wdmnfoqtyhkusyht")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ougaxeqosmaejwcb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ResolverEndpointArgs = ResolverEndpointArgs(
        direction = direction,
        ipAddresses = ipAddresses,
        name = name,
        protocols = protocols,
        resolverEndpointType = resolverEndpointType,
        securityGroupIds = securityGroupIds,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy