A network interface resource attached to an instance.
JSON representation |
---|
{ "kind": string, "network": string, "subnetwork": string, "networkIP": string, "ipv6Address": string, "internalIpv6PrefixLength": integer, "name": string, "accessConfigs": [ { object ( |
Fields | |
---|---|
kind |
[Output Only] Type of the resource. Always
for network interfaces. |
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
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:
|
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:
|
network |
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. |
ipv6 |
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. |
internal |
The prefix length of the primary internal IPv6 range. |
name |
[Output Only] The name of the network interface, which is generated by the server. For a VM, the network interface uses the
naming format. Where
is a value between
and
. The default interface value is
. |
access |
An array of configurations for this interface. Currently, only one access config,
, is supported. If there are no
specified, then this instance will have no external internet access. |
ipv6 |
An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config,
, is supported. If there is no
specified, then this instance will have no external IPv6 Internet access. |
alias |
An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks. |
fingerprint |
Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an
or adding a
. An up-to-date fingerprint must be provided in order to update the
. The request will fail with error
if the fingerprint is not provided, or
if the fingerprint is out of date. A base64-encoded string. |
stack |
The stack type for this network interface. To assign only IPv4 addresses, use IPV4_ONLY. To assign both IPv4 and IPv6 addresses, use
. If not specified,
is used. This field can be both set at instance creation and update network interface operations. |
ipv6 |
[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
is
. |
queue |
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. |
nic |
The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. |
network |
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}. |
AccessConfig
An access configuration attached to an instance's network interface. Only one access config per instance is supported.
JSON representation |
---|
{ "kind": string, "type": enum ( |
Fields | |
---|---|
kind |
[Output Only] Type of the resource. Always
for access configs. |
type |
The type of configuration. In
(IPv4), the default and only option is
. In
, the default and only option is
. |
name |
The name of this access configuration. In
(IPv4), the default and recommended name is
, but you can use any arbitrary string, such as
or
. In
, the recommend name is
. |
nat |
Applies to
(IPv4) only. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
external |
Applies to
only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in
in
. To use a static external 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 external IPv6 address from the instance's subnetwork. |
external |
Applies to
only. The prefix length of the external IPv6 range. |
set |
Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in
. A default PTR record will be created if the VM has external IPv6 range associated. |
public |
The DNS domain name for the public PTR record. You can set this field only if the
. If this field is unspecified in
, a default PTR record will be created for first IP in associated external IPv6 range. |
network |
This signifies the networking tier used for configuring this access configuration and can only take the following values:
,
. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
security |
[Output Only] The resource URL for the security policy associated with this access config. |
AccessType
Enums | |
---|---|
ONE_TO_ONE_NAT |
|
DIRECT_IPV6 |
AliasIpRange
An alias IP range attached to an instance's network interface.
JSON representation |
---|
{ "ipCidrRange": string, "subnetworkRangeName": string } |
Fields | |
---|---|
ip |
The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as
), a netmask (such as
) or a CIDR-formatted string (such as
). |
subnetwork |
The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used. |
StackType
Enums | |
---|---|
IPV4_ONLY |
The network interface will only be assigned IPv4 addresses. |
IPV4_IPV6 |
The network interface can have both IPv4 and IPv6 addresses. |
IPV6_ONLY |
The network interface will only be assigned IPv6 addresses. |
Ipv6AccessType
Enums | |
---|---|
INTERNAL |
This network interface can have internal IPv6. |
EXTERNAL |
This network interface can have external IPv6. |