NetworkInterface class

A network interface resource attached to an instance.

Constructors

NetworkInterface({Input<List<AccessConfig>>? accessConfigs, Input<List<AliasIpRange>>? aliasIpRanges, Input<int>? internalIpv6PrefixLength, Input<List<AccessConfig>>? ipv6AccessConfigs, Input<String>? ipv6Address, Input<String>? network, Input<String>? networkAttachment, Input<String>? networkIP, Input<NetworkInterfaceNicType>? nicType, Input<String>? parentNicName, Input<int>? queueCount, Input<NetworkInterfaceStackType>? stackType, Input<List<NetworkInterfaceSubInterface>>? subinterfaces, Input<String>? subnetwork, Input<int>? vlan})
Creates a new NetworkInterface. accessConfigs An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. aliasIpRanges An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. internalIpv6PrefixLength The prefix length of the primary internal IPv6 range. 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. ipv6Address An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork. network URL of the VPC network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used. If the selected project doesn't have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/global/networks/ network - projects/project/global/networks/network - global/networks/default networkAttachment The URL of the network attachment that this interface should connect to in the following format: projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. networkIP An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. nicType The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. parentNicName Name of the parent network interface of a VLAN based nic. If this field is specified, vlan must be set. 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'll be empty if not specified by the users. stackType The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can be both set at instance creation and update network interface operations. subinterfaces SubInterfaces help enable L2 communication for the instance over subnetworks that support L2. Every network interface will get a default untagged (vlan not specified) subinterface. Users can specify additional tagged subinterfaces which are sub-fields to the Network Interface. subnetwork The URL of the Subnetwork resource for this instance. If the network resource is in 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. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/subnetwork vlan VLAN tag of a VLAN based network interface, must be in range from 2 to 4094 inclusively. This field is mandatory if the parent network interface name is set.
const
NetworkInterface.fromMap(Map<String, dynamic> map)
factory

Properties

accessConfigs → Input<List<AccessConfig>>?
An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
final
aliasIpRanges → Input<List<AliasIpRange>>?
An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
final
hashCode → int
The hash code for this object.
no setterinherited
internalIpv6PrefixLength → Input<int>?
The prefix length of the primary internal IPv6 range.
final
ipv6AccessConfigs → Input<List<AccessConfig>>?
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.
final
ipv6Address → Input<String>?
An IPv6 internal network address for this network interface. To use a static internal IP address, it must be unused and in the same region as the instance's zone. If not specified, Google Cloud will automatically assign an internal IPv6 address from the instance's subnetwork.
final
network → Input<String>?
URL of the VPC network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used. If the selected project doesn't have the default network, you must specify a network or subnet. If the network is not specified but the subnetwork is specified, the network is inferred. If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/global/networks/ network - projects/project/global/networks/network - global/networks/default
final
networkAttachment → Input<String>?
The URL of the network attachment that this interface should connect to in the following format: projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
final
networkIP → Input<String>?
An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
final
nicType → Input<NetworkInterfaceNicType>?
The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
final
parentNicName → Input<String>?
Name of the parent network interface of a VLAN based nic. If this field is specified, vlan must be set.
final
queueCount → Input<int>?
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'll be empty if not specified by the users.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackType → Input<NetworkInterfaceStackType>?
The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use IPV4_IPV6. If not specified, IPV4_ONLY is used. This field can be both set at instance creation and update network interface operations.
final
subinterfaces → Input<List<NetworkInterfaceSubInterface>>?
SubInterfaces help enable L2 communication for the instance over subnetworks that support L2. Every network interface will get a default untagged (vlan not specified) subinterface. Users can specify additional tagged subinterfaces which are sub-fields to the Network Interface.
final
subnetwork → Input<String>?
The URL of the Subnetwork resource for this instance. If the network resource is in 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. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www.googleapis.com/compute/v1/projects/project/regions/region /subnetworks/subnetwork - regions/region/subnetworks/subnetwork
final
vlan → Input<int>?
VLAN tag of a VLAN based network interface, must be in range from 2 to 4094 inclusively. This field is mandatory if the parent network interface name is set.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited