UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

79 lines 3.57 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Vip = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a network VIP resource within HuaweiCloud VPC. * * ## Import * * Network VIPs can be imported using their `id`, e.g.bash * * ```sh * $ pulumi import huaweicloud:Vpc/vip:Vip test ce595799-da26-4015-8db5-7733c6db292e * ``` */ class Vip extends pulumi.CustomResource { /** * Get an existing Vip 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 Vip(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Vip. 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'] === Vip.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["deviceOwner"] = state ? state.deviceOwner : undefined; resourceInputs["ipAddress"] = state ? state.ipAddress : undefined; resourceInputs["ipVersion"] = state ? state.ipVersion : undefined; resourceInputs["macAddress"] = state ? state.macAddress : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnetId"] = state ? state.subnetId : undefined; } else { const args = argsOrState; if ((!args || args.networkId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkId'"); } resourceInputs["ipAddress"] = args ? args.ipAddress : undefined; resourceInputs["ipVersion"] = args ? args.ipVersion : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkId"] = args ? args.networkId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["subnetId"] = args ? args.subnetId : undefined; resourceInputs["deviceOwner"] = undefined /*out*/; resourceInputs["macAddress"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Vip.__pulumiType, name, resourceInputs, opts); } } exports.Vip = Vip; /** @internal */ Vip.__pulumiType = 'huaweicloud:Vpc/vip:Vip'; //# sourceMappingURL=vip.js.map