UNPKG

@pulumiverse/fortios

Version:

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

151 lines 7.04 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.Dnsdatabase = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Configure DNS databases. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumiverse/fortios"; * * const trname = new fortios.system.Dnsdatabase("trname", { * authoritative: "enable", * contact: "hostmaster", * dnsEntries: [{ * hostname: "sghsgh.com", * ttl: 3, * type: "MX", * }], * domain: "s.com", * forwarder: "\"9.9.9.9\" \"3.3.3.3\" ", * ipMaster: "0.0.0.0", * primaryName: "dns", * sourceIp: "0.0.0.0", * status: "enable", * ttl: 86400, * type: "master", * view: "shadow", * }); * ``` * * ## Import * * System DnsDatabase can be imported using any of these accepted formats: * * ```sh * $ pulumi import fortios:system/dnsdatabase:Dnsdatabase labelname {{name}} * ``` * * If you do not want to import arguments of block: * * $ export "FORTIOS_IMPORT_TABLE"="false" * * ```sh * $ pulumi import fortios:system/dnsdatabase:Dnsdatabase labelname {{name}} * ``` * * $ unset "FORTIOS_IMPORT_TABLE" */ class Dnsdatabase extends pulumi.CustomResource { /** * Get an existing Dnsdatabase 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 Dnsdatabase(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Dnsdatabase. 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'] === Dnsdatabase.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowTransfer"] = state ? state.allowTransfer : undefined; resourceInputs["authoritative"] = state ? state.authoritative : undefined; resourceInputs["contact"] = state ? state.contact : undefined; resourceInputs["dnsEntries"] = state ? state.dnsEntries : undefined; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["dynamicSortSubtable"] = state ? state.dynamicSortSubtable : undefined; resourceInputs["forwarder"] = state ? state.forwarder : undefined; resourceInputs["forwarder6"] = state ? state.forwarder6 : undefined; resourceInputs["getAllTables"] = state ? state.getAllTables : undefined; resourceInputs["ipMaster"] = state ? state.ipMaster : undefined; resourceInputs["ipPrimary"] = state ? state.ipPrimary : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["primaryName"] = state ? state.primaryName : undefined; resourceInputs["rrMax"] = state ? state.rrMax : undefined; resourceInputs["sourceIp"] = state ? state.sourceIp : undefined; resourceInputs["sourceIp6"] = state ? state.sourceIp6 : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["ttl"] = state ? state.ttl : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["vdomparam"] = state ? state.vdomparam : undefined; resourceInputs["view"] = state ? state.view : undefined; } else { const args = argsOrState; if ((!args || args.authoritative === undefined) && !opts.urn) { throw new Error("Missing required property 'authoritative'"); } if ((!args || args.domain === undefined) && !opts.urn) { throw new Error("Missing required property 'domain'"); } if ((!args || args.ttl === undefined) && !opts.urn) { throw new Error("Missing required property 'ttl'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } if ((!args || args.view === undefined) && !opts.urn) { throw new Error("Missing required property 'view'"); } resourceInputs["allowTransfer"] = args ? args.allowTransfer : undefined; resourceInputs["authoritative"] = args ? args.authoritative : undefined; resourceInputs["contact"] = args ? args.contact : undefined; resourceInputs["dnsEntries"] = args ? args.dnsEntries : undefined; resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["dynamicSortSubtable"] = args ? args.dynamicSortSubtable : undefined; resourceInputs["forwarder"] = args ? args.forwarder : undefined; resourceInputs["forwarder6"] = args ? args.forwarder6 : undefined; resourceInputs["getAllTables"] = args ? args.getAllTables : undefined; resourceInputs["ipMaster"] = args ? args.ipMaster : undefined; resourceInputs["ipPrimary"] = args ? args.ipPrimary : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["primaryName"] = args ? args.primaryName : undefined; resourceInputs["rrMax"] = args ? args.rrMax : undefined; resourceInputs["sourceIp"] = args ? args.sourceIp : undefined; resourceInputs["sourceIp6"] = args ? args.sourceIp6 : undefined; resourceInputs["status"] = args ? args.status : undefined; resourceInputs["ttl"] = args ? args.ttl : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["vdomparam"] = args ? args.vdomparam : undefined; resourceInputs["view"] = args ? args.view : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Dnsdatabase.__pulumiType, name, resourceInputs, opts); } } exports.Dnsdatabase = Dnsdatabase; /** @internal */ Dnsdatabase.__pulumiType = 'fortios:system/dnsdatabase:Dnsdatabase'; //# sourceMappingURL=dnsdatabase.js.map