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

com.pulumi.alicloud.vpn.kotlin.GatewayArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.vpn.kotlin

import com.pulumi.alicloud.vpn.GatewayArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * ## Import
 * VPN gateway can be imported using the id, e.g.
 * ```sh
 * $ pulumi import alicloud:vpn/gateway:Gateway example 
 * ```
 * @property autoPay Whether to pay automatically. Default value: `true`. Valid values:
 * @property autoPropagate Whether to automatically propagate the BGP route to the VPC. Value:  true: Propagate automatically.  false: does not propagate automatically.
 * @property bandwidth The Bandwidth specification of the VPN gateway. Unit: Mbps.  If you want to create a public VPN gateway, the value is 5, 10, 20, 50, 100, 200, 500, or 1000. If you want to create a private VPN gateway, the value is 200 or 1000.
 * @property description The description of the VPN gateway.
 * @property disasterRecoveryVswitchId The ID of the backup VSwitch to which the VPN gateway is attached.
 * @property enableIpsec Enable or Disable IPSec VPN. At least one type of VPN should be enabled.
 * @property enableSsl Enable or Disable SSL VPN.  At least one type of VPN should be enabled.
 * The following arguments will be discarded. Please use new fields as soon as possible:
 * @property instanceChargeType . Field 'instance_charge_type' has been deprecated from provider version 1.216.0. New field 'payment_type' instead.
 * @property name . Field 'name' has been deprecated from provider version 1.216.0. New field 'vpn_gateway_name' instead.
 * @property networkType The network type of the VPN gateway. Value:  public (default): public VPN gateway. private: private network VPN gateway.
 * @property paymentType Type of payment. Value: Subscription: prepaid PayAsYouGo: Post-paid.
 * @property period The filed is only required while the InstanceChargeType is PrePaid. Valid values: [1-9, 12, 24, 36]. Default to 1.
 * @property resourceGroupId The ID of the resource group.
 * @property sslConnections Maximum number of clients.
 * @property tags The Tag of.
 * @property vpcId The ID of the VPC to which the VPN gateway belongs.
 * @property vpnGatewayName The name of the VPN gateway.
 * @property vpnType The VPN gateway type. Value:  Normal (default): Normal type. NationalStandard: National Secret type.
 * @property vswitchId The ID of the VSwitch to which the VPN gateway is attached.
 */
public data class GatewayArgs(
    public val autoPay: Output? = null,
    public val autoPropagate: Output? = null,
    public val bandwidth: Output? = null,
    public val description: Output? = null,
    public val disasterRecoveryVswitchId: Output? = null,
    public val enableIpsec: Output? = null,
    public val enableSsl: Output? = null,
    @Deprecated(
        message = """
  Field 'instance_charge_type' has been deprecated since provider version 1.215.0. New field
      'payment_type' instead.
  """,
    )
    public val instanceChargeType: Output? = null,
    @Deprecated(
        message = """
  Field 'name' has been deprecated since provider version 1.215.0. New field 'vpn_gateway_name'
      instead.
  """,
    )
    public val name: Output? = null,
    public val networkType: Output? = null,
    public val paymentType: Output? = null,
    public val period: Output? = null,
    public val resourceGroupId: Output? = null,
    public val sslConnections: Output? = null,
    public val tags: Output>? = null,
    public val vpcId: Output? = null,
    public val vpnGatewayName: Output? = null,
    public val vpnType: Output? = null,
    public val vswitchId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.vpn.GatewayArgs =
        com.pulumi.alicloud.vpn.GatewayArgs.builder()
            .autoPay(autoPay?.applyValue({ args0 -> args0 }))
            .autoPropagate(autoPropagate?.applyValue({ args0 -> args0 }))
            .bandwidth(bandwidth?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .disasterRecoveryVswitchId(disasterRecoveryVswitchId?.applyValue({ args0 -> args0 }))
            .enableIpsec(enableIpsec?.applyValue({ args0 -> args0 }))
            .enableSsl(enableSsl?.applyValue({ args0 -> args0 }))
            .instanceChargeType(instanceChargeType?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkType(networkType?.applyValue({ args0 -> args0 }))
            .paymentType(paymentType?.applyValue({ args0 -> args0 }))
            .period(period?.applyValue({ args0 -> args0 }))
            .resourceGroupId(resourceGroupId?.applyValue({ args0 -> args0 }))
            .sslConnections(sslConnections?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .vpcId(vpcId?.applyValue({ args0 -> args0 }))
            .vpnGatewayName(vpnGatewayName?.applyValue({ args0 -> args0 }))
            .vpnType(vpnType?.applyValue({ args0 -> args0 }))
            .vswitchId(vswitchId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GatewayArgs].
 */
@PulumiTagMarker
public class GatewayArgsBuilder internal constructor() {
    private var autoPay: Output? = null

    private var autoPropagate: Output? = null

    private var bandwidth: Output? = null

    private var description: Output? = null

    private var disasterRecoveryVswitchId: Output? = null

    private var enableIpsec: Output? = null

    private var enableSsl: Output? = null

    private var instanceChargeType: Output? = null

    private var name: Output? = null

    private var networkType: Output? = null

    private var paymentType: Output? = null

    private var period: Output? = null

    private var resourceGroupId: Output? = null

    private var sslConnections: Output? = null

    private var tags: Output>? = null

    private var vpcId: Output? = null

    private var vpnGatewayName: Output? = null

    private var vpnType: Output? = null

    private var vswitchId: Output? = null

    /**
     * @param value Whether to pay automatically. Default value: `true`. Valid values:
     */
    @JvmName("jkanaofahgadvfjm")
    public suspend fun autoPay(`value`: Output) {
        this.autoPay = value
    }

    /**
     * @param value Whether to automatically propagate the BGP route to the VPC. Value:  true: Propagate automatically.  false: does not propagate automatically.
     */
    @JvmName("aukxjdtmjvgcmbxb")
    public suspend fun autoPropagate(`value`: Output) {
        this.autoPropagate = value
    }

    /**
     * @param value The Bandwidth specification of the VPN gateway. Unit: Mbps.  If you want to create a public VPN gateway, the value is 5, 10, 20, 50, 100, 200, 500, or 1000. If you want to create a private VPN gateway, the value is 200 or 1000.
     */
    @JvmName("acetjyaxaajwejkm")
    public suspend fun bandwidth(`value`: Output) {
        this.bandwidth = value
    }

    /**
     * @param value The description of the VPN gateway.
     */
    @JvmName("jfnxlqxrjnjceckh")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The ID of the backup VSwitch to which the VPN gateway is attached.
     */
    @JvmName("qhnystqsqpravqyy")
    public suspend fun disasterRecoveryVswitchId(`value`: Output) {
        this.disasterRecoveryVswitchId = value
    }

    /**
     * @param value Enable or Disable IPSec VPN. At least one type of VPN should be enabled.
     */
    @JvmName("eqrufjdndsocctua")
    public suspend fun enableIpsec(`value`: Output) {
        this.enableIpsec = value
    }

    /**
     * @param value Enable or Disable SSL VPN.  At least one type of VPN should be enabled.
     * The following arguments will be discarded. Please use new fields as soon as possible:
     */
    @JvmName("rrwejpkdjnalyejg")
    public suspend fun enableSsl(`value`: Output) {
        this.enableSsl = value
    }

    /**
     * @param value . Field 'instance_charge_type' has been deprecated from provider version 1.216.0. New field 'payment_type' instead.
     */
    @Deprecated(
        message = """
  Field 'instance_charge_type' has been deprecated since provider version 1.215.0. New field
      'payment_type' instead.
  """,
    )
    @JvmName("ueydgbiglegwbjte")
    public suspend fun instanceChargeType(`value`: Output) {
        this.instanceChargeType = value
    }

    /**
     * @param value . Field 'name' has been deprecated from provider version 1.216.0. New field 'vpn_gateway_name' instead.
     */
    @Deprecated(
        message = """
  Field 'name' has been deprecated since provider version 1.215.0. New field 'vpn_gateway_name'
      instead.
  """,
    )
    @JvmName("elciarxntgcbitog")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The network type of the VPN gateway. Value:  public (default): public VPN gateway. private: private network VPN gateway.
     */
    @JvmName("bqpkwxdbattceyus")
    public suspend fun networkType(`value`: Output) {
        this.networkType = value
    }

    /**
     * @param value Type of payment. Value: Subscription: prepaid PayAsYouGo: Post-paid.
     */
    @JvmName("xifeauwnmynikfoy")
    public suspend fun paymentType(`value`: Output) {
        this.paymentType = value
    }

    /**
     * @param value The filed is only required while the InstanceChargeType is PrePaid. Valid values: [1-9, 12, 24, 36]. Default to 1.
     */
    @JvmName("tsqctnmhxmijfgre")
    public suspend fun period(`value`: Output) {
        this.period = value
    }

    /**
     * @param value The ID of the resource group.
     */
    @JvmName("whbnbrcwqcxjqdwn")
    public suspend fun resourceGroupId(`value`: Output) {
        this.resourceGroupId = value
    }

    /**
     * @param value Maximum number of clients.
     */
    @JvmName("xabkaajlboqyunpi")
    public suspend fun sslConnections(`value`: Output) {
        this.sslConnections = value
    }

    /**
     * @param value The Tag of.
     */
    @JvmName("unxwrreelmqnmvaf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID of the VPC to which the VPN gateway belongs.
     */
    @JvmName("cttmumelcalylsqj")
    public suspend fun vpcId(`value`: Output) {
        this.vpcId = value
    }

    /**
     * @param value The name of the VPN gateway.
     */
    @JvmName("tkdvooalirmdeauv")
    public suspend fun vpnGatewayName(`value`: Output) {
        this.vpnGatewayName = value
    }

    /**
     * @param value The VPN gateway type. Value:  Normal (default): Normal type. NationalStandard: National Secret type.
     */
    @JvmName("aepqnjsrwjxowxfo")
    public suspend fun vpnType(`value`: Output) {
        this.vpnType = value
    }

    /**
     * @param value The ID of the VSwitch to which the VPN gateway is attached.
     */
    @JvmName("vqmihnmskmnjwehf")
    public suspend fun vswitchId(`value`: Output) {
        this.vswitchId = value
    }

    /**
     * @param value Whether to pay automatically. Default value: `true`. Valid values:
     */
    @JvmName("venkacminprtxwpx")
    public suspend fun autoPay(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoPay = mapped
    }

    /**
     * @param value Whether to automatically propagate the BGP route to the VPC. Value:  true: Propagate automatically.  false: does not propagate automatically.
     */
    @JvmName("raxhoywywqqfreqf")
    public suspend fun autoPropagate(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoPropagate = mapped
    }

    /**
     * @param value The Bandwidth specification of the VPN gateway. Unit: Mbps.  If you want to create a public VPN gateway, the value is 5, 10, 20, 50, 100, 200, 500, or 1000. If you want to create a private VPN gateway, the value is 200 or 1000.
     */
    @JvmName("iysgxrhqqgtvsbgh")
    public suspend fun bandwidth(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bandwidth = mapped
    }

    /**
     * @param value The description of the VPN gateway.
     */
    @JvmName("ebacrdkcgbkvnueu")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The ID of the backup VSwitch to which the VPN gateway is attached.
     */
    @JvmName("jgkfwaqbxphtmbhl")
    public suspend fun disasterRecoveryVswitchId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disasterRecoveryVswitchId = mapped
    }

    /**
     * @param value Enable or Disable IPSec VPN. At least one type of VPN should be enabled.
     */
    @JvmName("fmfvnqmtjdcgvgef")
    public suspend fun enableIpsec(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableIpsec = mapped
    }

    /**
     * @param value Enable or Disable SSL VPN.  At least one type of VPN should be enabled.
     * The following arguments will be discarded. Please use new fields as soon as possible:
     */
    @JvmName("tlucqvyynoqpwhsv")
    public suspend fun enableSsl(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableSsl = mapped
    }

    /**
     * @param value . Field 'instance_charge_type' has been deprecated from provider version 1.216.0. New field 'payment_type' instead.
     */
    @Deprecated(
        message = """
  Field 'instance_charge_type' has been deprecated since provider version 1.215.0. New field
      'payment_type' instead.
  """,
    )
    @JvmName("brpcmcjjfrrwwuls")
    public suspend fun instanceChargeType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceChargeType = mapped
    }

    /**
     * @param value . Field 'name' has been deprecated from provider version 1.216.0. New field 'vpn_gateway_name' instead.
     */
    @Deprecated(
        message = """
  Field 'name' has been deprecated since provider version 1.215.0. New field 'vpn_gateway_name'
      instead.
  """,
    )
    @JvmName("hngbqsvbgixtepcg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The network type of the VPN gateway. Value:  public (default): public VPN gateway. private: private network VPN gateway.
     */
    @JvmName("ucxcmnraovnmlmrm")
    public suspend fun networkType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkType = mapped
    }

    /**
     * @param value Type of payment. Value: Subscription: prepaid PayAsYouGo: Post-paid.
     */
    @JvmName("oqifgbpirgtikovr")
    public suspend fun paymentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paymentType = mapped
    }

    /**
     * @param value The filed is only required while the InstanceChargeType is PrePaid. Valid values: [1-9, 12, 24, 36]. Default to 1.
     */
    @JvmName("jjtexahjscpjnutr")
    public suspend fun period(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.period = mapped
    }

    /**
     * @param value The ID of the resource group.
     */
    @JvmName("yeanxlrhnbgaoauv")
    public suspend fun resourceGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupId = mapped
    }

    /**
     * @param value Maximum number of clients.
     */
    @JvmName("mpmeocfpnhiogafk")
    public suspend fun sslConnections(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sslConnections = mapped
    }

    /**
     * @param value The Tag of.
     */
    @JvmName("jugcysweosidwjda")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The Tag of.
     */
    @JvmName("shkymlbcqicfpeaa")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ID of the VPC to which the VPN gateway belongs.
     */
    @JvmName("rnsmuevouranrnuh")
    public suspend fun vpcId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcId = mapped
    }

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

    /**
     * @param value The VPN gateway type. Value:  Normal (default): Normal type. NationalStandard: National Secret type.
     */
    @JvmName("laavumesgfahdcjb")
    public suspend fun vpnType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpnType = mapped
    }

    /**
     * @param value The ID of the VSwitch to which the VPN gateway is attached.
     */
    @JvmName("dxepgmrpxynwxxtq")
    public suspend fun vswitchId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vswitchId = mapped
    }

    internal fun build(): GatewayArgs = GatewayArgs(
        autoPay = autoPay,
        autoPropagate = autoPropagate,
        bandwidth = bandwidth,
        description = description,
        disasterRecoveryVswitchId = disasterRecoveryVswitchId,
        enableIpsec = enableIpsec,
        enableSsl = enableSsl,
        instanceChargeType = instanceChargeType,
        name = name,
        networkType = networkType,
        paymentType = paymentType,
        period = period,
        resourceGroupId = resourceGroupId,
        sslConnections = sslConnections,
        tags = tags,
        vpcId = vpcId,
        vpnGatewayName = vpnGatewayName,
        vpnType = vpnType,
        vswitchId = vswitchId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy