UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

130 lines 5.46 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Base = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This resource manages the Site basic information. * * This resource can be used to assign templates to a site, or to change basic information (e.g. Site Address) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as junipermist from "@pulumi/juniper-mist"; * * const juniperFrance = new junipermist.site.Base("juniper_france", { * orgId: terraformTest.id, * name: "JNP-FR-PAR", * countryCode: "FR", * timezone: "Europe/Paris", * address: "41 Rue de Villiers, 92100 Neuilly sur Seine, France", * notes: "Created with Terraform, Updated with Terraform", * latlng: { * lat: 48.899268, * lng: 2.214447, * }, * sitegroupIds: [ * testGroup.id, * testGroup2.id, * ], * networktemplateId: networktemplateOne.id, * rftemplateId: rftemplateOne.id, * gatewaytemplateId: gatewaytemplateOne.id, * alarmtemplateId: alarmtemplateOne.id, * }); * ``` * * ## Import * * Using `pulumi import`, import `mist_site` with: * * Site can be imported by specifying the site_id * * ```sh * $ pulumi import junipermist:site/base:base site_one d3c42998-9012-4859-9743-6b9bee475309 * ``` */ class Base extends pulumi.CustomResource { /** * Get an existing Base 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 Base(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Base. 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'] === Base.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state?.address; resourceInputs["alarmtemplateId"] = state?.alarmtemplateId; resourceInputs["aptemplateId"] = state?.aptemplateId; resourceInputs["countryCode"] = state?.countryCode; resourceInputs["gatewaytemplateId"] = state?.gatewaytemplateId; resourceInputs["latlng"] = state?.latlng; resourceInputs["name"] = state?.name; resourceInputs["networktemplateId"] = state?.networktemplateId; resourceInputs["notes"] = state?.notes; resourceInputs["orgId"] = state?.orgId; resourceInputs["rftemplateId"] = state?.rftemplateId; resourceInputs["secpolicyId"] = state?.secpolicyId; resourceInputs["sitegroupIds"] = state?.sitegroupIds; resourceInputs["sitetemplateId"] = state?.sitetemplateId; resourceInputs["timezone"] = state?.timezone; resourceInputs["tzoffset"] = state?.tzoffset; } else { const args = argsOrState; if (args?.address === undefined && !opts.urn) { throw new Error("Missing required property 'address'"); } if (args?.orgId === undefined && !opts.urn) { throw new Error("Missing required property 'orgId'"); } resourceInputs["address"] = args?.address; resourceInputs["alarmtemplateId"] = args?.alarmtemplateId; resourceInputs["aptemplateId"] = args?.aptemplateId; resourceInputs["countryCode"] = args?.countryCode; resourceInputs["gatewaytemplateId"] = args?.gatewaytemplateId; resourceInputs["latlng"] = args?.latlng; resourceInputs["name"] = args?.name; resourceInputs["networktemplateId"] = args?.networktemplateId; resourceInputs["notes"] = args?.notes; resourceInputs["orgId"] = args?.orgId; resourceInputs["rftemplateId"] = args?.rftemplateId; resourceInputs["secpolicyId"] = args?.secpolicyId; resourceInputs["sitegroupIds"] = args?.sitegroupIds; resourceInputs["sitetemplateId"] = args?.sitetemplateId; resourceInputs["timezone"] = args?.timezone; resourceInputs["tzoffset"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "junipermist:device/base:base" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(Base.__pulumiType, name, resourceInputs, opts); } } exports.Base = Base; /** @internal */ Base.__pulumiType = 'junipermist:site/base:base'; //# sourceMappingURL=base.js.map