private_ips
Creates, updates, deletes, gets or lists a private_ips resource.
Overview​
| Name | private_ips |
| Type | Resource |
| Id | oci.network.private_ips |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The private IP.
| Name | Datatype | Description |
|---|---|---|
id | string | The private IP's Oracle ID ([OCID](/iaas/Content/General/Concepts/identifiers.htm)). |
availabilityDomain | string | The private IP's availability domain. This attribute will be null if this is a secondary private IP assigned to a VNIC that is in a regional subnet. Example: Uocm:PHX-AD-1 |
cidrPrefixLength | integer | The secondary IPv4 CIDR prefix length. |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the private IP. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
hostnameLabel | string | 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](https:​//tools.ietf.org/html/rfc952) and [RFC 1123](https:​//tools.ietf.org/html/rfc1123). For more information, see [DNS in Your Virtual Cloud Network](/iaas/Content/Network/Concepts/dns.htm). Example: bminstance1 |
ipAddress | string | The private IP address of the privateIp object. The address is within the CIDR of the VNIC's subnet. However, if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution, the address is from the range specified by the cidrBlock attribute for the VLAN. See [Vlan](#/en/iaas/latest/Vlan). Example: 10.0.3.3 |
ipState | string | State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED, otherwise it is AVAILABLE. (ASSIGNED, AVAILABLE) |
ipv4SubnetCidrAtCreation | string | Ipv4 Subnet CIDR specified whn creating the PrivateIP. |
isPrimary | boolean | 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 |
lifetime | string | Lifetime of the IP address. There are two types of IPs: - Ephemeral - Reserved (EPHEMERAL, RESERVED) |
routeTableId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see [Per-resource Routing](https:​//docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). |
subnetId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. However, if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution, the subnetId is null. |
timeCreated | string (date-time) | The date and time the private IP was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
vlanId | string | Applicable only if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution. The vlanId is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. See [Vlan](#/en/iaas/latest/Vlan). |
vnicId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VNIC the private IP is assigned to. The VNIC and private IP must be in the same subnet. However, if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution, the vnicId is null. |
A private IP is a conceptual term that refers to an IPv4 private IP address and related properties.<br />The privateIp object is the API representation of a private IP.<br /><br />Note: For information about IPv6 addresses, see [Ipv6](#/en/iaas/latest/Ipv6/).<br /><br />Each instance has a primary private IP that is automatically created and<br />assigned to the primary VNIC during instance launch. If you add a secondary<br />VNIC to the instance, it also automatically gets a primary private IP. You<br />can't remove a primary private IP from its VNIC. The primary private IP is<br />automatically deleted when the VNIC is terminated.<br /><br />You can add secondary private IPs to a VNIC after it's created. For more<br />information, see the privateIp operations and also<br />[IP Addresses](/iaas/Content/Network/Tasks/managingIPaddresses.htm).<br /><br />Note: Only<br />[ListPrivateIps](#/en/iaas/latest/PrivateIp/ListPrivateIps) and<br />[GetPrivateIp](#/en/iaas/latest/PrivateIp/GetPrivateIp) work with<br />primary private IPs. To create and update primary private IPs, you instead<br />work with instance and VNIC operations. For example, a primary private IP's<br />properties come from the values you specify in<br />[CreateVnicDetails](#/en/iaas/latest/CreateVnicDetails/) when calling either<br />[LaunchInstance](#/en/iaas/latest/Instance/LaunchInstance) or<br />[AttachVnic](#/en/iaas/latest/VnicAttachment/AttachVnic). To update the hostname<br />for a primary private IP, you use [UpdateVnic](#/en/iaas/latest/Vnic/UpdateVnic).<br /><br />PrivateIp objects that are created for use with the Oracle Cloud VMware Solution are<br />assigned to a VLAN and not a VNIC in a subnet. See the<br />descriptions of the relevant attributes in the PrivateIp object. Also see<br />[Vlan](#/en/iaas/latest/Vlan).<br /><br />To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,<br />talk to an administrator. If you're an administrator who needs to write policies to give users access, see<br />[Getting Started with Policies](/iaas/Content/Identity/Concepts/policygetstarted.htm).<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The private IP's Oracle ID ([OCID](/iaas/Content/General/Concepts/identifiers.htm)). |
availabilityDomain | string | The private IP's availability domain. This attribute will be null if this is a secondary private IP assigned to a VNIC that is in a regional subnet. Example: Uocm:PHX-AD-1 |
cidrPrefixLength | integer | The secondary IPv4 CIDR prefix length. |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the private IP. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
displayName | string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
freeformTags | object | Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
hostnameLabel | string | 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](https:​//tools.ietf.org/html/rfc952) and [RFC 1123](https:​//tools.ietf.org/html/rfc1123). For more information, see [DNS in Your Virtual Cloud Network](/iaas/Content/Network/Concepts/dns.htm). Example: bminstance1 |
ipAddress | string | The private IP address of the privateIp object. The address is within the CIDR of the VNIC's subnet. However, if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution, the address is from the range specified by the cidrBlock attribute for the VLAN. See [Vlan](#/en/iaas/latest/Vlan). Example: 10.0.3.3 |
ipState | string | State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED, otherwise it is AVAILABLE. (ASSIGNED, AVAILABLE) |
ipv4SubnetCidrAtCreation | string | Ipv4 Subnet CIDR specified whn creating the PrivateIP. |
isPrimary | boolean | 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 |
lifetime | string | Lifetime of the IP address. There are two types of IPs: - Ephemeral - Reserved (EPHEMERAL, RESERVED) |
routeTableId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see [Per-resource Routing](https:​//docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing). |
subnetId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the subnet the VNIC is in. However, if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution, the subnetId is null. |
timeCreated | string (date-time) | The date and time the private IP was created, in the format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z |
vlanId | string | Applicable only if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution. The vlanId is the [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. See [Vlan](#/en/iaas/latest/Vlan). |
vnicId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VNIC the private IP is assigned to. The VNIC and private IP must be in the same subnet. However, if the PrivateIp object is being used with a VLAN as part of the Oracle Cloud VMware Solution, the vnicId is null. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | privateIpId, region | Gets the specified private IP. You must specify the object's [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />Alternatively, you can get the object by using<br />[ListPrivateIps](#/en/iaas/latest/PrivateIp/ListPrivateIps)<br />with the private IP address (for example, 10.0.3.3) and subnet [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> | |
list | select | region | limit, page, ipAddress, subnetId, vnicId, ipState, lifetime, vlanId | Lists the [PrivateIp](#/en/iaas/latest/PrivateIp/) objects based<br />on one of these filters:<br /><br /> - Subnet [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> - VNIC [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> - Both private IP address and subnet OCID: This lets<br /> you get a privateIP object based on its private IP<br /> address (for example, 10.0.3.3) and not its [OCID](/iaas/Content/General/Concepts/identifiers.htm). For comparison,<br /> [GetPrivateIp](#/en/iaas/latest/PrivateIp/GetPrivateIp)<br /> requires the [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /><br />If you're listing all the private IPs associated with a given subnet<br />or VNIC, the response includes both primary and secondary private IPs.<br /><br />If you are an Oracle Cloud VMware Solution customer and have VLANs<br />in your VCN, you can filter the list by VLAN [OCID](/iaas/Content/General/Concepts/identifiers.htm). See [Vlan](#/en/iaas/latest/Vlan).<br /> |
create | insert | region | opc-retry-token | Creates a private IP.<br />For more information about private IPs, see<br />[IP Addresses](/iaas/Content/Network/Tasks/managingIPaddresses.htm).<br /> |
update | update | privateIpId, region | if-match | Updates the specified private IP. You must specify the object's [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />Use this operation if you want to:<br /><br /> - Move a secondary private IP to a different VNIC in the same subnet.<br /> - Change the display name for a secondary private IP.<br /> - Change the hostname for a secondary private IP.<br /><br />This operation cannot be used with primary private IPs.<br />To update the hostname for the primary IP on a VNIC, use<br />[UpdateVnic](#/en/iaas/latest/Vnic/UpdateVnic).<br /> |
delete | delete | privateIpId, region | if-match | Unassigns and deletes the specified private IP. You must<br />specify the object's [OCID](/iaas/Content/General/Concepts/identifiers.htm). The private IP address is returned to<br />the subnet's pool of available addresses.<br /><br />This operation cannot be used with primary private IPs, which are<br />automatically unassigned and deleted when the VNIC is terminated.<br /><br />Important: If a secondary private IP is the<br />[target of a route rule](/iaas/Content/Network/Tasks/managingroutetables.htm#privateip),<br />unassigning it from the VNIC causes that route rule to blackhole and the traffic<br />will be dropped.<br /> |
bulk_create_private_ips | exec | region, bulkCreatePrivateIpItem | opc-retry-token, opc-request-id | Create secondary private IPv4 addresses.<br /> |
bulk_delete_private_ips | exec | region, bulkDeletePrivateIpItem | opc-retry-token, opc-request-id | Unassign and delete secondary private IPv4s for a VNIC.<br /> |
bulk_detach_private_ips | exec | region, bulkDetachPrivateIpItem | opc-retry-token, opc-request-id | Unassign the specified private IP addresses from the Virtual Network Interface Card (VNIC). You must specify the PrivateIP object's [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> |
bulk_update_private_ips | exec | region, bulkUpdatePrivateIpItem | opc-retry-token, opc-request-id | Update existing secondary private IPv4s for a VNIC. |
private_ip_vnic_detach | exec | privateIpId, region | if-match, opc-request-id, opc-retry-token | Unassign the specified PrivateIP address from Virtual Network Interface Card (VNIC). You must specify the PrivateIP [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
privateIpId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the private IP or IPv6. |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
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. |
ipAddress | string | An IP address. This could be either IPv4 or IPv6, depending on the resource. Example: 10.0.3.3 |
ipState | string | State of the IP address. If an IP address is assigned to a VNIC it is ASSIGNED otherwise AVAILABLE |
lifetime | string | Lifetime of the IP address. There are two types of IPs: - Ephemeral - Reserved |
limit | integer | For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50 |
opc-request-id | string | Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
opc-retry-token | string | 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). |
page | string | For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
subnetId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the subnet. |
vlanId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VLAN. |
vnicId | string | The OCID of the VNIC. |
SELECT examples​
- get
- list
Gets the specified private IP. You must specify the object's [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />Alternatively, you can get the object by using<br />[ListPrivateIps](#/en/iaas/latest/PrivateIp/ListPrivateIps)<br />with the private IP address (for example, 10.0.3.3) and subnet [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />
SELECT
id,
availabilityDomain,
cidrPrefixLength,
compartmentId,
definedTags,
displayName,
freeformTags,
hostnameLabel,
ipAddress,
ipState,
ipv4SubnetCidrAtCreation,
isPrimary,
lifetime,
routeTableId,
subnetId,
timeCreated,
vlanId,
vnicId
FROM oci.network.private_ips
WHERE privateIpId = '{{ privateIpId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the [PrivateIp](#/en/iaas/latest/PrivateIp/) objects based<br />on one of these filters:<br /><br /> - Subnet [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> - VNIC [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /> - Both private IP address and subnet OCID: This lets<br /> you get a privateIP object based on its private IP<br /> address (for example, 10.0.3.3) and not its [OCID](/iaas/Content/General/Concepts/identifiers.htm). For comparison,<br /> [GetPrivateIp](#/en/iaas/latest/PrivateIp/GetPrivateIp)<br /> requires the [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br /><br />If you're listing all the private IPs associated with a given subnet<br />or VNIC, the response includes both primary and secondary private IPs.<br /><br />If you are an Oracle Cloud VMware Solution customer and have VLANs<br />in your VCN, you can filter the list by VLAN [OCID](/iaas/Content/General/Concepts/identifiers.htm). See [Vlan](#/en/iaas/latest/Vlan).<br />
SELECT
id,
availabilityDomain,
cidrPrefixLength,
compartmentId,
definedTags,
displayName,
freeformTags,
hostnameLabel,
ipAddress,
ipState,
ipv4SubnetCidrAtCreation,
isPrimary,
lifetime,
routeTableId,
subnetId,
timeCreated,
vlanId,
vnicId
FROM oci.network.private_ips
WHERE region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND ipAddress = '{{ ipAddress }}'
AND subnetId = '{{ subnetId }}'
AND vnicId = '{{ vnicId }}'
AND ipState = '{{ ipState }}'
AND lifetime = '{{ lifetime }}'
AND vlanId = '{{ vlanId }}'
;
INSERT examples​
- create
- Manifest
Creates a private IP.<br />For more information about private IPs, see<br />[IP Addresses](/iaas/Content/Network/Tasks/managingIPaddresses.htm).<br />
INSERT INTO oci.network.private_ips (
cidrPrefixLength,
definedTags,
displayName,
freeformTags,
hostnameLabel,
ipAddress,
ipv4SubnetCidrAtCreation,
lifetime,
routeTableId,
subnetId,
vlanId,
vnicId,
region,
opc-retry-token
)
SELECT
{{ cidrPrefixLength }},
'{{ definedTags }}',
'{{ displayName }}',
'{{ freeformTags }}',
'{{ hostnameLabel }}',
'{{ ipAddress }}',
'{{ ipv4SubnetCidrAtCreation }}',
'{{ lifetime }}',
'{{ routeTableId }}',
'{{ subnetId }}',
'{{ vlanId }}',
'{{ vnicId }}',
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
availabilityDomain,
cidrPrefixLength,
compartmentId,
definedTags,
displayName,
freeformTags,
hostnameLabel,
ipAddress,
ipState,
ipv4SubnetCidrAtCreation,
isPrimary,
lifetime,
routeTableId,
subnetId,
timeCreated,
vlanId,
vnicId
;
# Description fields are for documentation purposes
- name: private_ips
props:
- name: region
value: "{{ region }}"
description: Required parameter for the private_ips resource.
- name: cidrPrefixLength
value: {{ cidrPrefixLength }}
description: |
An optional field that when combined with the ipAddress field, will be used to allocate secondary IPv4 CIDRs.
The CIDR range created by this combination must be within the subnet's CIDR
and the CIDR range should not collide with any existing IPv4 address allocation.
The VNIC ID specified in the request object should not already been assigned more than the max IPv4 addresses.
If you don't specify a value, this option will be ignored.
Example: 18
default: 32
- name: definedTags
value: "{{ definedTags }}"
description: |
Defined tags for this resource. Each key is predefined and scoped to a
namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Operations": {"CostCenter": "42"}}`
- name: displayName
value: "{{ displayName }}"
description: |
A user-friendly name. Does not have to be unique, and it's changeable.
Avoid entering confidential information.
- name: freeformTags
value: "{{ freeformTags }}"
description: |
Free-form tags for this resource. Each tag is a simple key-value pair with no
predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).
Example: `{"Department": "Finance"}`
- name: hostnameLabel
value: "{{ hostnameLabel }}"
description: |
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](https://tools.ietf.org/html/rfc952) and
[RFC 1123](https://tools.ietf.org/html/rfc1123).
For more information, see
[DNS in Your Virtual Cloud Network](/iaas/Content/Network/Concepts/dns.htm).
Example: `bminstance1`
- name: ipAddress
value: "{{ ipAddress }}"
description: |
A private IP address of your choice. Must be an available IP address within
the subnet's CIDR. If you don't specify a value, Oracle automatically
assigns a private IP address from the subnet.
Example: `10.0.3.3`
- name: ipv4SubnetCidrAtCreation
value: "{{ ipv4SubnetCidrAtCreation }}"
description: |
Any one of the IPv4 CIDRs allocated to the subnet.
- name: lifetime
value: "{{ lifetime }}"
description: |
Lifetime of the IP address.
There are two types of IPs:
- Ephemeral
- Reserved
valid_values: ['EPHEMERAL', 'RESERVED']
default: EPHEMERAL
- name: routeTableId
value: "{{ routeTableId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the route table the IP address or VNIC will use. For more information, see
[Per-resource Routing](https://docs.oracle.com/iaas/Content/Network/Tasks/managingroutetables.htm#Overview_of_Routing_for_Your_VCN__source_routing).
- name: subnetId
value: "{{ subnetId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the subnet from which the private IP is to be drawn. The IP address,
*if supplied*, must be valid for the given subnet.
- name: vlanId
value: "{{ vlanId }}"
description: |
Use this attribute only with the Oracle Cloud VMware Solution.
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VLAN from which the private IP is to be drawn. The IP address,
*if supplied*, must be valid for the given VLAN. See [Vlan](#/en/iaas/latest/Vlan).
- name: vnicId
value: "{{ vnicId }}"
description: |
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the VNIC to assign the private IP to. The VNIC and private IP
must be in the same subnet.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: 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).
description: 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).
UPDATE examples​
- update
Updates the specified private IP. You must specify the object's [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />Use this operation if you want to:<br /><br /> - Move a secondary private IP to a different VNIC in the same subnet.<br /> - Change the display name for a secondary private IP.<br /> - Change the hostname for a secondary private IP.<br /><br />This operation cannot be used with primary private IPs.<br />To update the hostname for the primary IP on a VNIC, use<br />[UpdateVnic](#/en/iaas/latest/Vnic/UpdateVnic).<br />
UPDATE oci.network.private_ips
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
hostnameLabel = '{{ hostnameLabel }}',
lifetime = '{{ lifetime }}',
routeTableId = '{{ routeTableId }}',
vnicId = '{{ vnicId }}'
WHERE
privateIpId = '{{ privateIpId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
availabilityDomain,
cidrPrefixLength,
compartmentId,
definedTags,
displayName,
freeformTags,
hostnameLabel,
ipAddress,
ipState,
ipv4SubnetCidrAtCreation,
isPrimary,
lifetime,
routeTableId,
subnetId,
timeCreated,
vlanId,
vnicId;
DELETE examples​
- delete
Unassigns and deletes the specified private IP. You must<br />specify the object's [OCID](/iaas/Content/General/Concepts/identifiers.htm). The private IP address is returned to<br />the subnet's pool of available addresses.<br /><br />This operation cannot be used with primary private IPs, which are<br />automatically unassigned and deleted when the VNIC is terminated.<br /><br />Important: If a secondary private IP is the<br />[target of a route rule](/iaas/Content/Network/Tasks/managingroutetables.htm#privateip),<br />unassigning it from the VNIC causes that route rule to blackhole and the traffic<br />will be dropped.<br />
DELETE FROM oci.network.private_ips
WHERE privateIpId = '{{ privateIpId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;
Lifecycle Methods​
- bulk_create_private_ips
- bulk_delete_private_ips
- bulk_detach_private_ips
- bulk_update_private_ips
- private_ip_vnic_detach
Create secondary private IPv4 addresses.<br />
EXEC oci.network.private_ips.bulk_create_private_ips
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"bulkCreatePrivateIpItem": "{{ bulkCreatePrivateIpItem }}",
"subnetId": "{{ subnetId }}",
"vlanId": "{{ vlanId }}",
"vnicId": "{{ vnicId }}"
}'
;
Unassign and delete secondary private IPv4s for a VNIC.<br />
EXEC oci.network.private_ips.bulk_delete_private_ips
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"bulkDeletePrivateIpItem": "{{ bulkDeletePrivateIpItem }}",
"subnetId": "{{ subnetId }}",
"vlanId": "{{ vlanId }}",
"vnicId": "{{ vnicId }}"
}'
;
Unassign the specified private IP addresses from the Virtual Network Interface Card (VNIC). You must specify the PrivateIP object's [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />
EXEC oci.network.private_ips.bulk_detach_private_ips
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"bulkDetachPrivateIpItem": "{{ bulkDetachPrivateIpItem }}",
"vnicId": "{{ vnicId }}"
}'
;
Update existing secondary private IPv4s for a VNIC.
EXEC oci.network.private_ips.bulk_update_private_ips
@region='{{ region }}' --required,
@opc-retry-token='{{ opc-retry-token }}',
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"bulkUpdatePrivateIpItem": "{{ bulkUpdatePrivateIpItem }}",
"vnicId": "{{ vnicId }}"
}'
;
Unassign the specified PrivateIP address from Virtual Network Interface Card (VNIC). You must specify the PrivateIP [OCID](/iaas/Content/General/Concepts/identifiers.htm).<br />
EXEC oci.network.private_ips.private_ip_vnic_detach
@privateIpId='{{ privateIpId }}' --required,
@region='{{ region }}' --required,
@if-match='{{ if-match }}',
@opc-request-id='{{ opc-request-id }}',
@opc-retry-token='{{ opc-retry-token }}'
;