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

com.pulumi.aws.directconnect.kotlin.BgpPeerArgs.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.BgpPeerArgs.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.jvm.JvmName

/**
 * Provides a Direct Connect BGP peer resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const peer = new aws.directconnect.BgpPeer("peer", {
 *     virtualInterfaceId: foo.id,
 *     addressFamily: "ipv6",
 *     bgpAsn: 65351,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * peer = aws.directconnect.BgpPeer("peer",
 *     virtual_interface_id=foo["id"],
 *     address_family="ipv6",
 *     bgp_asn=65351)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var peer = new Aws.DirectConnect.BgpPeer("peer", new()
 *     {
 *         VirtualInterfaceId = foo.Id,
 *         AddressFamily = "ipv6",
 *         BgpAsn = 65351,
 *     });
 * });
 * ```
 * ```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.NewBgpPeer(ctx, "peer", &directconnect.BgpPeerArgs{
 * 			VirtualInterfaceId: pulumi.Any(foo.Id),
 * 			AddressFamily:      pulumi.String("ipv6"),
 * 			BgpAsn:             pulumi.Int(65351),
 * 		})
 * 		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.BgpPeer;
 * import com.pulumi.aws.directconnect.BgpPeerArgs;
 * 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 peer = new BgpPeer("peer", BgpPeerArgs.builder()
 *             .virtualInterfaceId(foo.id())
 *             .addressFamily("ipv6")
 *             .bgpAsn(65351)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   peer:
 *     type: aws:directconnect:BgpPeer
 *     properties:
 *       virtualInterfaceId: ${foo.id}
 *       addressFamily: ipv6
 *       bgpAsn: 65351
 * ```
 * 
 * @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 on public virtual interfaces.
 * @property bgpAsn The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
 * @property bgpAuthKey The authentication key for BGP configuration.
 * @property customerAddress The IPv4 CIDR destination address to which Amazon should send traffic.
 * Required for IPv4 BGP peers on public virtual interfaces.
 * @property virtualInterfaceId The ID of the Direct Connect virtual interface on which to create the BGP peer.
 */
public data class BgpPeerArgs(
    public val addressFamily: Output? = null,
    public val amazonAddress: Output? = null,
    public val bgpAsn: Output? = null,
    public val bgpAuthKey: Output? = null,
    public val customerAddress: Output? = null,
    public val virtualInterfaceId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.directconnect.BgpPeerArgs =
        com.pulumi.aws.directconnect.BgpPeerArgs.builder()
            .addressFamily(addressFamily?.applyValue({ args0 -> args0 }))
            .amazonAddress(amazonAddress?.applyValue({ args0 -> args0 }))
            .bgpAsn(bgpAsn?.applyValue({ args0 -> args0 }))
            .bgpAuthKey(bgpAuthKey?.applyValue({ args0 -> args0 }))
            .customerAddress(customerAddress?.applyValue({ args0 -> args0 }))
            .virtualInterfaceId(virtualInterfaceId?.applyValue({ args0 -> args0 })).build()
}

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

    private var amazonAddress: Output? = null

    private var bgpAsn: Output? = null

    private var bgpAuthKey: Output? = null

    private var customerAddress: Output? = null

    private var virtualInterfaceId: Output? = null

    /**
     * @param value The address family for the BGP peer. `ipv4 ` or `ipv6`.
     */
    @JvmName("lplxjplpfmgoogwi")
    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 on public virtual interfaces.
     */
    @JvmName("nojunattjhbnypwv")
    public suspend fun amazonAddress(`value`: Output) {
        this.amazonAddress = value
    }

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

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

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

    /**
     * @param value The ID of the Direct Connect virtual interface on which to create the BGP peer.
     */
    @JvmName("nthiieaxmublfygq")
    public suspend fun virtualInterfaceId(`value`: Output) {
        this.virtualInterfaceId = value
    }

    /**
     * @param value The address family for the BGP peer. `ipv4 ` or `ipv6`.
     */
    @JvmName("tlsvwuqfbwpgktxw")
    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 on public virtual interfaces.
     */
    @JvmName("mpynpansvjmrxetu")
    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("khxwaojvgwrvyxcb")
    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("hpjfnkgjvqjgqwip")
    public suspend fun bgpAuthKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bgpAuthKey = mapped
    }

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

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

    internal fun build(): BgpPeerArgs = BgpPeerArgs(
        addressFamily = addressFamily,
        amazonAddress = amazonAddress,
        bgpAsn = bgpAsn,
        bgpAuthKey = bgpAuthKey,
        customerAddress = customerAddress,
        virtualInterfaceId = virtualInterfaceId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy