"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPublicIpOutput = exports.getPublicIp = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This data source provides details about a specific Public Ip resource in Oracle Cloud Infrastructure Core service.
 *
 * Gets the specified public IP. You must specify the object's [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
 *
 * Alternatively, you can get the object by using [GetPublicIpByIpAddress](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/GetPublicIpByIpAddress)
 * with the public IP address (for example, 203.0.113.2).
 *
 * Or you can use [GetPublicIpByPrivateIpId](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/GetPublicIpByPrivateIpId)
 * with the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP that the public IP is assigned to.
 *
 * **Note:** If you're fetching a reserved public IP that is in the process of being
 * moved to a different private IP, the service returns the public IP object with
 * `lifecycleState` = ASSIGNING and `assignedEntityId` = [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP.
 *
 * ## Example Usage
 *
 * ### Get a public ip by public ip id
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOciCorePublicIpById = oci.core.getPublicIp({
 *     id: testPublicIpId,
 * });
 * ```
 *
 * ### Get a public ip by private ip id
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOciCorePublicIpByPrivateIpId = oci.core.getPublicIp({
 *     privateIpId: testPublicIpPrivateIpId,
 * });
 * ```
 *
 * ### Get a public ip by public ip address
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOciCorePublicIpByIp = oci.core.getPublicIp({
 *     ipAddress: testPublicIpIpAddress,
 * });
 * ```
 */
function getPublicIp(args, opts) {
    args = args || {};
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invoke("oci:Core/getPublicIp:getPublicIp", {
        "id": args.id,
        "ipAddress": args.ipAddress,
        "privateIpId": args.privateIpId,
    }, opts);
}
exports.getPublicIp = getPublicIp;
/**
 * This data source provides details about a specific Public Ip resource in Oracle Cloud Infrastructure Core service.
 *
 * Gets the specified public IP. You must specify the object's [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
 *
 * Alternatively, you can get the object by using [GetPublicIpByIpAddress](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/GetPublicIpByIpAddress)
 * with the public IP address (for example, 203.0.113.2).
 *
 * Or you can use [GetPublicIpByPrivateIpId](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/PublicIp/GetPublicIpByPrivateIpId)
 * with the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the private IP that the public IP is assigned to.
 *
 * **Note:** If you're fetching a reserved public IP that is in the process of being
 * moved to a different private IP, the service returns the public IP object with
 * `lifecycleState` = ASSIGNING and `assignedEntityId` = [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target private IP.
 *
 * ## Example Usage
 *
 * ### Get a public ip by public ip id
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOciCorePublicIpById = oci.core.getPublicIp({
 *     id: testPublicIpId,
 * });
 * ```
 *
 * ### Get a public ip by private ip id
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOciCorePublicIpByPrivateIpId = oci.core.getPublicIp({
 *     privateIpId: testPublicIpPrivateIpId,
 * });
 * ```
 *
 * ### Get a public ip by public ip address
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testOciCorePublicIpByIp = oci.core.getPublicIp({
 *     ipAddress: testPublicIpIpAddress,
 * });
 * ```
 */
function getPublicIpOutput(args, opts) {
    args = args || {};
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invokeOutput("oci:Core/getPublicIp:getPublicIp", {
        "id": args.id,
        "ipAddress": args.ipAddress,
        "privateIpId": args.privateIpId,
    }, opts);
}
exports.getPublicIpOutput = getPublicIpOutput;
//# sourceMappingURL=getPublicIp.js.map