UNPKG

@pulumi/f5bigip

Version:

A Pulumi package for creating and managing F5 BigIP resources.

197 lines • 8.8 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.WafPolicy = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * `f5bigip.WafPolicy` Manages a WAF Policy resource with its adjustments and modifications on a BIG-IP. * It outputs an up-to-date WAF Policy in a JSON format * * * [Declarative WAF documentation](https://clouddocs.f5.com/products/waf-declarative-policy/declarative_policy_v16_1.html) * * > **NOTE** This Resource Requires F5 BIG-IP v16.x above version, and ASM need to be provisioned. * * > **NOTE** For BIG-IP v17.x above version,Terraform BIG-IP Provider version must be > v1.23.0 * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const param1 = f5bigip.ssl.getWafEntityParameter({ * name: "Param1", * type: "explicit", * dataType: "alpha-numeric", * performStaging: true, * }); * const param2 = f5bigip.ssl.getWafEntityParameter({ * name: "Param2", * type: "explicit", * dataType: "alpha-numeric", * performStaging: true, * }); * const URL = f5bigip.ssl.getWafEntityUrl({ * name: "URL1", * protocol: "http", * }); * const URL2 = f5bigip.ssl.getWafEntityUrl({ * name: "URL2", * }); * const test_awaf = new f5bigip.WafPolicy("test-awaf", { * name: "testpolicyravi", * partition: "Common", * templateName: "POLICY_TEMPLATE_RAPID_DEPLOYMENT", * applicationLanguage: "utf-8", * enforcementMode: "blocking", * serverTechnologies: [ * "MySQL", * "Unix/Linux", * "MongoDB", * ], * parameters: [ * param1.then(param1 => param1.json), * param2.then(param2 => param2.json), * ], * urls: [ * URL.then(URL => URL.json), * URL2.then(URL2 => URL2.json), * ], * }); * ``` * * ## Import * * An existing WAF Policy or if the WAF Policy has been manually created or modified on the BIG-IP WebUI, it can be imported using its `id`. * * e.g: * * ```sh * $ pulumi import f5bigip:index/wafPolicy:WafPolicy example <id> * ``` */ class WafPolicy extends pulumi.CustomResource { /** * Get an existing WafPolicy 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 WafPolicy(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'f5bigip:index/wafPolicy:WafPolicy'; /** * Returns true if the given object is an instance of WafPolicy. 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'] === WafPolicy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationLanguage"] = state?.applicationLanguage; resourceInputs["caseInsensitive"] = state?.caseInsensitive; resourceInputs["description"] = state?.description; resourceInputs["enablePassivemode"] = state?.enablePassivemode; resourceInputs["enforcementMode"] = state?.enforcementMode; resourceInputs["fileTypes"] = state?.fileTypes; resourceInputs["graphqlProfiles"] = state?.graphqlProfiles; resourceInputs["hostNames"] = state?.hostNames; resourceInputs["ipExceptions"] = state?.ipExceptions; resourceInputs["modifications"] = state?.modifications; resourceInputs["name"] = state?.name; resourceInputs["openApiFiles"] = state?.openApiFiles; resourceInputs["parameters"] = state?.parameters; resourceInputs["partition"] = state?.partition; resourceInputs["policyBuilders"] = state?.policyBuilders; resourceInputs["policyExportJson"] = state?.policyExportJson; resourceInputs["policyId"] = state?.policyId; resourceInputs["policyImportJson"] = state?.policyImportJson; resourceInputs["protocolIndependent"] = state?.protocolIndependent; resourceInputs["serverTechnologies"] = state?.serverTechnologies; resourceInputs["signatureSets"] = state?.signatureSets; resourceInputs["signatures"] = state?.signatures; resourceInputs["signaturesSettings"] = state?.signaturesSettings; resourceInputs["templateLink"] = state?.templateLink; resourceInputs["templateName"] = state?.templateName; resourceInputs["type"] = state?.type; resourceInputs["urls"] = state?.urls; } else { const args = argsOrState; if (args?.name === undefined && !opts.urn) { throw new Error("Missing required property 'name'"); } if (args?.templateName === undefined && !opts.urn) { throw new Error("Missing required property 'templateName'"); } resourceInputs["applicationLanguage"] = args?.applicationLanguage; resourceInputs["caseInsensitive"] = args?.caseInsensitive; resourceInputs["description"] = args?.description; resourceInputs["enablePassivemode"] = args?.enablePassivemode; resourceInputs["enforcementMode"] = args?.enforcementMode; resourceInputs["fileTypes"] = args?.fileTypes; resourceInputs["graphqlProfiles"] = args?.graphqlProfiles; resourceInputs["hostNames"] = args?.hostNames; resourceInputs["ipExceptions"] = args?.ipExceptions; resourceInputs["modifications"] = args?.modifications; resourceInputs["name"] = args?.name; resourceInputs["openApiFiles"] = args?.openApiFiles; resourceInputs["parameters"] = args?.parameters; resourceInputs["partition"] = args?.partition; resourceInputs["policyBuilders"] = args?.policyBuilders; resourceInputs["policyId"] = args?.policyId; resourceInputs["policyImportJson"] = args?.policyImportJson; resourceInputs["protocolIndependent"] = args?.protocolIndependent; resourceInputs["serverTechnologies"] = args?.serverTechnologies; resourceInputs["signatureSets"] = args?.signatureSets; resourceInputs["signatures"] = args?.signatures; resourceInputs["signaturesSettings"] = args?.signaturesSettings; resourceInputs["templateLink"] = args?.templateLink; resourceInputs["templateName"] = args?.templateName; resourceInputs["type"] = args?.type; resourceInputs["urls"] = args?.urls; resourceInputs["policyExportJson"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WafPolicy.__pulumiType, name, resourceInputs, opts); } } exports.WafPolicy = WafPolicy; //# sourceMappingURL=wafPolicy.js.map