@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class PublicIp extends ExplicitlySetBmcModel
A public IP is a conceptual term that refers to a public IP address and related properties.
The publicIp
object is the API representation of a public IP.
There are two types of public IPs: 1. Ephemeral 2. Reserved
For more information and comparison of the two types,
see [Public IP Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm).
Note: Objects should always be created or deserialized using the PublicIp.Builder
. This model distinguishes fields
that are null
because they are unset from fields that are explicitly set to null
. This is done in
the setter methods of the PublicIp.Builder
, which maintain a set of all explicitly set fields called
ExplicitlySetBmcModel.__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take
ExplicitlySetBmcModel.__explicitlySet__
into account. The constructor, on the other hand, does not set ExplicitlySetBmcModel.__explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
PublicIp.Builder |
static class |
PublicIp.LifecycleState
The public IP’s current state.
|
static class |
PublicIp.Lifetime
Defines when the public IP is deleted and released back to Oracle’s public IP pool.
|
static class |
PublicIp.Scope
Whether the public IP is regional or specific to a particular availability domain.
|
Constructor and Description |
---|
PublicIp(String availabilityDomain,
String compartmentId,
Map<String,Map<String,Object>> definedTags,
String displayName,
Map<String,String> freeformTags,
String id,
String ipAddress,
PublicIp.LifecycleState lifecycleState,
PublicIp.Lifetime lifetime,
String privateIpId,
PublicIp.Scope scope,
Date timeCreated)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static PublicIp.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
String |
getAvailabilityDomain()
The public IP’s availability domain.
|
String |
getCompartmentId()
The OCID of the compartment containing the public IP.
|
Map<String,Map<String,Object>> |
getDefinedTags()
Defined tags for this resource.
|
String |
getDisplayName()
A user-friendly name.
|
Map<String,String> |
getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope.
|
String |
getId()
The public IP’s Oracle ID (OCID).
|
String |
getIpAddress()
The public IP address of the
publicIp object. |
PublicIp.LifecycleState |
getLifecycleState()
The public IP’s current state.
|
PublicIp.Lifetime |
getLifetime()
Defines when the public IP is deleted and released back to Oracle’s public IP pool.
|
String |
getPrivateIpId()
The OCID of the private IP that the public IP is currently assigned to, or in the
process of being assigned to.
|
PublicIp.Scope |
getScope()
Whether the public IP is regional or specific to a particular availability domain.
|
Date |
getTimeCreated()
The date and time the public IP was created, in the format defined by RFC3339.
|
int |
hashCode() |
PublicIp.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"availabilityDomain","compartmentId","definedTags","displayName","freeformTags","id","ipAddress","lifecycleState","lifetime","privateIpId","scope","timeCreated"}) public PublicIp(String availabilityDomain, String compartmentId, Map<String,Map<String,Object>> definedTags, String displayName, Map<String,String> freeformTags, String id, String ipAddress, PublicIp.LifecycleState lifecycleState, PublicIp.Lifetime lifetime, String privateIpId, PublicIp.Scope scope, Date timeCreated)
public static PublicIp.Builder builder()
Create a new builder.
public PublicIp.Builder toBuilder()
public String getAvailabilityDomain()
The public IP’s availability domain. This property is set only for ephemeral public IPs
(that is, when the scope
of the public IP is set to AVAILABILITY_DOMAIN). The value
is the availability domain of the assigned private IP.
Example: Uocm:PHX-AD-1
public String getCompartmentId()
The OCID of the compartment containing the public IP. For an ephemeral public IP, this is the same compartment as the private IP’s. For a reserved public IP that is currently assigned, this can be a different compartment than the assigned private IP’s.
public Map<String,Map<String,Object>> getDefinedTags()
Defined tags for this resource. Each key is predefined and scoped to a namespace.
Example: {"foo-namespace": {"bar-key": "value"}}
public String getDisplayName()
A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
public Map<String,String> getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
Example: {"bar-key": "value"}
public String getIpAddress()
The public IP address of the publicIp
object.
Example: 203.0.113.2
public PublicIp.LifecycleState getLifecycleState()
The public IP’s current state.
public PublicIp.Lifetime getLifetime()
Defines when the public IP is deleted and released back to Oracle’s public IP pool.
EPHEMERAL
: The lifetime is tied to the lifetime of its assigned private IP. The
ephemeral public IP is automatically deleted when its private IP is deleted, when
the VNIC is terminated, or when the instance is terminated. An ephemeral
public IP must always be assigned to a private IP.
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.
For more information and comparison of the two types, see [Public IP Addresses](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingpublicIPs.htm).
public String getPrivateIpId()
The OCID of the private IP that the public IP is currently assigned to, or in the process of being assigned to.
public PublicIp.Scope getScope()
Whether the public IP is regional or specific to a particular availability domain.
REGION
: The public IP exists within a region and can be assigned to a private IP
in any availability domain in the region. Reserved public IPs have scope
= REGION
.
AVAILABILITY_DOMAIN
: The public IP exists within the availability domain of the private IP
it's assigned to, which is specified by the availabilityDomain
property of the public IP object.
Ephemeral public IPs have scope
= AVAILABILITY_DOMAIN
.
public Date getTimeCreated()
The date and time the public IP was created, in the format defined by RFC3339.
Example: 2016-08-25T21:10:29.600Z
public String toString()
toString
in class ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class ExplicitlySetBmcModel
public int hashCode()
hashCode
in class ExplicitlySetBmcModel
Copyright © 2016–2023. All rights reserved.