UpdatePublicIp
PUT {{baseUrl}}/publicIps/:publicIpId
Updates the specified public IP. You must specify the object's OCID. Use this operation if you want to:
- Assign a reserved public IP in your pool to a private IP.
- Move a reserved public IP to a different private IP.
- Unassign a reserved public IP from a private IP (which returns it to your pool of reserved public IPs).
- Change the display name or tags for a public IP.
Assigning, moving, and unassigning a reserved public IP are asynchronous
operations. Poll the public IP's lifecycleState
to determine if the operation
succeeded.
Note: When moving a reserved public IP, the target private IP
must not already have a public IP with lifecycleState
= ASSIGNING or ASSIGNED. If it
does, an error is returned. Also, the initial unassignment from the original
private IP always succeeds, but the assignment to the target private IP is asynchronous and
could fail silently (for example, if the target private IP is deleted or has a different public IP
assigned to it in the interim). If that occurs, the public IP remains unassigned and its
lifecycleState
switches to AVAILABLE (it is not reassigned to its original private IP).
You must poll the public IP's lifecycleState
to determine if the move succeeded.
Regarding ephemeral public IPs:
- If you want to assign an ephemeral public IP to a primary private IP, use CreatePublicIp.
- You can't move an ephemeral public IP to a different private IP.
- If you want to unassign an ephemeral public IP from its private IP, use DeletePublicIp, which unassigns and deletes the ephemeral public IP.
Note: If a public IP is assigned to a secondary private IP (see PrivateIp), and you move that secondary private IP to another VNIC, the public IP moves with it.
Note: There's a limit to the number of public IPs a VNIC or instance can have. If you try to move a reserved public IP to a VNIC or instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see Public IP Addresses.
Request Body
{"displayName"=>"est exercitation proident voluptate", "privateIpId"=>"proident magna sunt elit"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
if-match | string | For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match | |
parameter to the value of the etag from a previous GET or POST response for that resource. The resource | |||
will be updated or deleted only if the etag you provide matches the resource's current etag value. | |||
Content-Type | string | ||
Date | string | (Required) Current Date | |
Authorization | string | (Required) Signature Authentication on Authorization header | |
x-content-sha256 | string | (Required) Content sha256 for POST, PUT and PATCH operations |
RESPONSES
status: OK
{"assignedEntityId":"eu reprehenderit aliquip nulla","assignedEntityType":"NAT_GATEWAY","availabilityDomain":"irure commodo","compartmentId":"est dolor proident","definedTags":{},"displayName":"ipsum quis dolore","freeformTags":{},"id":"sint commodo dolor culpa","ipAddress":"dolore quis esse aliqua","lifecycleState":"UNASSIGNED","lifetime":"EPHEMERAL","privateIpId":"non in consectetur laborum nostrud","publicIpPoolId":"quis aliquip anim","scope":"REGION","timeCreated":"1986-03-06T20:25:38.760Z"}