REST API - change-task

appliance networking: change-task

Changes the Hostname/IP of the management network of vCenter appliance. The Hostname/IP change invokes the PNID change process which involves LDAP entry modification, updating registry entries, configuration files modification and network configuration changes. vCenter server is expected to be down for few minutes during these changes. This operation was added in vSphere API 6.7.3.

Request:

HTTP request

POST https://{server}/rest/appliance/networking?action=change&vmw-task=true

Request Body Structure:

{
    "spec"{
        "hostname""string",
        "ipv4"{
            "mode""DHCP",
            "default_gateway""string",
            "address""string",
            "prefix"1
        },
        "ipv6"{
            "default_gateway""string",
            "addresses"[
                {
                    "address""string",
                    "prefix"1
                },
                {
                    "address""string",
                    "prefix"1
                }
            ],
            "autoconf"true,
            "dhcp"true
        },
        "dns"{
            "mode""dhcp",
            "servers"[
                "string",
                "string"
            ]
        },
        "SSO_user""string",
        "SSO_password""secret string"
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec change_spec Information required to change the hostname.
spec.hostname string New hostname to assign to the management network of vCenter appliance. This attribute was added in vSphere API 6.7.3.

spec.SSO_user string vCenter Server SSO administrator username. This attribute was added in vSphere API 6.7.3.

spec.SSO_password secret vCenter Server SSO administrator Password. This attribute was added in vSphere API 6.7.3.

spec.dns DNS_server_config DNS Configuration to set for the machine. This attribute was added in vSphere API 6.7.3.

Optional. If unset DNS settings will not be changed.

spec.dns.mode string Define how to determine the DNS servers. Leave the servers argument empty if the mode argument is "DHCP". Set the servers argument to a comma-separated list of DNS servers if the mode argument is "static". The DNS server are assigned from the specified list.

Describes DNS Server source (DHCP,static) Value is one of:
dhcp: DNS address is automatically assigned by a DHCP server.
is_static: DNS address is static.

spec.dns.servers string[] List of the currently used DNS servers.

spec.ipv4 config IPv4 Configuration to set for the machine. This attribute was added in vSphere API 6.7.3.

Optional. If unset IPv4 settings will not be changed.

spec.ipv4.mode string The Address assignment mode. This attribute was added in vSphere API 6.7.

Defines different IPv4 address assignment modes. This enumeration was added in vSphere API 6.7. Value is one of:
DHCP: The IPv4 address is automatically assigned by a DHCP server. This constant was added in vSphere API 6.7.
STATIC: The IPv4 address is static. This constant was added in vSphere API 6.7.
UNCONFIGURED: The IPv4 protocol is not configured. This constant was added in vSphere API 6.7.

spec.ipv4.address string The IPv4 address, for example, "10.20.80.191". This attribute was added in vSphere API 6.7.

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

spec.ipv4.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 6.7.

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

spec.ipv4.default_gateway string The IPv4 address of the default gateway. This configures the global default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7.

Optional. If unset, the defaultGateway was never set.

spec.ipv6 config IPv6 Configuration to set for the machine. This attribute was added in vSphere API 6.7.3.

Optional. If unset IPv6 settings will not be changed.

spec.ipv6.dhcp boolean An address will be assigned by a DHCP server. This attribute was added in vSphere API 6.7.

spec.ipv6.autoconf boolean An address will be assigned by Stateless Address Autoconfiguration (SLAAC). This attribute was added in vSphere API 6.7.

spec.ipv6.addresses address[] The list of addresses to be statically assigned. This attribute was added in vSphere API 6.7.

spec.ipv6.default_gateway string The default gateway for static IP address assignment. This configures the global IPv6 default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7.

Response:

HTTP Status Code: 200

Representation:

{
    "value""obj-103"
}

Response Type:

Name Type Description
bold = required
value string

Errors:

HTTP Status Code Type Description
400 unsupported if it's not embedded node
400 invalid_argument if passed arguments are invalid.
401 unauthenticated if the user is not authenticated.
400 not_allowed_in_current_state if another change task is in progress