@pulumi/cloudngfwaws
Version: 
A Pulumi package for creating and managing Cloud NGFW for AWS resources.
110 lines • 4.39 kB
JavaScript
;
// *** 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.PrefixList = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
 * Resource for prefix list manipulation.
 *
 * ## Admin Permission Type
 *
 * * `Rulestack` (for `scope="Local"`)
 * * `Global Rulestack` (for `scope="Global"`)
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudngfwaws from "@pulumi/cloudngfwaws";
 *
 * const r = new cloudngfwaws.Rulestack("r", {
 *     name: "terraform-rulestack",
 *     scope: "Local",
 *     accountId: "123456789",
 *     description: "Made by Pulumi",
 *     profileConfig: {
 *         antiSpyware: "BestPractice",
 *     },
 * });
 * const example = new cloudngfwaws.PrefixList("example", {
 *     rulestack: r.name,
 *     name: "tf-prefix-list",
 *     description: "Also configured by Terraform",
 *     prefixLists: [
 *         "192.168.0.0",
 *         "10.1.5.0",
 *     ],
 *     auditComment: "initial config",
 * });
 * ```
 *
 * ## Import
 *
 * import name is <scope>:<rulestack>:<prefix_list_name>
 *
 * ```sh
 * $ pulumi import cloudngfwaws:index/prefixList:PrefixList example Local:terraform-rulestack:tf-prefix-list
 * ```
 */
class PrefixList extends pulumi.CustomResource {
    /**
     * Get an existing PrefixList 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 PrefixList(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of PrefixList.  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'] === PrefixList.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["auditComment"] = state ? state.auditComment : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["name"] = state ? state.name : undefined;
            resourceInputs["prefixLists"] = state ? state.prefixLists : undefined;
            resourceInputs["rulestack"] = state ? state.rulestack : undefined;
            resourceInputs["scope"] = state ? state.scope : undefined;
            resourceInputs["updateToken"] = state ? state.updateToken : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.prefixLists === undefined) && !opts.urn) {
                throw new Error("Missing required property 'prefixLists'");
            }
            if ((!args || args.rulestack === undefined) && !opts.urn) {
                throw new Error("Missing required property 'rulestack'");
            }
            resourceInputs["auditComment"] = args ? args.auditComment : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["prefixLists"] = args ? args.prefixLists : undefined;
            resourceInputs["rulestack"] = args ? args.rulestack : undefined;
            resourceInputs["scope"] = args ? args.scope : undefined;
            resourceInputs["updateToken"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(PrefixList.__pulumiType, name, resourceInputs, opts);
    }
}
exports.PrefixList = PrefixList;
/** @internal */
PrefixList.__pulumiType = 'cloudngfwaws:index/prefixList:PrefixList';
//# sourceMappingURL=prefixList.js.map