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

com.pulumi.aws.directconnect.kotlin.HostedPublicVirtualInterfaceArgs.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.directconnect.kotlin

import com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a Direct Connect hosted public virtual interface resource. This resource represents the allocator's side of the hosted virtual interface.
 * A hosted virtual interface is a virtual interface that is owned by another AWS account.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const foo = new aws.directconnect.HostedPublicVirtualInterface("foo", {
 *     connectionId: "dxcon-zzzzzzzz",
 *     name: "vif-foo",
 *     vlan: 4094,
 *     addressFamily: "ipv4",
 *     bgpAsn: 65352,
 *     customerAddress: "175.45.176.1/30",
 *     amazonAddress: "175.45.176.2/30",
 *     routeFilterPrefixes: [
 *         "210.52.109.0/24",
 *         "175.45.176.0/22",
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * foo = aws.directconnect.HostedPublicVirtualInterface("foo",
 *     connection_id="dxcon-zzzzzzzz",
 *     name="vif-foo",
 *     vlan=4094,
 *     address_family="ipv4",
 *     bgp_asn=65352,
 *     customer_address="175.45.176.1/30",
 *     amazon_address="175.45.176.2/30",
 *     route_filter_prefixes=[
 *         "210.52.109.0/24",
 *         "175.45.176.0/22",
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var foo = new Aws.DirectConnect.HostedPublicVirtualInterface("foo", new()
 *     {
 *         ConnectionId = "dxcon-zzzzzzzz",
 *         Name = "vif-foo",
 *         Vlan = 4094,
 *         AddressFamily = "ipv4",
 *         BgpAsn = 65352,
 *         CustomerAddress = "175.45.176.1/30",
 *         AmazonAddress = "175.45.176.2/30",
 *         RouteFilterPrefixes = new[]
 *         {
 *             "210.52.109.0/24",
 *             "175.45.176.0/22",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := directconnect.NewHostedPublicVirtualInterface(ctx, "foo", &directconnect.HostedPublicVirtualInterfaceArgs{
 * 			ConnectionId:    pulumi.String("dxcon-zzzzzzzz"),
 * 			Name:            pulumi.String("vif-foo"),
 * 			Vlan:            pulumi.Int(4094),
 * 			AddressFamily:   pulumi.String("ipv4"),
 * 			BgpAsn:          pulumi.Int(65352),
 * 			CustomerAddress: pulumi.String("175.45.176.1/30"),
 * 			AmazonAddress:   pulumi.String("175.45.176.2/30"),
 * 			RouteFilterPrefixes: pulumi.StringArray{
 * 				pulumi.String("210.52.109.0/24"),
 * 				pulumi.String("175.45.176.0/22"),
 * 			},
 * 		})
 * 		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.directconnect.HostedPublicVirtualInterface;
 * import com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs;
 * 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 HostedPublicVirtualInterface("foo", HostedPublicVirtualInterfaceArgs.builder()
 *             .connectionId("dxcon-zzzzzzzz")
 *             .name("vif-foo")
 *             .vlan(4094)
 *             .addressFamily("ipv4")
 *             .bgpAsn(65352)
 *             .customerAddress("175.45.176.1/30")
 *             .amazonAddress("175.45.176.2/30")
 *             .routeFilterPrefixes(
 *                 "210.52.109.0/24",
 *                 "175.45.176.0/22")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   foo:
 *     type: aws:directconnect:HostedPublicVirtualInterface
 *     properties:
 *       connectionId: dxcon-zzzzzzzz
 *       name: vif-foo
 *       vlan: 4094
 *       addressFamily: ipv4
 *       bgpAsn: 65352
 *       customerAddress: 175.45.176.1/30
 *       amazonAddress: 175.45.176.2/30
 *       routeFilterPrefixes:
 *         - 210.52.109.0/24
 *         - 175.45.176.0/22
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Direct Connect hosted public virtual interfaces using the VIF `id`. For example:
 * ```sh
 * $ pulumi import aws:directconnect/hostedPublicVirtualInterface:HostedPublicVirtualInterface test dxvif-33cc44dd
 * ```
 * @property addressFamily The address family for the BGP peer. `ipv4 ` or `ipv6`.
 * @property amazonAddress The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers.
 * @property bgpAsn The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
 * @property bgpAuthKey The authentication key for BGP configuration.
 * @property connectionId The ID of the Direct Connect connection (or LAG) on which to create the virtual interface.
 * @property customerAddress The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers.
 * @property name The name for the virtual interface.
 * @property ownerAccountId The AWS account that will own the new virtual interface.
 * @property routeFilterPrefixes A list of routes to be advertised to the AWS network in this region.
 * @property vlan The VLAN ID.
 */
public data class HostedPublicVirtualInterfaceArgs(
    public val addressFamily: Output? = null,
    public val amazonAddress: Output? = null,
    public val bgpAsn: Output? = null,
    public val bgpAuthKey: Output? = null,
    public val connectionId: Output? = null,
    public val customerAddress: Output? = null,
    public val name: Output? = null,
    public val ownerAccountId: Output? = null,
    public val routeFilterPrefixes: Output>? = null,
    public val vlan: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs =
        com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs.builder()
            .addressFamily(addressFamily?.applyValue({ args0 -> args0 }))
            .amazonAddress(amazonAddress?.applyValue({ args0 -> args0 }))
            .bgpAsn(bgpAsn?.applyValue({ args0 -> args0 }))
            .bgpAuthKey(bgpAuthKey?.applyValue({ args0 -> args0 }))
            .connectionId(connectionId?.applyValue({ args0 -> args0 }))
            .customerAddress(customerAddress?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .ownerAccountId(ownerAccountId?.applyValue({ args0 -> args0 }))
            .routeFilterPrefixes(routeFilterPrefixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .vlan(vlan?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HostedPublicVirtualInterfaceArgs].
 */
@PulumiTagMarker
public class HostedPublicVirtualInterfaceArgsBuilder internal constructor() {
    private var addressFamily: Output? = null

    private var amazonAddress: Output? = null

    private var bgpAsn: Output? = null

    private var bgpAuthKey: Output? = null

    private var connectionId: Output? = null

    private var customerAddress: Output? = null

    private var name: Output? = null

    private var ownerAccountId: Output? = null

    private var routeFilterPrefixes: Output>? = null

    private var vlan: Output? = null

    /**
     * @param value The address family for the BGP peer. `ipv4 ` or `ipv6`.
     */
    @JvmName("nyvukkisbuieyeys")
    public suspend fun addressFamily(`value`: Output) {
        this.addressFamily = value
    }

    /**
     * @param value The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers.
     */
    @JvmName("myvpfbtkcngvpqms")
    public suspend fun amazonAddress(`value`: Output) {
        this.amazonAddress = value
    }

    /**
     * @param value The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
     */
    @JvmName("pcdhjxwekjvgcovx")
    public suspend fun bgpAsn(`value`: Output) {
        this.bgpAsn = value
    }

    /**
     * @param value The authentication key for BGP configuration.
     */
    @JvmName("oeapkwpggcrlfkqy")
    public suspend fun bgpAuthKey(`value`: Output) {
        this.bgpAuthKey = value
    }

    /**
     * @param value The ID of the Direct Connect connection (or LAG) on which to create the virtual interface.
     */
    @JvmName("mkfkdbxlxqtyebij")
    public suspend fun connectionId(`value`: Output) {
        this.connectionId = value
    }

    /**
     * @param value The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers.
     */
    @JvmName("unmcuonletpushwj")
    public suspend fun customerAddress(`value`: Output) {
        this.customerAddress = value
    }

    /**
     * @param value The name for the virtual interface.
     */
    @JvmName("xuewsmqgqbkebkkr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The AWS account that will own the new virtual interface.
     */
    @JvmName("jctnmgbanefqoqfm")
    public suspend fun ownerAccountId(`value`: Output) {
        this.ownerAccountId = value
    }

    /**
     * @param value A list of routes to be advertised to the AWS network in this region.
     */
    @JvmName("hyincqegmmpufchq")
    public suspend fun routeFilterPrefixes(`value`: Output>) {
        this.routeFilterPrefixes = value
    }

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

    /**
     * @param values A list of routes to be advertised to the AWS network in this region.
     */
    @JvmName("mmutdtdntuuewkqu")
    public suspend fun routeFilterPrefixes(values: List>) {
        this.routeFilterPrefixes = Output.all(values)
    }

    /**
     * @param value The VLAN ID.
     */
    @JvmName("xjojgttcnxcylphg")
    public suspend fun vlan(`value`: Output) {
        this.vlan = value
    }

    /**
     * @param value The address family for the BGP peer. `ipv4 ` or `ipv6`.
     */
    @JvmName("rajkwjjqiqnvtlnk")
    public suspend fun addressFamily(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addressFamily = mapped
    }

    /**
     * @param value The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers.
     */
    @JvmName("hgrrjcjeyomxpmdc")
    public suspend fun amazonAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.amazonAddress = mapped
    }

    /**
     * @param value The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
     */
    @JvmName("lojbdjvdpwcygpmp")
    public suspend fun bgpAsn(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bgpAsn = mapped
    }

    /**
     * @param value The authentication key for BGP configuration.
     */
    @JvmName("lpedcbaukchdaawo")
    public suspend fun bgpAuthKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bgpAuthKey = mapped
    }

    /**
     * @param value The ID of the Direct Connect connection (or LAG) on which to create the virtual interface.
     */
    @JvmName("qdwvvnrtbnhryknp")
    public suspend fun connectionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionId = mapped
    }

    /**
     * @param value The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers.
     */
    @JvmName("sygspmvgmsrqnubq")
    public suspend fun customerAddress(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerAddress = mapped
    }

    /**
     * @param value The name for the virtual interface.
     */
    @JvmName("ouftflqhmljirfha")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The AWS account that will own the new virtual interface.
     */
    @JvmName("kpaixdasshexrlvu")
    public suspend fun ownerAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ownerAccountId = mapped
    }

    /**
     * @param value A list of routes to be advertised to the AWS network in this region.
     */
    @JvmName("hjikghngpcqlstyc")
    public suspend fun routeFilterPrefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routeFilterPrefixes = mapped
    }

    /**
     * @param values A list of routes to be advertised to the AWS network in this region.
     */
    @JvmName("rymckpfqnmaspxvp")
    public suspend fun routeFilterPrefixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routeFilterPrefixes = mapped
    }

    /**
     * @param value The VLAN ID.
     */
    @JvmName("hppvpxwtqrgmmhwv")
    public suspend fun vlan(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vlan = mapped
    }

    internal fun build(): HostedPublicVirtualInterfaceArgs = HostedPublicVirtualInterfaceArgs(
        addressFamily = addressFamily,
        amazonAddress = amazonAddress,
        bgpAsn = bgpAsn,
        bgpAuthKey = bgpAuthKey,
        connectionId = connectionId,
        customerAddress = customerAddress,
        name = name,
        ownerAccountId = ownerAccountId,
        routeFilterPrefixes = routeFilterPrefixes,
        vlan = vlan,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy