Class NetworkInterface (1.4.0)

NetworkInterface(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A network interface resource attached to an instance.

Attributes

NameDescription
access_configs Sequence[google.cloud.compute_v1.types.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.
alias_ip_ranges Sequence[google.cloud.compute_v1.types.AliasIpRange]
An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
fingerprint str
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 the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date. This field is a member of oneof_ _fingerprint.
internal_ipv6_prefix_length int
The prefix length of the primary internal IPv6 range. This field is a member of oneof_ _internal_ipv6_prefix_length.
ipv6_access_configs Sequence[google.cloud.compute_v1.types.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.
ipv6_access_type str
[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork. Valid only if stackType is IPV4_IPV6. Check the Ipv6AccessType enum for the list of possible values. This field is a member of oneof_ _ipv6_access_type.
ipv6_address str
An IPv6 internal network address for this network interface. This field is a member of oneof_ _ipv6_address.
kind str
[Output Only] Type of the resource. Always compute#networkInterface for network interfaces. This field is a member of oneof_ _kind.
name str
[Output Only] The 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 and 7. The default interface value is nic0. This field is a member of oneof_ _name.
network str
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 This field is a member of oneof_ _network.
network_i_p str
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. This field is a member of oneof_ _network_i_p.
nic_type str
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. This field is a member of oneof_ _nic_type.
queue_count 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. This field is a member of oneof_ _queue_count.
stack_type str
The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used. This field can be both set at instance creation and update network interface operations. Check the StackType enum for the list of possible values. This field is a member of oneof_ _stack_type.
subnetwork str
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 This field is a member of oneof_ _subnetwork.

Classes

Ipv6AccessType

Ipv6AccessType(value)

[Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork. Valid only if stackType is IPV4_IPV6.

NicType

NicType(value)

The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.

StackType

StackType(value)

The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used. This field can be both set at instance creation and update network interface operations.