Removing the Public IP Address of an Instance

To deny access to an instance over the public Internet, you can delete the public IP address associated with the instance. An IP association is a link between a public IP address and the vcable of an instance. To remove the public IP associated with an instance, find the IP association that links the vcable of the instance to the public IP address, and then delete it. If you had permanently reserved an public IP address for this instance, you can also delete that too.

Task Procedure / REST API Call
1. Find out the vcable ID of the instance. GET /instance/{name}

In the response, note the value of the vcable_id parameter.

2. Get the IP association for the vcable ID that you noted in step 1. GET /ip/association/{container}/

In the request URI, append vcable and the value of the vcable that you have retrieved in step 1.

In the response, note the three-part name of the IP association.

3. Get the three-part name of the IP reservation that is associated with the instance using the IP association that you have noted in step 2. GET /ip/association/{name}

In the response, note the three-part name of the IP reservation.

4. Delete the IP association that you noted in step 2. DELETE /ip/association/{name}
5. (Optional.) Delete the IP reservation that you noted in step 3. If the IP reservation is permanent, you can delete it if you no longer want the IP reservation. If the IP reservation not permanent, it is automatically deleted when the IP association is deleted.


If you delete an IP reservation that is referenced in an orchestration that controls this instance then, if you stop and restart the orchestration, the instance won't be created.
DELETE /ip/reservation/{name}

If you had launched this instance using an orchestration, the instance will be created again when the orchestration is stopped and started. If you had specified a public IP address for the instance in the orchestration, the relaunched instance will be associated with an IP address. You can update the orchestration to remove public IP address for an instance. See PUT /orchestration/{name}.

See Also:

About Public IP Addresses in Using Oracle Cloud Infrastructure Compute Classic.