UNPKG

@pulumi/fastly

Version:

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

98 lines 3.81 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.NgwafAccountList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Fastly Next-Gen WAF **List** resource scoped to an **account**. * * Account-scoped lists are reusable across all workspaces in the account and can be referenced in account-level or workspace-level rules. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fastly from "@pulumi/fastly"; * * const example = new fastly.NgwafAccountList("example", { * name: "shared-bot-ip-list", * description: "List of known bot IPs shared across workspaces", * type: "ip", * entries: [ * "1.2.3.4", * "5.6.7.8", * "203.0.113.42", * ], * }); * ``` * * ## Import * * Fastly Next-Gen WAF account-scoped lists can be imported using just the list ID, e.g.: * * ```sh * $ pulumi import fastly:index/ngwafAccountList:NgwafAccountList demo <listID> * ``` */ class NgwafAccountList extends pulumi.CustomResource { /** * Get an existing NgwafAccountList 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 NgwafAccountList(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of NgwafAccountList. 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'] === NgwafAccountList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["appliesTos"] = state?.appliesTos; resourceInputs["description"] = state?.description; resourceInputs["entries"] = state?.entries; resourceInputs["name"] = state?.name; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.entries === undefined && !opts.urn) { throw new Error("Missing required property 'entries'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["description"] = args?.description; resourceInputs["entries"] = args?.entries; resourceInputs["name"] = args?.name; resourceInputs["type"] = args?.type; resourceInputs["appliesTos"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["appliesTos"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(NgwafAccountList.__pulumiType, name, resourceInputs, opts); } } exports.NgwafAccountList = NgwafAccountList; /** @internal */ NgwafAccountList.__pulumiType = 'fastly:index/ngwafAccountList:NgwafAccountList'; //# sourceMappingURL=ngwafAccountList.js.map