@pulumiverse/fortios
Version:
A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0
179 lines • 8.45 kB
JavaScript
// *** 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.Policy46 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Configure IPv4 to IPv6 policies. Applies to FortiOS Version `<= 7.0.0`.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fortios from "@pulumiverse/fortios";
*
* const trnameVip46 = new fortios.firewall.Vip46("trnameVip46", {
* arpReply: "enable",
* color: 0,
* extip: "10.1.100.55",
* extport: "0-65535",
* fosid: 0,
* ldbMethod: "static",
* mappedip: "2000:172:16:200::55",
* mappedport: "0-65535",
* portforward: "disable",
* protocol: "tcp",
* type: "static-nat",
* });
* const trnamePolicy46 = new fortios.firewall.Policy46("trnamePolicy46", {
* action: "deny",
* dstintf: "port3",
* fixedport: "disable",
* ippool: "disable",
* logtraffic: "disable",
* permitAnyHost: "disable",
* policyid: 2,
* schedule: "always",
* srcintf: "port2",
* status: "enable",
* tcpMssReceiver: 0,
* tcpMssSender: 0,
* dstaddrs: [{
* name: trnameVip46.name,
* }],
* services: [{
* name: "ALL",
* }],
* srcaddrs: [{
* name: "FIREWALL_AUTH_PORTAL_ADDRESS",
* }],
* });
* ```
*
* ## Import
*
* Firewall Policy46 can be imported using any of these accepted formats:
*
* ```sh
* $ pulumi import fortios:firewall/policy46:Policy46 labelname {{policyid}}
* ```
*
* If you do not want to import arguments of block:
*
* $ export "FORTIOS_IMPORT_TABLE"="false"
*
* ```sh
* $ pulumi import fortios:firewall/policy46:Policy46 labelname {{policyid}}
* ```
*
* $ unset "FORTIOS_IMPORT_TABLE"
*/
class Policy46 extends pulumi.CustomResource {
/**
* Get an existing Policy46 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 Policy46(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Policy46. 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'] === Policy46.__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["dstaddrs"] = state ? state.dstaddrs : undefined;
resourceInputs["dstintf"] = state ? state.dstintf : undefined;
resourceInputs["dynamicSortSubtable"] = state ? state.dynamicSortSubtable : undefined;
resourceInputs["fixedport"] = state ? state.fixedport : undefined;
resourceInputs["getAllTables"] = state ? state.getAllTables : undefined;
resourceInputs["ippool"] = state ? state.ippool : undefined;
resourceInputs["logtraffic"] = state ? state.logtraffic : undefined;
resourceInputs["logtrafficStart"] = state ? state.logtrafficStart : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["perIpShaper"] = state ? state.perIpShaper : undefined;
resourceInputs["permitAnyHost"] = state ? state.permitAnyHost : undefined;
resourceInputs["policyid"] = state ? state.policyid : undefined;
resourceInputs["poolnames"] = state ? state.poolnames : undefined;
resourceInputs["schedule"] = state ? state.schedule : undefined;
resourceInputs["services"] = state ? state.services : undefined;
resourceInputs["srcaddrs"] = state ? state.srcaddrs : undefined;
resourceInputs["srcintf"] = state ? state.srcintf : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tcpMssReceiver"] = state ? state.tcpMssReceiver : undefined;
resourceInputs["tcpMssSender"] = state ? state.tcpMssSender : undefined;
resourceInputs["trafficShaper"] = state ? state.trafficShaper : undefined;
resourceInputs["trafficShaperReverse"] = state ? state.trafficShaperReverse : 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.dstintf === undefined) && !opts.urn) {
throw new Error("Missing required property 'dstintf'");
}
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'");
}
if ((!args || args.srcintf === undefined) && !opts.urn) {
throw new Error("Missing required property 'srcintf'");
}
resourceInputs["action"] = args ? args.action : undefined;
resourceInputs["comments"] = args ? args.comments : undefined;
resourceInputs["dstaddrs"] = args ? args.dstaddrs : undefined;
resourceInputs["dstintf"] = args ? args.dstintf : undefined;
resourceInputs["dynamicSortSubtable"] = args ? args.dynamicSortSubtable : undefined;
resourceInputs["fixedport"] = args ? args.fixedport : undefined;
resourceInputs["getAllTables"] = args ? args.getAllTables : undefined;
resourceInputs["ippool"] = args ? args.ippool : undefined;
resourceInputs["logtraffic"] = args ? args.logtraffic : undefined;
resourceInputs["logtrafficStart"] = args ? args.logtrafficStart : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["perIpShaper"] = args ? args.perIpShaper : undefined;
resourceInputs["permitAnyHost"] = args ? args.permitAnyHost : undefined;
resourceInputs["policyid"] = args ? args.policyid : undefined;
resourceInputs["poolnames"] = args ? args.poolnames : undefined;
resourceInputs["schedule"] = args ? args.schedule : undefined;
resourceInputs["services"] = args ? args.services : undefined;
resourceInputs["srcaddrs"] = args ? args.srcaddrs : undefined;
resourceInputs["srcintf"] = args ? args.srcintf : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["tcpMssReceiver"] = args ? args.tcpMssReceiver : undefined;
resourceInputs["tcpMssSender"] = args ? args.tcpMssSender : undefined;
resourceInputs["trafficShaper"] = args ? args.trafficShaper : undefined;
resourceInputs["trafficShaperReverse"] = args ? args.trafficShaperReverse : undefined;
resourceInputs["uuid"] = args ? args.uuid : undefined;
resourceInputs["vdomparam"] = args ? args.vdomparam : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Policy46.__pulumiType, name, resourceInputs, opts);
}
}
exports.Policy46 = Policy46;
/** @internal */
Policy46.__pulumiType = 'fortios:firewall/policy46:Policy46';
//# sourceMappingURL=policy46.js.map
;