UNPKG

@pulumiverse/fortios

Version:

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

131 lines 5.4 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.ObjectAddress = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to configure firewall addresses used in firewall policies of FortiOS. * * !> **Warning:** The resource will be deprecated and replaced by new resource `fortios.firewall.Address`, we recommend that you use the new resource. * * ## Example Usage * * ### Iprange Address * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const s1 = new fortios.firewall.ObjectAddress("s1", { * comment: "dd", * endIp: "2.0.0.0", * startIp: "1.0.0.0", * type: "iprange", * }); * ``` * * ### Geography Address * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const s2 = new fortios.firewall.ObjectAddress("s2", { * comment: "dd", * country: "AO", * type: "geography", * }); * ``` * * ### Fqdn Address * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const s3 = new fortios.firewall.ObjectAddress("s3", { * associatedInterface: "port4", * comment: "dd", * fqdn: "baid.com", * showInAddressList: "disable", * staticRouteConfigure: "enable", * type: "fqdn", * }); * ``` * * ### Ipmask Address * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const s4 = new fortios.firewall.ObjectAddress("s4", { * comment: "dd", * subnet: "0.0.0.0 0.0.0.0", * type: "ipmask", * }); * ``` */ class ObjectAddress extends pulumi.CustomResource { /** * Get an existing ObjectAddress 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 ObjectAddress(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ObjectAddress. 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'] === ObjectAddress.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["associatedInterface"] = state ? state.associatedInterface : undefined; resourceInputs["comment"] = state ? state.comment : undefined; resourceInputs["country"] = state ? state.country : undefined; resourceInputs["endIp"] = state ? state.endIp : undefined; resourceInputs["fqdn"] = state ? state.fqdn : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["showInAddressList"] = state ? state.showInAddressList : undefined; resourceInputs["startIp"] = state ? state.startIp : undefined; resourceInputs["staticRouteConfigure"] = state ? state.staticRouteConfigure : undefined; resourceInputs["subnet"] = state ? state.subnet : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["associatedInterface"] = args ? args.associatedInterface : undefined; resourceInputs["comment"] = args ? args.comment : undefined; resourceInputs["country"] = args ? args.country : undefined; resourceInputs["endIp"] = args ? args.endIp : undefined; resourceInputs["fqdn"] = args ? args.fqdn : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["showInAddressList"] = args ? args.showInAddressList : undefined; resourceInputs["startIp"] = args ? args.startIp : undefined; resourceInputs["staticRouteConfigure"] = args ? args.staticRouteConfigure : undefined; resourceInputs["subnet"] = args ? args.subnet : undefined; resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ObjectAddress.__pulumiType, name, resourceInputs, opts); } } exports.ObjectAddress = ObjectAddress; /** @internal */ ObjectAddress.__pulumiType = 'fortios:firewall/objectAddress:ObjectAddress'; //# sourceMappingURL=objectAddress.js.map