UNPKG

@pulumiverse/fortios

Version:

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

165 lines 7.83 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.Centralsnatmap = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Configure central SNAT policies. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const trname = new fortios.firewall.Centralsnatmap("trname", { * dstAddrs: [{ * name: "all", * }], * dstintfs: [{ * name: "port3", * }], * nat: "enable", * natPort: "0", * origAddrs: [{ * name: "all", * }], * origPort: "0", * policyid: 1, * protocol: 33, * srcintfs: [{ * name: "port1", * }], * status: "enable", * }); * ``` * * ## Import * * Firewall CentralSnatMap can be imported using any of these accepted formats: * * ```sh * $ pulumi import fortios:firewall/centralsnatmap:Centralsnatmap labelname {{policyid}} * ``` * * If you do not want to import arguments of block: * * $ export "FORTIOS_IMPORT_TABLE"="false" * * ```sh * $ pulumi import fortios:firewall/centralsnatmap:Centralsnatmap labelname {{policyid}} * ``` * * $ unset "FORTIOS_IMPORT_TABLE" */ class Centralsnatmap extends pulumi.CustomResource { /** * Get an existing Centralsnatmap 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 Centralsnatmap(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Centralsnatmap. 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'] === Centralsnatmap.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["comments"] = state ? state.comments : undefined; resourceInputs["dstAddr6s"] = state ? state.dstAddr6s : undefined; resourceInputs["dstAddrs"] = state ? state.dstAddrs : undefined; resourceInputs["dstPort"] = state ? state.dstPort : undefined; resourceInputs["dstintfs"] = state ? state.dstintfs : undefined; resourceInputs["dynamicSortSubtable"] = state ? state.dynamicSortSubtable : undefined; resourceInputs["getAllTables"] = state ? state.getAllTables : undefined; resourceInputs["nat"] = state ? state.nat : undefined; resourceInputs["nat46"] = state ? state.nat46 : undefined; resourceInputs["nat64"] = state ? state.nat64 : undefined; resourceInputs["natIppool6s"] = state ? state.natIppool6s : undefined; resourceInputs["natIppools"] = state ? state.natIppools : undefined; resourceInputs["natPort"] = state ? state.natPort : undefined; resourceInputs["origAddr6s"] = state ? state.origAddr6s : undefined; resourceInputs["origAddrs"] = state ? state.origAddrs : undefined; resourceInputs["origPort"] = state ? state.origPort : undefined; resourceInputs["policyid"] = state ? state.policyid : undefined; resourceInputs["portPreserve"] = state ? state.portPreserve : undefined; resourceInputs["protocol"] = state ? state.protocol : undefined; resourceInputs["srcintfs"] = state ? state.srcintfs : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; resourceInputs["vdomparam"] = state ? state.vdomparam : undefined; } else { const args = argsOrState; if ((!args || args.dstAddrs === undefined) && !opts.urn) { throw new Error("Missing required property 'dstAddrs'"); } if ((!args || args.dstintfs === undefined) && !opts.urn) { throw new Error("Missing required property 'dstintfs'"); } if ((!args || args.nat === undefined) && !opts.urn) { throw new Error("Missing required property 'nat'"); } if ((!args || args.origAddrs === undefined) && !opts.urn) { throw new Error("Missing required property 'origAddrs'"); } if ((!args || args.origPort === undefined) && !opts.urn) { throw new Error("Missing required property 'origPort'"); } if ((!args || args.protocol === undefined) && !opts.urn) { throw new Error("Missing required property 'protocol'"); } if ((!args || args.srcintfs === undefined) && !opts.urn) { throw new Error("Missing required property 'srcintfs'"); } resourceInputs["comments"] = args ? args.comments : undefined; resourceInputs["dstAddr6s"] = args ? args.dstAddr6s : undefined; resourceInputs["dstAddrs"] = args ? args.dstAddrs : undefined; resourceInputs["dstPort"] = args ? args.dstPort : undefined; resourceInputs["dstintfs"] = args ? args.dstintfs : undefined; resourceInputs["dynamicSortSubtable"] = args ? args.dynamicSortSubtable : undefined; resourceInputs["getAllTables"] = args ? args.getAllTables : undefined; resourceInputs["nat"] = args ? args.nat : undefined; resourceInputs["nat46"] = args ? args.nat46 : undefined; resourceInputs["nat64"] = args ? args.nat64 : undefined; resourceInputs["natIppool6s"] = args ? args.natIppool6s : undefined; resourceInputs["natIppools"] = args ? args.natIppools : undefined; resourceInputs["natPort"] = args ? args.natPort : undefined; resourceInputs["origAddr6s"] = args ? args.origAddr6s : undefined; resourceInputs["origAddrs"] = args ? args.origAddrs : undefined; resourceInputs["origPort"] = args ? args.origPort : undefined; resourceInputs["policyid"] = args ? args.policyid : undefined; resourceInputs["portPreserve"] = args ? args.portPreserve : undefined; resourceInputs["protocol"] = args ? args.protocol : undefined; resourceInputs["srcintfs"] = args ? args.srcintfs : undefined; resourceInputs["status"] = args ? args.status : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["uuid"] = args ? args.uuid : undefined; resourceInputs["vdomparam"] = args ? args.vdomparam : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Centralsnatmap.__pulumiType, name, resourceInputs, opts); } } exports.Centralsnatmap = Centralsnatmap; /** @internal */ Centralsnatmap.__pulumiType = 'fortios:firewall/centralsnatmap:Centralsnatmap'; //# sourceMappingURL=centralsnatmap.js.map