UNPKG

@pulumiverse/fortios

Version:

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

93 lines 4.1 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.ApiuserSetting = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to configure API users of FortiOS. The API user of the token for this feature should have a super admin profile, It can be set in CLI while GUI does not allow. * * !> **Warning:** The resource will be deprecated and replaced by new resource `fortios.system.Apiuser`, we recommend that you use the new resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const test2 = new fortios.system.ApiuserSetting("test2", { * accprofile: "restAPIprofile", * trusthosts: [ * { * ipv4Trusthost: "61.149.0.0 255.255.0.0", * type: "ipv4-trusthost", * }, * { * ipv4Trusthost: "22.22.0.0 255.255.0.0", * type: "ipv4-trusthost", * }, * ], * vdoms: ["root"], * }); * ``` */ class ApiuserSetting extends pulumi.CustomResource { /** * Get an existing ApiuserSetting 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 ApiuserSetting(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ApiuserSetting. 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'] === ApiuserSetting.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accprofile"] = state ? state.accprofile : undefined; resourceInputs["comments"] = state ? state.comments : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["trusthosts"] = state ? state.trusthosts : undefined; resourceInputs["vdoms"] = state ? state.vdoms : undefined; } else { const args = argsOrState; if ((!args || args.accprofile === undefined) && !opts.urn) { throw new Error("Missing required property 'accprofile'"); } if ((!args || args.trusthosts === undefined) && !opts.urn) { throw new Error("Missing required property 'trusthosts'"); } if ((!args || args.vdoms === undefined) && !opts.urn) { throw new Error("Missing required property 'vdoms'"); } resourceInputs["accprofile"] = args ? args.accprofile : undefined; resourceInputs["comments"] = args ? args.comments : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["trusthosts"] = args ? args.trusthosts : undefined; resourceInputs["vdoms"] = args ? args.vdoms : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ApiuserSetting.__pulumiType, name, resourceInputs, opts); } } exports.ApiuserSetting = ApiuserSetting; /** @internal */ ApiuserSetting.__pulumiType = 'fortios:system/apiuserSetting:ApiuserSetting'; //# sourceMappingURL=apiuserSetting.js.map