CreatePublicIp
/20160918/publicIps
For an ephemeral public IP assigned to a private IP, also specify privateIpId with the OCID of the primary private IP that you want to assign the public IP to. An ephemeral public IP must always be assigned to a private IP, and only to the primary private IP on a VNIC, not to a secondary private IP. Exception: If you create a NatGateway, the NAT gateway is automatically assigned a regional ephemeral public IP that you cannot remove.
For a reserved public IP, you can also optionally assign the public IP to a private IP by specifying privateIpId, or you can later assign the public IP with UpdatePublicIp.
Note: When assigning a public IP to a private IP, the private IP must not already have a public IP with lifecycleState = ASSIGNING or ASSIGNED. If it does, an error is returned. Also, for reserved public IPs, the optional assignment part of this operation is asynchronous. Poll the public IP's lifecycleState to determine whether the assignment succeeded.
Request
- application/json
-
opc-retry-token: string
Minimum Length:
1
Maximum Length:64
A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
object
-
compartmentId(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment to contain the public IP. For ephemeral public IPs, you must set this to the private IP's compartment OCID. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace.
-
displayName:
string
Minimum Length:
1
Maximum Length:255
A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
lifetime(required):
string
Allowed Values:
[ "EPHEMERAL", "RESERVED" ]
Defines when the public IP is deleted and released back to the appliance public IP pool. -
privateIpId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the private IP to assign the public IP to. Required for an ephemeral public IP because it must always be assigned to a private IP, specifically a primary private IP. Optional for a reserved public IP. If you don't provide it, the public IP is created but not assigned to a private IP. You can later assign the public IP with UpdatePublicIp. -
publicIpPoolId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the public IP pool.
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace.
object
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
Response
- application/json
200 Response
-
etag: string
For optimistic concurrency control. See if-match.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
assignedEntityId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the entity the public IP is assigned to, or in the process of being assigned to. -
assignedEntityType:
string
Allowed Values:
[ "PRIVATE_IP", "NAT_GATEWAY" ]
The type of entity the public IP is assigned to, or in the process of being assigned to. -
availabilityDomain:
string
Minimum Length:
1
Maximum Length:255
The public IP's availability domain. This property is set only for ephemeral public IPs that are assigned to a private IP (when the scope of the public IP is set to AVAILABILITY_DOMAIN). The value is the availability domain of the assigned private IP. Example: AD-1 -
compartmentId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment containing the public IP. For an ephemeral public IP, this is the compartment of its assigned entity (which can be a private IP or a regional entity such as a NAT gateway). For a reserved public IP that is currently assigned, its compartment can be different from the assigned private IP's. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
displayName:
string
Minimum Length:
1
Maximum Length:255
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
id:
string
Minimum Length:
1
Maximum Length:255
The public IP's OCID. -
ipAddress:
string
The public IP address of the publicIp object. Example: 203.0.113.2
-
lifecycleState:
string
Allowed Values:
[ "PROVISIONING", "AVAILABLE", "ASSIGNING", "ASSIGNED", "UNASSIGNING", "UNASSIGNED", "TERMINATING", "TERMINATED" ]
The public IP's current state. -
lifetime:
string
Allowed Values:
[ "EPHEMERAL", "RESERVED" ]
Defines when the public IP is deleted and released back to the public IP pool. EPHEMERAL: The lifetime is tied to the lifetime of its assigned entity. An ephemeral public IP must always be assigned to an entity. If the assigned entity is a private IP, the ephemeral public IP is automatically deleted when the private IP is deleted, when the VNIC is terminated, or when the instance is terminated. If the assigned entity is a NatGateway, the ephemeral public IP is automatically deleted when the NAT gateway is terminated. RESERVED: You control the public IP's lifetime. You can delete a reserved public IP whenever you like. It does not need to be assigned to a private IP at all times. -
privateIpId:
string
Minimum Length:
1
Maximum Length:255
Deprecated. Use assignedEntityId instead. The OCID of the private IP that the public IP is currently assigned to, or in the process of being assigned to. Note: This is null if the public IP is not assigned to a private IP, or is in the process of being assigned to one. -
publicIpPoolId:
string
Minimum Length:
1
Maximum Length:255
The OCID of the pool object created in the current tenancy. -
scope:
string
Allowed Values:
[ "REGION", "AVAILABILITY_DOMAIN" ]
Whether the public IP is regional or specific to a particular availability domain. REGION - The public IP exists within a region and is assigned to a regional entity (such as a NatGateway), or can be assigned to a private IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs assigned to a regional entity have scope = REGION. AVAILABILITY_DOMAIN - The public IP exists within the availability domain of the entity it's assigned to, which is specified by the availabilityDomain property of the public IP object. Ephemeral public IPs that are assigned to private IPs have scope = AVAILABILITY_DOMAIN. -
timeCreated:
string(date-time)
The date and time the public IP was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
object
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
object
object
-
object additionalProperties
The value of the tag. Only the String type is supported.
object
400 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
401 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
409 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
object
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload