1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. PrivateIp
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.Core.PrivateIp

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

    This resource provides the Private Ip resource in Oracle Cloud Infrastructure Core service.

    Creates a secondary private IP for the specified VNIC. For more information about secondary private IPs, see IP Addresses.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testPrivateIp = new oci.core.PrivateIp("testPrivateIp", {
        definedTags: {
            "Operations.CostCenter": "42",
        },
        displayName: _var.private_ip_display_name,
        freeformTags: {
            Department: "Finance",
        },
        hostnameLabel: _var.private_ip_hostname_label,
        ipAddress: _var.private_ip_ip_address,
        vlanId: oci_core_vlan.test_vlan.id,
        vnicId: oci_core_vnic_attachment.test_vnic_attachment.vnic_id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_private_ip = oci.core.PrivateIp("testPrivateIp",
        defined_tags={
            "Operations.CostCenter": "42",
        },
        display_name=var["private_ip_display_name"],
        freeform_tags={
            "Department": "Finance",
        },
        hostname_label=var["private_ip_hostname_label"],
        ip_address=var["private_ip_ip_address"],
        vlan_id=oci_core_vlan["test_vlan"]["id"],
        vnic_id=oci_core_vnic_attachment["test_vnic_attachment"]["vnic_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.NewPrivateIp(ctx, "testPrivateIp", &Core.PrivateIpArgs{
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			DisplayName: pulumi.Any(_var.Private_ip_display_name),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    			HostnameLabel: pulumi.Any(_var.Private_ip_hostname_label),
    			IpAddress:     pulumi.Any(_var.Private_ip_ip_address),
    			VlanId:        pulumi.Any(oci_core_vlan.Test_vlan.Id),
    			VnicId:        pulumi.Any(oci_core_vnic_attachment.Test_vnic_attachment.Vnic_id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testPrivateIp = new Oci.Core.PrivateIp("testPrivateIp", new()
        {
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            DisplayName = @var.Private_ip_display_name,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            HostnameLabel = @var.Private_ip_hostname_label,
            IpAddress = @var.Private_ip_ip_address,
            VlanId = oci_core_vlan.Test_vlan.Id,
            VnicId = oci_core_vnic_attachment.Test_vnic_attachment.Vnic_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.PrivateIp;
    import com.pulumi.oci.Core.PrivateIpArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testPrivateIp = new PrivateIp("testPrivateIp", PrivateIpArgs.builder()        
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .displayName(var_.private_ip_display_name())
                .freeformTags(Map.of("Department", "Finance"))
                .hostnameLabel(var_.private_ip_hostname_label())
                .ipAddress(var_.private_ip_ip_address())
                .vlanId(oci_core_vlan.test_vlan().id())
                .vnicId(oci_core_vnic_attachment.test_vnic_attachment().vnic_id())
                .build());
    
        }
    }
    
    resources:
      testPrivateIp:
        type: oci:Core:PrivateIp
        properties:
          #Optional
          definedTags:
            Operations.CostCenter: '42'
          displayName: ${var.private_ip_display_name}
          freeformTags:
            Department: Finance
          hostnameLabel: ${var.private_ip_hostname_label}
          ipAddress: ${var.private_ip_ip_address}
          vlanId: ${oci_core_vlan.test_vlan.id}
          vnicId: ${oci_core_vnic_attachment.test_vnic_attachment.vnic_id}
    

    Create PrivateIp Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PrivateIp(name: string, args?: PrivateIpArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateIp(resource_name: str,
                  args: Optional[PrivateIpArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrivateIp(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  defined_tags: Optional[Mapping[str, Any]] = None,
                  display_name: Optional[str] = None,
                  freeform_tags: Optional[Mapping[str, Any]] = None,
                  hostname_label: Optional[str] = None,
                  ip_address: Optional[str] = None,
                  vlan_id: Optional[str] = None,
                  vnic_id: Optional[str] = None)
    func NewPrivateIp(ctx *Context, name string, args *PrivateIpArgs, opts ...ResourceOption) (*PrivateIp, error)
    public PrivateIp(string name, PrivateIpArgs? args = null, CustomResourceOptions? opts = null)
    public PrivateIp(String name, PrivateIpArgs args)
    public PrivateIp(String name, PrivateIpArgs args, CustomResourceOptions options)
    
    type: oci:Core:PrivateIp
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PrivateIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrivateIpArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrivateIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateIpArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var privateIpResource = new Oci.Core.PrivateIp("privateIpResource", new()
    {
        DefinedTags = 
        {
            { "string", "any" },
        },
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        HostnameLabel = "string",
        IpAddress = "string",
        VlanId = "string",
        VnicId = "string",
    });
    
    example, err := Core.NewPrivateIp(ctx, "privateIpResource", &Core.PrivateIpArgs{
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	HostnameLabel: pulumi.String("string"),
    	IpAddress:     pulumi.String("string"),
    	VlanId:        pulumi.String("string"),
    	VnicId:        pulumi.String("string"),
    })
    
    var privateIpResource = new PrivateIp("privateIpResource", PrivateIpArgs.builder()        
        .definedTags(Map.of("string", "any"))
        .displayName("string")
        .freeformTags(Map.of("string", "any"))
        .hostnameLabel("string")
        .ipAddress("string")
        .vlanId("string")
        .vnicId("string")
        .build());
    
    private_ip_resource = oci.core.PrivateIp("privateIpResource",
        defined_tags={
            "string": "any",
        },
        display_name="string",
        freeform_tags={
            "string": "any",
        },
        hostname_label="string",
        ip_address="string",
        vlan_id="string",
        vnic_id="string")
    
    const privateIpResource = new oci.core.PrivateIp("privateIpResource", {
        definedTags: {
            string: "any",
        },
        displayName: "string",
        freeformTags: {
            string: "any",
        },
        hostnameLabel: "string",
        ipAddress: "string",
        vlanId: "string",
        vnicId: "string",
    });
    
    type: oci:Core:PrivateIp
    properties:
        definedTags:
            string: any
        displayName: string
        freeformTags:
            string: any
        hostnameLabel: string
        ipAddress: string
        vlanId: string
        vnicId: string
    

    PrivateIp Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PrivateIp resource accepts the following input properties:

    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) 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. Example: {"Department": "Finance"}
    HostnameLabel string

    (Updatable) 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

    IpAddress string
    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
    VlanId string

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    VnicId string

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) 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. Example: {"Department": "Finance"}
    HostnameLabel string

    (Updatable) 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

    IpAddress string
    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
    VlanId string

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    VnicId string

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) 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. Example: {"Department": "Finance"}
    hostnameLabel String

    (Updatable) 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

    ipAddress String
    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
    vlanId String

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnicId String

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) 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. Example: {"Department": "Finance"}
    hostnameLabel string

    (Updatable) 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

    ipAddress string
    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
    vlanId string

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnicId string

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) 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. Example: {"Department": "Finance"}
    hostname_label str

    (Updatable) 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

    ip_address str
    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
    vlan_id str

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnic_id str

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) 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. Example: {"Department": "Finance"}
    hostnameLabel String

    (Updatable) 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

    ipAddress String
    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
    vlanId String

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnicId String

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PrivateIp resource produces the following output properties:

    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
    CompartmentId string
    The OCID of the compartment containing the private IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsPrimary bool
    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
    IsReserved bool
    true if the IP is reserved and can exist detached from vnic
    SubnetId string
    The OCID of the subnet the VNIC is in.
    TimeCreated string
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    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
    CompartmentId string
    The OCID of the compartment containing the private IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsPrimary bool
    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
    IsReserved bool
    true if the IP is reserved and can exist detached from vnic
    SubnetId string
    The OCID of the subnet the VNIC is in.
    TimeCreated string
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    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
    compartmentId String
    The OCID of the compartment containing the private IP.
    id String
    The provider-assigned unique ID for this managed resource.
    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
    isReserved Boolean
    true if the IP is reserved and can exist detached from vnic
    subnetId String
    The OCID of the subnet the VNIC is in.
    timeCreated String
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    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
    compartmentId string
    The OCID of the compartment containing the private IP.
    id string
    The provider-assigned unique ID for this managed resource.
    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
    isReserved boolean
    true if the IP is reserved and can exist detached from vnic
    subnetId string
    The OCID of the subnet the VNIC is in.
    timeCreated string
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    availability_domain str
    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
    compartment_id str
    The OCID of the compartment containing the private IP.
    id str
    The provider-assigned unique ID for this managed resource.
    is_primary bool
    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
    is_reserved bool
    true if the IP is reserved and can exist detached from vnic
    subnet_id str
    The OCID of the subnet the VNIC is in.
    time_created str
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    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
    compartmentId String
    The OCID of the compartment containing the private IP.
    id String
    The provider-assigned unique ID for this managed resource.
    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
    isReserved Boolean
    true if the IP is reserved and can exist detached from vnic
    subnetId String
    The OCID of the subnet the VNIC is in.
    timeCreated String
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Look up Existing PrivateIp Resource

    Get an existing PrivateIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PrivateIpState, opts?: CustomResourceOptions): PrivateIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_domain: Optional[str] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            hostname_label: Optional[str] = None,
            ip_address: Optional[str] = None,
            is_primary: Optional[bool] = None,
            is_reserved: Optional[bool] = None,
            subnet_id: Optional[str] = None,
            time_created: Optional[str] = None,
            vlan_id: Optional[str] = None,
            vnic_id: Optional[str] = None) -> PrivateIp
    func GetPrivateIp(ctx *Context, name string, id IDInput, state *PrivateIpState, opts ...ResourceOption) (*PrivateIp, error)
    public static PrivateIp Get(string name, Input<string> id, PrivateIpState? state, CustomResourceOptions? opts = null)
    public static PrivateIp get(String name, Output<String> id, PrivateIpState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    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
    CompartmentId string
    The OCID of the compartment containing the private IP.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    (Updatable) 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. Example: {"Department": "Finance"}
    HostnameLabel string

    (Updatable) 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

    IpAddress string
    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
    IsPrimary bool
    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
    IsReserved bool
    true if the IP is reserved and can exist detached from vnic
    SubnetId string
    The OCID of the subnet the VNIC is in.
    TimeCreated string
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    VnicId string

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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
    CompartmentId string
    The OCID of the compartment containing the private IP.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    (Updatable) 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. Example: {"Department": "Finance"}
    HostnameLabel string

    (Updatable) 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

    IpAddress string
    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
    IsPrimary bool
    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
    IsReserved bool
    true if the IP is reserved and can exist detached from vnic
    SubnetId string
    The OCID of the subnet the VNIC is in.
    TimeCreated string
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    VnicId string

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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
    compartmentId String
    The OCID of the compartment containing the private IP.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,Object>
    (Updatable) 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. Example: {"Department": "Finance"}
    hostnameLabel String

    (Updatable) 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

    ipAddress String
    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
    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
    isReserved Boolean
    true if the IP is reserved and can exist detached from vnic
    subnetId String
    The OCID of the subnet the VNIC is in.
    timeCreated String
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnicId String

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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
    compartmentId string
    The OCID of the compartment containing the private IP.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    (Updatable) 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. Example: {"Department": "Finance"}
    hostnameLabel string

    (Updatable) 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

    ipAddress string
    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
    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
    isReserved boolean
    true if the IP is reserved and can exist detached from vnic
    subnetId string
    The OCID of the subnet the VNIC is in.
    timeCreated string
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId string

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnicId string

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    availability_domain str
    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
    compartment_id str
    The OCID of the compartment containing the private IP.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    (Updatable) 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. Example: {"Department": "Finance"}
    hostname_label str

    (Updatable) 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

    ip_address str
    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
    is_primary bool
    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
    is_reserved bool
    true if the IP is reserved and can exist detached from vnic
    subnet_id str
    The OCID of the subnet the VNIC is in.
    time_created str
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlan_id str

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnic_id str

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    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
    compartmentId String
    The OCID of the compartment containing the private IP.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<Any>
    (Updatable) 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. Example: {"Department": "Finance"}
    hostnameLabel String

    (Updatable) 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

    ipAddress String
    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
    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
    isReserved Boolean
    true if the IP is reserved and can exist detached from vnic
    subnetId String
    The OCID of the subnet the VNIC is in.
    timeCreated String
    The date and time the private IP was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String

    Use this attribute only with the Oracle Cloud VMware Solution.

    The OCID 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.

    vnicId String

    (Updatable) The OCID of the VNIC to assign the private IP to. The VNIC and private IP must be in the same subnet.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    PrivateIps can be imported using the id, e.g.

    $ pulumi import oci:Core/privateIp:PrivateIp test_private_ip "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi