NetworkInterface class final
A network interface resource attached to an instance.
Constructors
-
NetworkInterface({List<
AccessConfig> accessConfigs = const [], List<AliasIpRange> aliasIpRanges = const [], List<AliasIpRange> aliasIpv6Ranges = const [], bool? enableVpcScopedDns, String? fingerprint, String? igmpQuery, int? internalIpv6PrefixLength, List<AccessConfig> ipv6AccessConfigs = const [], String? ipv6AccessType, String? ipv6Address, String? kind, String? name, String? network, String? networkAttachment, String? networkIP, String? nicType, String? parentNicName, int? queueCount, String? serviceClassId, String? stackType, String? subnetwork, int? vlan}) - NetworkInterface.fromJson(Object? j)
-
factory
Properties
-
accessConfigs
→ List<
AccessConfig> -
An array of configurations for this interface. Currently, only one access
config, ONE_TO_ONE_NAT, is supported. If there are noaccessConfigs specified, then this instance will have
no external internet access.
final
-
aliasIpRanges
→ 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
-
aliasIpv6Ranges
→ List<
AliasIpRange> -
An array of alias IPv6 ranges for this network interface.
You can only specify this field for network interfaces in VPC networks.
final
- enableVpcScopedDns → bool?
-
Optional. If true, DNS resolution will be enabled over this interface. Only valid
with network_attachment.
final
- fingerprint → String?
-
Fingerprint hash of contents stored in this network interface.
This field will be ignored when inserting an Instance or
adding a NetworkInterface. An up-to-date
fingerprint must be provided in order to update theNetworkInterface. The request will fail with error400 Bad Request if the fingerprint is not provided, or412 Precondition Failed if the fingerprint is out of date.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- igmpQuery → String?
-
Indicate whether igmp query is enabled on the network interface
or not. If enabled, also indicates the version of IGMP supported.
Check the IgmpQuery enum for the list of possible values.
final
- internalIpv6PrefixLength → int?
-
The prefix length of the primary internal IPv6 range.
final
-
ipv6AccessConfigs
→ 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
- ipv6AccessType → String?
-
Output only.
Output OnlyOne of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork.final - ipv6Address → 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
- kind → String?
-
Output only.
Output OnlyType of the resource. Alwayscompute#networkInterface for network interfaces.final - name → String?
-
Output OnlyThe name of the network interface, which is generated by the server. For a VM, the network interface uses the nicN naming format. Where N is a value between 0 and7. The default interface value is nic0.final - network → 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.
final
- networkAttachment → 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 → 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 → String?
-
The type of vNIC to be used on this interface. This may be gVNIC or
VirtioNet.
Check the NicType enum for the list of possible values.
final
- parentNicName → String?
-
Name of the parent network interface of a dynamic network interface.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - queueCount → 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
- serviceClassId → String?
-
Optional. Producer Service's Service class Id for the region of this network
interface. Can only be used with network_attachment. It is not possible to
use on its own however, network_attachment can be used without
service_class_id.
final
- stackType → String?
-
The stack type for this network interface. To assign only IPv4 addresses,
use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, useIPV4_IPV6. If not specified, IPV4_ONLY is used.
final
- subnetwork → String?
-
The URL of the Subnetwork resource for this instance. If the network
resource is inlegacy
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:
final
- vlan → int?
-
VLAN tag of a dynamic network interface, must be an integer in the range
from 2 to 255 inclusively.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String