UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

87 lines 3.9 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.IpsRuleModeChange = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a CFW IPS rule mode change resource within HuaweiCloud. * * > This resource is only a one-time action resource for operating the API. * Deleting this resource will not clear the corresponding request record, * but will only remove the resource information from the tfstate file. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const objectId = config.requireObject("objectId"); * const ipsIds = config.requireObject("ipsIds"); * const status = config.requireObject("status"); * const test = new huaweicloud.cfw.IpsRuleModeChange("test", { * objectId: objectId, * ipsIds: ipsIds, * status: status, * }); * ``` */ class IpsRuleModeChange extends pulumi.CustomResource { /** * Get an existing IpsRuleModeChange 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 IpsRuleModeChange(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of IpsRuleModeChange. 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'] === IpsRuleModeChange.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined; resourceInputs["ipsIds"] = state ? state.ipsIds : undefined; resourceInputs["objectId"] = state ? state.objectId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; } else { const args = argsOrState; if ((!args || args.objectId === undefined) && !opts.urn) { throw new Error("Missing required property 'objectId'"); } if ((!args || args.status === undefined) && !opts.urn) { throw new Error("Missing required property 'status'"); } resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined; resourceInputs["ipsIds"] = args ? args.ipsIds : undefined; resourceInputs["objectId"] = args ? args.objectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["status"] = args ? args.status : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(IpsRuleModeChange.__pulumiType, name, resourceInputs, opts); } } exports.IpsRuleModeChange = IpsRuleModeChange; /** @internal */ IpsRuleModeChange.__pulumiType = 'huaweicloud:Cfw/ipsRuleModeChange:IpsRuleModeChange'; //# sourceMappingURL=ipsRuleModeChange.js.map