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

com.pulumi.gcp.compute.kotlin.outputs.InstanceNetworkInterface.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property accessConfigs Access configurations, i.e. IPs via which this instance can be accessed via the Internet.
 * @property aliasIpRanges An
 * array of alias IP ranges for this network interface. Can only be specified for network
 * interfaces on subnet-mode networks. Structure documented below.
 * @property internalIpv6PrefixLength The prefix length of the primary internal IPv6 range.
 * @property ipv6AccessConfigs An array of IPv6 access configurations for this interface.
 * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig
 * specified, then this instance will have no external IPv6 Internet access. Structure documented below.
 * @property ipv6AccessType One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet.
 * This field is always inherited from its subnetwork.
 * @property ipv6Address An IPv6 internal network address for this network interface. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork.
 * @property name A unique name for the resource, required by GCE.
 * Changing this forces a new resource to be created.
 * @property network The name or self_link of the network to attach this interface to.
 * Either `network` or `subnetwork` must be provided. If network isn't provided it will
 * be inferred from the subnetwork.
 * @property networkAttachment The URL of the network attachment that this interface should connect to in the following format: `projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}`.
 * @property networkIp The private IP address to assign to the instance. If
 * empty, the address will be automatically assigned.
 * @property nicType The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.
 * @property queueCount The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.
 * @property securityPolicy A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy.
 * @property stackType The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.
 * @property subnetwork The name or self_link of the subnetwork to attach this
 * interface to. Either `network` or `subnetwork` must be provided. If network isn't provided
 * it will be inferred from the subnetwork. The subnetwork must exist in the same region this
 * instance will be created in. If the network resource is in
 * [legacy](https://cloud.google.com/vpc/docs/legacy) mode, do not specify this field. If the
 * network is in auto subnet mode, specifying the subnetwork is optional. If the network is
 * in custom subnet mode, specifying the subnetwork is required.
 * @property subnetworkProject The project in which the subnetwork belongs.
 * If the `subnetwork` is a self_link, this field is ignored in favor of the project
 * defined in the subnetwork self_link. If the `subnetwork` is a name and this
 * field is not provided, the provider project is used.
 */
public data class InstanceNetworkInterface(
    public val accessConfigs: List? = null,
    public val aliasIpRanges: List? = null,
    public val internalIpv6PrefixLength: Int? = null,
    public val ipv6AccessConfigs: List? = null,
    public val ipv6AccessType: String? = null,
    public val ipv6Address: String? = null,
    public val name: String? = null,
    public val network: String? = null,
    public val networkAttachment: String? = null,
    public val networkIp: String? = null,
    public val nicType: String? = null,
    public val queueCount: Int? = null,
    public val securityPolicy: String? = null,
    public val stackType: String? = null,
    public val subnetwork: String? = null,
    public val subnetworkProject: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.InstanceNetworkInterface): InstanceNetworkInterface = InstanceNetworkInterface(
            accessConfigs = javaType.accessConfigs().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.InstanceNetworkInterfaceAccessConfig.Companion.toKotlin(args0)
                })
            }),
            aliasIpRanges = javaType.aliasIpRanges().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.InstanceNetworkInterfaceAliasIpRange.Companion.toKotlin(args0)
                })
            }),
            internalIpv6PrefixLength = javaType.internalIpv6PrefixLength().map({ args0 -> args0 }).orElse(null),
            ipv6AccessConfigs = javaType.ipv6AccessConfigs().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.InstanceNetworkInterfaceIpv6AccessConfig.Companion.toKotlin(args0)
                })
            }),
            ipv6AccessType = javaType.ipv6AccessType().map({ args0 -> args0 }).orElse(null),
            ipv6Address = javaType.ipv6Address().map({ args0 -> args0 }).orElse(null),
            name = javaType.name().map({ args0 -> args0 }).orElse(null),
            network = javaType.network().map({ args0 -> args0 }).orElse(null),
            networkAttachment = javaType.networkAttachment().map({ args0 -> args0 }).orElse(null),
            networkIp = javaType.networkIp().map({ args0 -> args0 }).orElse(null),
            nicType = javaType.nicType().map({ args0 -> args0 }).orElse(null),
            queueCount = javaType.queueCount().map({ args0 -> args0 }).orElse(null),
            securityPolicy = javaType.securityPolicy().map({ args0 -> args0 }).orElse(null),
            stackType = javaType.stackType().map({ args0 -> args0 }).orElse(null),
            subnetwork = javaType.subnetwork().map({ args0 -> args0 }).orElse(null),
            subnetworkProject = javaType.subnetworkProject().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy