Updating IP Address Properties

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.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

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:

ip-set-input

  • filter, required

    Specifies the filtering rule. Data type: ipFilterType (ip_input.xsd).

  • ip_address, required

    Specifies the IP address to be updated. Data type: ip_address (common.xsd).

  • Either type or certificate_name or public_ip_address element is required.
    • type, optional

      Specifies the type of IP address. Data type: ipType (plesk_common.xsd). Allowed values: shared | exclusive.

    • certificate_name, optional

      Specifies the name of certificate to be assigned to the IP address. Data type: string.

    • public_ip_address, required. For Plesk servers behind NAT you can match private IP addresses to corresponding public ones. This node specifies the public IP address corresponding to the IP address that you are editing. Data type: ip_address (common.xsd).
  • service-node, optional. It specifies the service node. Data type: serviceNodeSpecType (ip_input.xsd).

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The set node of the output XML packet is structured as follows:

  • result, required

    Wraps the response retrieved from the server.

  • status, required

    Specifies the execution status of the operation. Data type: string. Allowed values: ok | error.

  • errcode, required if the operation fails

    Returns the error code. Data type: unsignedInt.

  • errtext, required if the operation fails

    Returns the error message . Data type: string.

  • id_address, optional

    Returns the IP address which was updated. Data type: ip_address (common.xsd).

 

 

Samples

Assigning a public IP address to an internal IP address

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>
Changing type of a single IP address

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>
Changing type of multiple IP addresses

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>
Assigning a certificate to an IP address

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> 
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.