UNPKG

@pulumi/f5bigip

Version:

A Pulumi package for creating and managing F5 BigIP resources.

165 lines • 8.29 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.WafPolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## 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, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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 ? state.applicationLanguage : undefined; resourceInputs["caseInsensitive"] = state ? state.caseInsensitive : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["enablePassivemode"] = state ? state.enablePassivemode : undefined; resourceInputs["enforcementMode"] = state ? state.enforcementMode : undefined; resourceInputs["fileTypes"] = state ? state.fileTypes : undefined; resourceInputs["graphqlProfiles"] = state ? state.graphqlProfiles : undefined; resourceInputs["hostNames"] = state ? state.hostNames : undefined; resourceInputs["ipExceptions"] = state ? state.ipExceptions : undefined; resourceInputs["modifications"] = state ? state.modifications : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["openApiFiles"] = state ? state.openApiFiles : undefined; resourceInputs["parameters"] = state ? state.parameters : undefined; resourceInputs["partition"] = state ? state.partition : undefined; resourceInputs["policyBuilders"] = state ? state.policyBuilders : undefined; resourceInputs["policyExportJson"] = state ? state.policyExportJson : undefined; resourceInputs["policyId"] = state ? state.policyId : undefined; resourceInputs["policyImportJson"] = state ? state.policyImportJson : undefined; resourceInputs["protocolIndependent"] = state ? state.protocolIndependent : undefined; resourceInputs["serverTechnologies"] = state ? state.serverTechnologies : undefined; resourceInputs["signatureSets"] = state ? state.signatureSets : undefined; resourceInputs["signatures"] = state ? state.signatures : undefined; resourceInputs["signaturesSettings"] = state ? state.signaturesSettings : undefined; resourceInputs["templateLink"] = state ? state.templateLink : undefined; resourceInputs["templateName"] = state ? state.templateName : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["urls"] = state ? state.urls : undefined; } else { const args = argsOrState; if ((!args || args.name === undefined) && !opts.urn) { throw new Error("Missing required property 'name'"); } if ((!args || args.templateName === undefined) && !opts.urn) { throw new Error("Missing required property 'templateName'"); } resourceInputs["applicationLanguage"] = args ? args.applicationLanguage : undefined; resourceInputs["caseInsensitive"] = args ? args.caseInsensitive : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enablePassivemode"] = args ? args.enablePassivemode : undefined; resourceInputs["enforcementMode"] = args ? args.enforcementMode : undefined; resourceInputs["fileTypes"] = args ? args.fileTypes : undefined; resourceInputs["graphqlProfiles"] = args ? args.graphqlProfiles : undefined; resourceInputs["hostNames"] = args ? args.hostNames : undefined; resourceInputs["ipExceptions"] = args ? args.ipExceptions : undefined; resourceInputs["modifications"] = args ? args.modifications : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["openApiFiles"] = args ? args.openApiFiles : undefined; resourceInputs["parameters"] = args ? args.parameters : undefined; resourceInputs["partition"] = args ? args.partition : undefined; resourceInputs["policyBuilders"] = args ? args.policyBuilders : undefined; resourceInputs["policyId"] = args ? args.policyId : undefined; resourceInputs["policyImportJson"] = args ? args.policyImportJson : undefined; resourceInputs["protocolIndependent"] = args ? args.protocolIndependent : undefined; resourceInputs["serverTechnologies"] = args ? args.serverTechnologies : undefined; resourceInputs["signatureSets"] = args ? args.signatureSets : undefined; resourceInputs["signatures"] = args ? args.signatures : undefined; resourceInputs["signaturesSettings"] = args ? args.signaturesSettings : undefined; resourceInputs["templateLink"] = args ? args.templateLink : undefined; resourceInputs["templateName"] = args ? args.templateName : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["urls"] = args ? args.urls : undefined; resourceInputs["policyExportJson"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WafPolicy.__pulumiType, name, resourceInputs, opts); } } exports.WafPolicy = WafPolicy; /** @internal */ WafPolicy.__pulumiType = 'f5bigip:index/wafPolicy:WafPolicy'; //# sourceMappingURL=wafPolicy.js.map