vcenter guest: ipv4

The ipv4 structure specifies the IPv4 settings that need to be applied to a virtual network adapter. This structure was added in vSphere API 7.0.0.0.

Representation:

{
    "gateways"[
        "string",
        "string"
    ],
    "prefix"1,
    "ip_address""string",
    "type""DHCP"
}

Attributes:

Name Type Description
Required
type string The type of the IPv4 configuration. This attribute was added in vSphere API 7.0.0.0.

Specifies different types of the IPv4 configuration. This enumeration was added in vSphere API 7.0.0.0. Value is one of:
DHCP: DHCP configuration. This constant was added in vSphere API 7.0.0.0.
STATIC: Static configuration. This constant was added in vSphere API 7.0.0.0.
USER_INPUT_REQUIRED: Indicates that the IPv4 settings are not specified in advance. The user must provide a valid value when the actual customization spec is applied to a virtual machine. This constant was added in vSphere API 7.0.0.0.

Optional
ip_address string The static IPv4 address. This attribute was added in vSphere API 7.0.0.0.

Optional. It is only relevant when type has value STATIC. This field is optional and it is only relevant when the value of type is STATIC.

prefix long The IPv4 CIDR prefix, for example, 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. This attribute was added in vSphere API 7.0.0.0.

Optional. It is only relevant when type has value STATIC. This field is optional and it is only relevant when the value of type is STATIC.

gateways string[] Gateways for the IPv4 address. This attribute was added in vSphere API 7.0.0.0.

Optional. If unset, no gateways are set.