UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

91 lines 3.98 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.AddressGroupMember = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a CFW IP address group member resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const groupId = config.requireObject("groupId"); * const address = config.requireObject("address"); * const test = new huaweicloud.cfw.AddressGroupMember("test", { * groupId: groupId, * address: address, * }); * ``` * * ## Import * * The CFW IP address group member can be imported using `group_id`, `id`, separated by a slash, e.g. bash * * ```sh * $ pulumi import huaweicloud:Cfw/addressGroupMember:AddressGroupMember test <group_id>/<id> * ``` */ class AddressGroupMember extends pulumi.CustomResource { /** * Get an existing AddressGroupMember 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 AddressGroupMember(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AddressGroupMember. 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'] === AddressGroupMember.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["addressType"] = state ? state.addressType : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; } else { const args = argsOrState; if ((!args || args.address === undefined) && !opts.urn) { throw new Error("Missing required property 'address'"); } if ((!args || args.groupId === undefined) && !opts.urn) { throw new Error("Missing required property 'groupId'"); } resourceInputs["address"] = args ? args.address : undefined; resourceInputs["addressType"] = args ? args.addressType : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AddressGroupMember.__pulumiType, name, resourceInputs, opts); } } exports.AddressGroupMember = AddressGroupMember; /** @internal */ AddressGroupMember.__pulumiType = 'huaweicloud:Cfw/addressGroupMember:AddressGroupMember'; //# sourceMappingURL=addressGroupMember.js.map