PrivateIp¶
- class oci.vn_monitoring.models.PrivateIp(**kwargs)¶
Bases:
objectA private IP is a conceptual term that refers to an IPv4 private IP address and related properties. The privateIp object is the API representation of a private IP.
Note: For information about IPv6 addresses, see
Ipv6.Each instance has a primary private IP that is automatically created and assigned to the primary VNIC during instance launch. If you add a secondary VNIC to the instance, it also automatically gets a primary private IP. You can’t remove a primary private IP from its VNIC. The primary private IP is automatically deleted when the VNIC is terminated.
You can add secondary private IPs to a VNIC after it’s created. For more information, see the privateIp operations and also IP Addresses.
Note: Only
list_private_ips()andget_private_ip()work with primary private IPs. To create and update primary private IPs, you instead work with instance and VNIC operations. For example, a primary private IP’s properties come from the values you specify inCreateVnicDetailswhen calling eitherlaunch_instance()orattach_vnic(). To update the hostname for a primary private IP, you useupdate_vnic().To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see Getting Started with Policies.
Methods:
__init__(**kwargs)Initializes a new PrivateIp object with values from keyword arguments.
Attributes:
Gets the availability_domain of this PrivateIp.
Gets the compartment_id of this PrivateIp.
Gets the defined_tags of this PrivateIp.
Gets the display_name of this PrivateIp.
Gets the freeform_tags of this PrivateIp.
Gets the hostname_label of this PrivateIp.
Gets the id of this PrivateIp.
Gets the ip_address of this PrivateIp.
Gets the is_primary of this PrivateIp.
Gets the subnet_id of this PrivateIp.
Gets the time_created of this PrivateIp.
Gets the vnic_id of this PrivateIp.
- __init__(**kwargs)¶
Initializes a new PrivateIp object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
availability_domain (str) – The value to assign to the availability_domain property of this PrivateIp.
compartment_id (str) – The value to assign to the compartment_id property of this PrivateIp.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this PrivateIp.
display_name (str) – The value to assign to the display_name property of this PrivateIp.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this PrivateIp.
hostname_label (str) – The value to assign to the hostname_label property of this PrivateIp.
id (str) – The value to assign to the id property of this PrivateIp.
ip_address (str) – The value to assign to the ip_address property of this PrivateIp.
is_primary (bool) – The value to assign to the is_primary property of this PrivateIp.
subnet_id (str) – The value to assign to the subnet_id property of this PrivateIp.
time_created (datetime) – The value to assign to the time_created property of this PrivateIp.
vnic_id (str) – The value to assign to the vnic_id property of this PrivateIp.
- property availability_domain¶
Gets the availability_domain of this PrivateIp. The private IP’s availability domain.
Example: Uocm:PHX-AD-1
- Returns
The availability_domain of this PrivateIp.
- Return type
str
- property compartment_id¶
Gets the compartment_id of this PrivateIp. The OCID of the compartment containing the private IP.
- Returns
The compartment_id of this PrivateIp.
- Return type
str
- property defined_tags¶
Gets the defined_tags of this PrivateIp. Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}
- Returns
The defined_tags of this PrivateIp.
- Return type
dict(str, dict(str, object))
- property display_name¶
Gets the display_name of this PrivateIp. A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
- Returns
The display_name of this PrivateIp.
- Return type
str
- property freeform_tags¶
Gets the freeform_tags of this PrivateIp. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {“bar-key”: “value”}
- Returns
The freeform_tags of this PrivateIp.
- Return type
dict(str, str)
- property hostname_label¶
Gets the hostname_label of this PrivateIp. The hostname for the private IP. Used for DNS. The value is the hostname portion of the private IP’s fully qualified domain name (FQDN) (for example, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123.
For more information, see DNS in Your Virtual Cloud Network.
Example: bminstance1
- Returns
The hostname_label of this PrivateIp.
- Return type
str
- property id¶
Gets the id of this PrivateIp. The private IP’s Oracle ID (OCID).
- Returns
The id of this PrivateIp.
- Return type
str
- property ip_address¶
Gets the ip_address of this PrivateIp. The private IP address of the privateIp object. The address is within the CIDR of the VNIC’s subnet.
Example: 10.0.3.3
- Returns
The ip_address of this PrivateIp.
- Return type
str
- property is_primary¶
Gets the is_primary of this PrivateIp. Whether this private IP is the primary one on the VNIC. Primary private IPs are unassigned and deleted automatically when the VNIC is terminated.
Example: true
- Returns
The is_primary of this PrivateIp.
- Return type
bool
- property subnet_id¶
Gets the subnet_id of this PrivateIp. The OCID of the subnet the VNIC is in.
- Returns
The subnet_id of this PrivateIp.
- Return type
str