UNPKG

@pulumiverse/fortios

Version:

A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0

152 lines 7.8 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.Localinpolicy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Configure user defined IPv4 local-in policies. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const trname = new fortios.firewall.Localinpolicy("trname", { * action: "accept", * dstaddrs: [{ * name: "all", * }], * haMgmtIntfOnly: "disable", * intf: "port4", * policyid: 1, * schedule: "always", * services: [{ * name: "ALL", * }], * srcaddrs: [{ * name: "all", * }], * status: "enable", * }); * ``` * * ## Import * * Firewall LocalInPolicy can be imported using any of these accepted formats: * * ```sh * $ pulumi import fortios:firewall/localinpolicy:Localinpolicy labelname {{policyid}} * ``` * * If you do not want to import arguments of block: * * $ export "FORTIOS_IMPORT_TABLE"="false" * * ```sh * $ pulumi import fortios:firewall/localinpolicy:Localinpolicy labelname {{policyid}} * ``` * * $ unset "FORTIOS_IMPORT_TABLE" */ class Localinpolicy extends pulumi.CustomResource { /** * Get an existing Localinpolicy 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 Localinpolicy(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Localinpolicy. 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'] === Localinpolicy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state ? state.action : undefined; resourceInputs["comments"] = state ? state.comments : undefined; resourceInputs["dstaddrNegate"] = state ? state.dstaddrNegate : undefined; resourceInputs["dstaddrs"] = state ? state.dstaddrs : undefined; resourceInputs["dynamicSortSubtable"] = state ? state.dynamicSortSubtable : undefined; resourceInputs["getAllTables"] = state ? state.getAllTables : undefined; resourceInputs["haMgmtIntfOnly"] = state ? state.haMgmtIntfOnly : undefined; resourceInputs["internetServiceSrc"] = state ? state.internetServiceSrc : undefined; resourceInputs["internetServiceSrcCustomGroups"] = state ? state.internetServiceSrcCustomGroups : undefined; resourceInputs["internetServiceSrcCustoms"] = state ? state.internetServiceSrcCustoms : undefined; resourceInputs["internetServiceSrcGroups"] = state ? state.internetServiceSrcGroups : undefined; resourceInputs["internetServiceSrcNames"] = state ? state.internetServiceSrcNames : undefined; resourceInputs["internetServiceSrcNegate"] = state ? state.internetServiceSrcNegate : undefined; resourceInputs["intf"] = state ? state.intf : undefined; resourceInputs["intfBlocks"] = state ? state.intfBlocks : undefined; resourceInputs["policyid"] = state ? state.policyid : undefined; resourceInputs["schedule"] = state ? state.schedule : undefined; resourceInputs["serviceNegate"] = state ? state.serviceNegate : undefined; resourceInputs["services"] = state ? state.services : undefined; resourceInputs["srcaddrNegate"] = state ? state.srcaddrNegate : undefined; resourceInputs["srcaddrs"] = state ? state.srcaddrs : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; resourceInputs["vdomparam"] = state ? state.vdomparam : undefined; resourceInputs["virtualPatch"] = state ? state.virtualPatch : undefined; } else { const args = argsOrState; if ((!args || args.dstaddrs === undefined) && !opts.urn) { throw new Error("Missing required property 'dstaddrs'"); } if ((!args || args.schedule === undefined) && !opts.urn) { throw new Error("Missing required property 'schedule'"); } if ((!args || args.srcaddrs === undefined) && !opts.urn) { throw new Error("Missing required property 'srcaddrs'"); } resourceInputs["action"] = args ? args.action : undefined; resourceInputs["comments"] = args ? args.comments : undefined; resourceInputs["dstaddrNegate"] = args ? args.dstaddrNegate : undefined; resourceInputs["dstaddrs"] = args ? args.dstaddrs : undefined; resourceInputs["dynamicSortSubtable"] = args ? args.dynamicSortSubtable : undefined; resourceInputs["getAllTables"] = args ? args.getAllTables : undefined; resourceInputs["haMgmtIntfOnly"] = args ? args.haMgmtIntfOnly : undefined; resourceInputs["internetServiceSrc"] = args ? args.internetServiceSrc : undefined; resourceInputs["internetServiceSrcCustomGroups"] = args ? args.internetServiceSrcCustomGroups : undefined; resourceInputs["internetServiceSrcCustoms"] = args ? args.internetServiceSrcCustoms : undefined; resourceInputs["internetServiceSrcGroups"] = args ? args.internetServiceSrcGroups : undefined; resourceInputs["internetServiceSrcNames"] = args ? args.internetServiceSrcNames : undefined; resourceInputs["internetServiceSrcNegate"] = args ? args.internetServiceSrcNegate : undefined; resourceInputs["intf"] = args ? args.intf : undefined; resourceInputs["intfBlocks"] = args ? args.intfBlocks : undefined; resourceInputs["policyid"] = args ? args.policyid : undefined; resourceInputs["schedule"] = args ? args.schedule : undefined; resourceInputs["serviceNegate"] = args ? args.serviceNegate : undefined; resourceInputs["services"] = args ? args.services : undefined; resourceInputs["srcaddrNegate"] = args ? args.srcaddrNegate : undefined; resourceInputs["srcaddrs"] = args ? args.srcaddrs : undefined; resourceInputs["status"] = args ? args.status : undefined; resourceInputs["uuid"] = args ? args.uuid : undefined; resourceInputs["vdomparam"] = args ? args.vdomparam : undefined; resourceInputs["virtualPatch"] = args ? args.virtualPatch : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Localinpolicy.__pulumiType, name, resourceInputs, opts); } } exports.Localinpolicy = Localinpolicy; /** @internal */ Localinpolicy.__pulumiType = 'fortios:firewall/localinpolicy:Localinpolicy'; //# sourceMappingURL=localinpolicy.js.map