@pulumiverse/fortios
Version:
A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0
150 lines • 7.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.Ddns = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Configure DDNS.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fortios from "@pulumiverse/fortios";
*
* const trname = new fortios.system.Ddns("trname", {
* boundIp: "0.0.0.0",
* clearText: "disable",
* ddnsAuth: "disable",
* ddnsDomain: "www.s.com",
* ddnsPassword: "ewewcd",
* ddnsServer: "tzo.com",
* ddnsServerIp: "0.0.0.0",
* ddnsTtl: 300,
* ddnsUsername: "sie2ae",
* ddnsid: 1,
* monitorInterfaces: [{
* interfaceName: "port2",
* }],
* sslCertificate: "Fortinet_Factory",
* updateInterval: 300,
* usePublicIp: "disable",
* });
* ```
*
* ## Import
*
* System Ddns can be imported using any of these accepted formats:
*
* ```sh
* $ pulumi import fortios:system/ddns:Ddns labelname {{ddnsid}}
* ```
*
* If you do not want to import arguments of block:
*
* $ export "FORTIOS_IMPORT_TABLE"="false"
*
* ```sh
* $ pulumi import fortios:system/ddns:Ddns labelname {{ddnsid}}
* ```
*
* $ unset "FORTIOS_IMPORT_TABLE"
*/
class Ddns extends pulumi.CustomResource {
/**
* Get an existing Ddns 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 Ddns(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Ddns. 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'] === Ddns.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addrType"] = state ? state.addrType : undefined;
resourceInputs["boundIp"] = state ? state.boundIp : undefined;
resourceInputs["clearText"] = state ? state.clearText : undefined;
resourceInputs["ddnsAuth"] = state ? state.ddnsAuth : undefined;
resourceInputs["ddnsDomain"] = state ? state.ddnsDomain : undefined;
resourceInputs["ddnsKey"] = state ? state.ddnsKey : undefined;
resourceInputs["ddnsKeyname"] = state ? state.ddnsKeyname : undefined;
resourceInputs["ddnsPassword"] = state ? state.ddnsPassword : undefined;
resourceInputs["ddnsServer"] = state ? state.ddnsServer : undefined;
resourceInputs["ddnsServerAddrs"] = state ? state.ddnsServerAddrs : undefined;
resourceInputs["ddnsServerIp"] = state ? state.ddnsServerIp : undefined;
resourceInputs["ddnsSn"] = state ? state.ddnsSn : undefined;
resourceInputs["ddnsTtl"] = state ? state.ddnsTtl : undefined;
resourceInputs["ddnsUsername"] = state ? state.ddnsUsername : undefined;
resourceInputs["ddnsZone"] = state ? state.ddnsZone : undefined;
resourceInputs["ddnsid"] = state ? state.ddnsid : undefined;
resourceInputs["dynamicSortSubtable"] = state ? state.dynamicSortSubtable : undefined;
resourceInputs["getAllTables"] = state ? state.getAllTables : undefined;
resourceInputs["monitorInterfaces"] = state ? state.monitorInterfaces : undefined;
resourceInputs["serverType"] = state ? state.serverType : undefined;
resourceInputs["sslCertificate"] = state ? state.sslCertificate : undefined;
resourceInputs["updateInterval"] = state ? state.updateInterval : undefined;
resourceInputs["usePublicIp"] = state ? state.usePublicIp : undefined;
resourceInputs["vdomparam"] = state ? state.vdomparam : undefined;
}
else {
const args = argsOrState;
if ((!args || args.ddnsServer === undefined) && !opts.urn) {
throw new Error("Missing required property 'ddnsServer'");
}
if ((!args || args.monitorInterfaces === undefined) && !opts.urn) {
throw new Error("Missing required property 'monitorInterfaces'");
}
resourceInputs["addrType"] = args ? args.addrType : undefined;
resourceInputs["boundIp"] = args ? args.boundIp : undefined;
resourceInputs["clearText"] = args ? args.clearText : undefined;
resourceInputs["ddnsAuth"] = args ? args.ddnsAuth : undefined;
resourceInputs["ddnsDomain"] = args ? args.ddnsDomain : undefined;
resourceInputs["ddnsKey"] = (args === null || args === void 0 ? void 0 : args.ddnsKey) ? pulumi.secret(args.ddnsKey) : undefined;
resourceInputs["ddnsKeyname"] = args ? args.ddnsKeyname : undefined;
resourceInputs["ddnsPassword"] = (args === null || args === void 0 ? void 0 : args.ddnsPassword) ? pulumi.secret(args.ddnsPassword) : undefined;
resourceInputs["ddnsServer"] = args ? args.ddnsServer : undefined;
resourceInputs["ddnsServerAddrs"] = args ? args.ddnsServerAddrs : undefined;
resourceInputs["ddnsServerIp"] = args ? args.ddnsServerIp : undefined;
resourceInputs["ddnsSn"] = args ? args.ddnsSn : undefined;
resourceInputs["ddnsTtl"] = args ? args.ddnsTtl : undefined;
resourceInputs["ddnsUsername"] = args ? args.ddnsUsername : undefined;
resourceInputs["ddnsZone"] = args ? args.ddnsZone : undefined;
resourceInputs["ddnsid"] = args ? args.ddnsid : undefined;
resourceInputs["dynamicSortSubtable"] = args ? args.dynamicSortSubtable : undefined;
resourceInputs["getAllTables"] = args ? args.getAllTables : undefined;
resourceInputs["monitorInterfaces"] = args ? args.monitorInterfaces : undefined;
resourceInputs["serverType"] = args ? args.serverType : undefined;
resourceInputs["sslCertificate"] = args ? args.sslCertificate : undefined;
resourceInputs["updateInterval"] = args ? args.updateInterval : undefined;
resourceInputs["usePublicIp"] = args ? args.usePublicIp : undefined;
resourceInputs["vdomparam"] = args ? args.vdomparam : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["ddnsKey", "ddnsPassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Ddns.__pulumiType, name, resourceInputs, opts);
}
}
exports.Ddns = Ddns;
/** @internal */
Ddns.__pulumiType = 'fortios:system/ddns:Ddns';
//# sourceMappingURL=ddns.js.map
;