1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. PublicIpPool
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.Core.PublicIpPool

Explore with Pulumi AI

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

Creates a public IP pool.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testPublicIpPool = new oci.core.PublicIpPool("test_public_ip_pool", {
    compartmentId: compartmentId,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    displayName: publicIpPoolDisplayName,
    freeformTags: {
        Department: "Finance",
    },
});
Copy
import pulumi
import pulumi_oci as oci

test_public_ip_pool = oci.core.PublicIpPool("test_public_ip_pool",
    compartment_id=compartment_id,
    defined_tags={
        "Operations.CostCenter": "42",
    },
    display_name=public_ip_pool_display_name,
    freeform_tags={
        "Department": "Finance",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.NewPublicIpPool(ctx, "test_public_ip_pool", &core.PublicIpPoolArgs{
			CompartmentId: pulumi.Any(compartmentId),
			DefinedTags: pulumi.StringMap{
				"Operations.CostCenter": pulumi.String("42"),
			},
			DisplayName: pulumi.Any(publicIpPoolDisplayName),
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("Finance"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testPublicIpPool = new Oci.Core.PublicIpPool("test_public_ip_pool", new()
    {
        CompartmentId = compartmentId,
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        DisplayName = publicIpPoolDisplayName,
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.PublicIpPool;
import com.pulumi.oci.Core.PublicIpPoolArgs;
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 testPublicIpPool = new PublicIpPool("testPublicIpPool", PublicIpPoolArgs.builder()
            .compartmentId(compartmentId)
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .displayName(publicIpPoolDisplayName)
            .freeformTags(Map.of("Department", "Finance"))
            .build());

    }
}
Copy
resources:
  testPublicIpPool:
    type: oci:Core:PublicIpPool
    name: test_public_ip_pool
    properties:
      compartmentId: ${compartmentId}
      definedTags:
        Operations.CostCenter: '42'
      displayName: ${publicIpPoolDisplayName}
      freeformTags:
        Department: Finance
Copy

Create PublicIpPool Resource

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

Constructor syntax

new PublicIpPool(name: string, args: PublicIpPoolArgs, opts?: CustomResourceOptions);
@overload
def PublicIpPool(resource_name: str,
                 args: PublicIpPoolArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def PublicIpPool(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 compartment_id: Optional[str] = None,
                 defined_tags: Optional[Mapping[str, str]] = None,
                 display_name: Optional[str] = None,
                 freeform_tags: Optional[Mapping[str, str]] = None)
func NewPublicIpPool(ctx *Context, name string, args PublicIpPoolArgs, opts ...ResourceOption) (*PublicIpPool, error)
public PublicIpPool(string name, PublicIpPoolArgs args, CustomResourceOptions? opts = null)
public PublicIpPool(String name, PublicIpPoolArgs args)
public PublicIpPool(String name, PublicIpPoolArgs args, CustomResourceOptions options)
type: oci:Core:PublicIpPool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

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

var publicIpPoolResource = new Oci.Core.PublicIpPool("publicIpPoolResource", new()
{
    CompartmentId = "string",
    DefinedTags = 
    {
        { "string", "string" },
    },
    DisplayName = "string",
    FreeformTags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := Core.NewPublicIpPool(ctx, "publicIpPoolResource", &Core.PublicIpPoolArgs{
	CompartmentId: pulumi.String("string"),
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	DisplayName: pulumi.String("string"),
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var publicIpPoolResource = new PublicIpPool("publicIpPoolResource", PublicIpPoolArgs.builder()
    .compartmentId("string")
    .definedTags(Map.of("string", "string"))
    .displayName("string")
    .freeformTags(Map.of("string", "string"))
    .build());
Copy
public_ip_pool_resource = oci.core.PublicIpPool("publicIpPoolResource",
    compartment_id="string",
    defined_tags={
        "string": "string",
    },
    display_name="string",
    freeform_tags={
        "string": "string",
    })
Copy
const publicIpPoolResource = new oci.core.PublicIpPool("publicIpPoolResource", {
    compartmentId: "string",
    definedTags: {
        string: "string",
    },
    displayName: "string",
    freeformTags: {
        string: "string",
    },
});
Copy
type: oci:Core:PublicIpPool
properties:
    compartmentId: string
    definedTags:
        string: string
    displayName: string
    freeformTags:
        string: string
Copy

PublicIpPool Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PublicIpPool resource accepts the following input properties:

CompartmentId This property is required. string
(Updatable) The OCID of the compartment containing the public IP pool.
DefinedTags Dictionary<string, string>
(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, string>

(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"}

** 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

CompartmentId This property is required. string
(Updatable) The OCID of the compartment containing the public IP pool.
DefinedTags map[string]string
(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]string

(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"}

** 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

compartmentId This property is required. String
(Updatable) The OCID of the compartment containing the public IP pool.
definedTags Map<String,String>
(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,String>

(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"}

** 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

compartmentId This property is required. string
(Updatable) The OCID of the compartment containing the public IP pool.
definedTags {[key: string]: string}
(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]: string}

(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"}

** 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

compartment_id This property is required. str
(Updatable) The OCID of the compartment containing the public IP pool.
defined_tags Mapping[str, str]
(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, str]

(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"}

** 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

compartmentId This property is required. String
(Updatable) The OCID of the compartment containing the public IP pool.
definedTags Map<String>
(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>

(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"}

** 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 PublicIpPool resource produces the following output properties:

CidrBlocks List<string>
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
Id string
The provider-assigned unique ID for this managed resource.
State string
The public IP pool's current state.
TimeCreated string
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
CidrBlocks []string
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
Id string
The provider-assigned unique ID for this managed resource.
State string
The public IP pool's current state.
TimeCreated string
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidrBlocks List<String>
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
id String
The provider-assigned unique ID for this managed resource.
state String
The public IP pool's current state.
timeCreated String
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidrBlocks string[]
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
id string
The provider-assigned unique ID for this managed resource.
state string
The public IP pool's current state.
timeCreated string
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidr_blocks Sequence[str]
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
id str
The provider-assigned unique ID for this managed resource.
state str
The public IP pool's current state.
time_created str
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidrBlocks List<String>
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
id String
The provider-assigned unique ID for this managed resource.
state String
The public IP pool's current state.
timeCreated String
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

Look up Existing PublicIpPool Resource

Get an existing PublicIpPool 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?: PublicIpPoolState, opts?: CustomResourceOptions): PublicIpPool
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cidr_blocks: Optional[Sequence[str]] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        state: Optional[str] = None,
        time_created: Optional[str] = None) -> PublicIpPool
func GetPublicIpPool(ctx *Context, name string, id IDInput, state *PublicIpPoolState, opts ...ResourceOption) (*PublicIpPool, error)
public static PublicIpPool Get(string name, Input<string> id, PublicIpPoolState? state, CustomResourceOptions? opts = null)
public static PublicIpPool get(String name, Output<String> id, PublicIpPoolState state, CustomResourceOptions options)
resources:  _:    type: oci:Core:PublicIpPool    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CidrBlocks List<string>
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
CompartmentId string
(Updatable) The OCID of the compartment containing the public IP pool.
DefinedTags Dictionary<string, string>
(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, string>

(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"}

** 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

State string
The public IP pool's current state.
TimeCreated string
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
CidrBlocks []string
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
CompartmentId string
(Updatable) The OCID of the compartment containing the public IP pool.
DefinedTags map[string]string
(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]string

(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"}

** 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

State string
The public IP pool's current state.
TimeCreated string
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidrBlocks List<String>
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
compartmentId String
(Updatable) The OCID of the compartment containing the public IP pool.
definedTags Map<String,String>
(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,String>

(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"}

** 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

state String
The public IP pool's current state.
timeCreated String
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidrBlocks string[]
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
compartmentId string
(Updatable) The OCID of the compartment containing the public IP pool.
definedTags {[key: string]: string}
(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]: string}

(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"}

** 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

state string
The public IP pool's current state.
timeCreated string
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidr_blocks Sequence[str]
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
compartment_id str
(Updatable) The OCID of the compartment containing the public IP pool.
defined_tags Mapping[str, str]
(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, str]

(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"}

** 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

state str
The public IP pool's current state.
time_created str
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
cidrBlocks List<String>
The CIDR blocks added to this pool. This could be all or a portion of a BYOIP CIDR block.
compartmentId String
(Updatable) The OCID of the compartment containing the public IP pool.
definedTags Map<String>
(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>

(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"}

** 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

state String
The public IP pool's current state.
timeCreated String
The date and time the public IP pool was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

Import

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

$ pulumi import oci:Core/publicIpPool:PublicIpPool test_public_ip_pool "id"
Copy

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.