Use the set operation to change IP address type, and/or assign an SSL certificate to it.
Note: You cannot change type of IP address from shared to exclusive if it is assigned to two or more resellers/customers.
A request XML packet changing the IP address type includes the set operation node:
<packet>
<ip>
<set>
...
</set>
</ip>
</packet>
The set node graphical representation is as follows:
Specifies the filtering rule. Data type: ipFilterType (ip_input.xsd
).
Specifies the IP address to be updated. Data type: ip_address (common.xsd
).
Specifies the type of IP address. Data type: ipType (plesk_common.xsd
). Allowed values: shared | exclusive.
Specifies the name of certificate to be assigned to the IP address. Data type: string.
common.xsd
).ip_input.xsd
).
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The set node of the output XML packet is structured as follows:
Wraps the response retrieved from the server.
Specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
Returns the error code. Data type: unsignedInt.
Returns the error message . Data type: string.
Returns the IP address which was updated. Data type: ip_address (common.xsd
).
This packet assigns a public IP address to 192.168.0.1.
<packet>
<ip>
<set>
<filter>
<ip_address>192.168.0.1</ip_address>
</filter>
<public_ip_address>123.123.123.123</public_ip_address>
</set>
</ip>
</packet>
Response:
<packet>
<ip>
<set>
<result>
<status>ok</status>
<ip_address>192.0.2.1</ip_address>
</result>
</set>
</ip>
</packet>
This packet changes the type of 123.123.123.123 IP address to exclusive.
<packet>
<ip>
<set>
<filter>
<ip_address>10.58.103.100</ip_address>
</filter>
<type>exclusive</type>
</set>
</ip>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<ip>
<set>
<result>
<status>ok</status>
<ip_address>10.58.103.100</ip_address>
</result>
</set>
</ip>
</packet>
This packet changes the type of IP addresses 123.123.123.123 and 123.123.123.124 to exclusive.
<packet>
<ip>
<set>
<filter>
<ip_address>123.123.123.123</ip_address>
<ip_address>123.123.123.124</ip_address>
</filter>
<type>exclusive</type>
</set>
</ip>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<ip>
<set>
<result>
<status>ok</status>
<ip_address>123.123.123.123</ip_address>
</result>
<result>
<status>ok</status>
<ip_address>123.123.123.124</ip_address>
</result>
</set>
</ip>
</packet>
This packet assigns SSL certificate named Common to IP address 123.123.123.123.
<packet>
<ip>
<set>
<filter>
<ip_address>123.123.123.123</ip_address>
</filter>
<certificate_name>Common</certificate_name>
</set>
</ip>
</packet>