UNPKG

@pulumi/fastly

Version:

A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4

118 lines 4.75 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.NgwafThresholds = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Fastly Next-Gen WAF Threshold. Operations related to managing workspace thresholds. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fastly from "@pulumi/fastly"; * * const demo = new fastly.NgwafThresholds("demo", { * action: "block", * dontNotify: false, * duration: 86400, * enabled: true, * interval: 3600, * limit: 10, * name: "%s", * signal: "SQLI", * workspaceId: example.id, * }); * ``` * * ## Import * * Fastly Next-Gen WAF Thresholds can be imported using their workspace and Threshold ID, e.g. * * ```sh * $ pulumi import fastly:index/ngwafThresholds:NgwafThresholds example <workspace_id>/<threshold_id> * ``` */ class NgwafThresholds extends pulumi.CustomResource { /** * Get an existing NgwafThresholds 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 NgwafThresholds(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of NgwafThresholds. 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'] === NgwafThresholds.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state?.action; resourceInputs["dontNotify"] = state?.dontNotify; resourceInputs["duration"] = state?.duration; resourceInputs["enabled"] = state?.enabled; resourceInputs["interval"] = state?.interval; resourceInputs["limit"] = state?.limit; resourceInputs["name"] = state?.name; resourceInputs["signal"] = state?.signal; resourceInputs["workspaceId"] = state?.workspaceId; } else { const args = argsOrState; if (args?.action === undefined && !opts.urn) { throw new Error("Missing required property 'action'"); } if (args?.dontNotify === undefined && !opts.urn) { throw new Error("Missing required property 'dontNotify'"); } if (args?.enabled === undefined && !opts.urn) { throw new Error("Missing required property 'enabled'"); } if (args?.interval === undefined && !opts.urn) { throw new Error("Missing required property 'interval'"); } if (args?.limit === undefined && !opts.urn) { throw new Error("Missing required property 'limit'"); } if (args?.signal === undefined && !opts.urn) { throw new Error("Missing required property 'signal'"); } if (args?.workspaceId === undefined && !opts.urn) { throw new Error("Missing required property 'workspaceId'"); } resourceInputs["action"] = args?.action; resourceInputs["dontNotify"] = args?.dontNotify; resourceInputs["duration"] = args?.duration; resourceInputs["enabled"] = args?.enabled; resourceInputs["interval"] = args?.interval; resourceInputs["limit"] = args?.limit; resourceInputs["name"] = args?.name; resourceInputs["signal"] = args?.signal; resourceInputs["workspaceId"] = args?.workspaceId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NgwafThresholds.__pulumiType, name, resourceInputs, opts); } } exports.NgwafThresholds = NgwafThresholds; /** @internal */ NgwafThresholds.__pulumiType = 'fastly:index/ngwafThresholds:NgwafThresholds'; //# sourceMappingURL=ngwafThresholds.js.map