UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

84 lines 4.49 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.RuleGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); class RuleGroup extends pulumi.CustomResource { /** * Get an existing RuleGroup 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 RuleGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of RuleGroup. 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'] === RuleGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["capacity"] = state ? state.capacity : undefined; resourceInputs["customResponseBodies"] = state ? state.customResponseBodies : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["lockToken"] = state ? state.lockToken : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["namePrefix"] = state ? state.namePrefix : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["rules"] = state ? state.rules : undefined; resourceInputs["rulesJson"] = state ? state.rulesJson : undefined; resourceInputs["scope"] = state ? state.scope : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["visibilityConfig"] = state ? state.visibilityConfig : undefined; } else { const args = argsOrState; if ((!args || args.capacity === undefined) && !opts.urn) { throw new Error("Missing required property 'capacity'"); } if ((!args || args.scope === undefined) && !opts.urn) { throw new Error("Missing required property 'scope'"); } if ((!args || args.visibilityConfig === undefined) && !opts.urn) { throw new Error("Missing required property 'visibilityConfig'"); } resourceInputs["capacity"] = args ? args.capacity : undefined; resourceInputs["customResponseBodies"] = args ? args.customResponseBodies : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["namePrefix"] = args ? args.namePrefix : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["rules"] = args ? args.rules : undefined; resourceInputs["rulesJson"] = args ? args.rulesJson : undefined; resourceInputs["scope"] = args ? args.scope : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["visibilityConfig"] = args ? args.visibilityConfig : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["lockToken"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(RuleGroup.__pulumiType, name, resourceInputs, opts); } } exports.RuleGroup = RuleGroup; /** @internal */ RuleGroup.__pulumiType = 'aws:wafv2/ruleGroup:RuleGroup'; //# sourceMappingURL=ruleGroup.js.map