UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

137 lines 5.68 kB
"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! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.OdbNetwork = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An OdbNetwork resource which represents a private network providing connectivity between OracleDatabase resources and Google Cloud VPC network. * * To get more information about OdbNetwork, see: * * How-to Guides * * [OracleDatabase@Google Cloud](https://cloud.google.com/oracle/database/docs/overview') * * ## Example Usage * * ### Oracledatabase Odbnetwork * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = gcp.compute.getNetwork({ * name: "new", * project: "my-project", * }); * const my_odbnetwork = new gcp.oracledatabase.OdbNetwork("my-odbnetwork", { * odbNetworkId: "my-odbnetwork", * location: "us-west3", * project: "my-project", * network: _default.then(_default => _default.id), * labels: { * terraform_created: "true", * }, * deletionProtection: true, * }); * ``` * * ## Import * * OdbNetwork can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/odbNetworks/{{odb_network_id}}` * * * `{{project}}/{{location}}/{{odb_network_id}}` * * * `{{location}}/{{odb_network_id}}` * * When using the `pulumi import` command, OdbNetwork can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:oracledatabase/odbNetwork:OdbNetwork default projects/{{project}}/locations/{{location}}/odbNetworks/{{odb_network_id}} * ``` * * ```sh * $ pulumi import gcp:oracledatabase/odbNetwork:OdbNetwork default {{project}}/{{location}}/{{odb_network_id}} * ``` * * ```sh * $ pulumi import gcp:oracledatabase/odbNetwork:OdbNetwork default {{location}}/{{odb_network_id}} * ``` */ class OdbNetwork extends pulumi.CustomResource { /** * Get an existing OdbNetwork resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new OdbNetwork(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of OdbNetwork. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === OdbNetwork.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionProtection"] = state?.deletionProtection; resourceInputs["effectiveLabels"] = state?.effectiveLabels; resourceInputs["entitlementId"] = state?.entitlementId; resourceInputs["labels"] = state?.labels; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["network"] = state?.network; resourceInputs["odbNetworkId"] = state?.odbNetworkId; resourceInputs["project"] = state?.project; resourceInputs["pulumiLabels"] = state?.pulumiLabels; resourceInputs["state"] = state?.state; } else { const args = argsOrState; if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.network === undefined && !opts.urn) { throw new Error("Missing required property 'network'"); } if (args?.odbNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'odbNetworkId'"); } resourceInputs["deletionProtection"] = args?.deletionProtection; resourceInputs["labels"] = args?.labels; resourceInputs["location"] = args?.location; resourceInputs["network"] = args?.network; resourceInputs["odbNetworkId"] = args?.odbNetworkId; resourceInputs["project"] = args?.project; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["entitlementId"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(OdbNetwork.__pulumiType, name, resourceInputs, opts); } } exports.OdbNetwork = OdbNetwork; /** @internal */ OdbNetwork.__pulumiType = 'gcp:oracledatabase/odbNetwork:OdbNetwork'; //# sourceMappingURL=odbNetwork.js.map