UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

133 lines 6.44 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:device/base:base site_one d3c42998-9012-4859-9743-6b9bee475309 * ``` * * @deprecated junipermist.device/base.base has been deprecated in favor of junipermist.site/base.base */ 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) { pulumi.log.warn("Base is deprecated: junipermist.device/base.base has been deprecated in favor of junipermist.site/base.base"); return new Base(name, state, Object.assign(Object.assign({}, 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; } /** @deprecated junipermist.device/base.base has been deprecated in favor of junipermist.site/base.base */ constructor(name, argsOrState, opts) { pulumi.log.warn("Base is deprecated: junipermist.device/base.base has been deprecated in favor of junipermist.site/base.base"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["address"] = state ? state.address : undefined; resourceInputs["alarmtemplateId"] = state ? state.alarmtemplateId : undefined; resourceInputs["aptemplateId"] = state ? state.aptemplateId : undefined; resourceInputs["countryCode"] = state ? state.countryCode : undefined; resourceInputs["gatewaytemplateId"] = state ? state.gatewaytemplateId : undefined; resourceInputs["latlng"] = state ? state.latlng : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networktemplateId"] = state ? state.networktemplateId : undefined; resourceInputs["notes"] = state ? state.notes : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["rftemplateId"] = state ? state.rftemplateId : undefined; resourceInputs["secpolicyId"] = state ? state.secpolicyId : undefined; resourceInputs["sitegroupIds"] = state ? state.sitegroupIds : undefined; resourceInputs["sitetemplateId"] = state ? state.sitetemplateId : undefined; resourceInputs["timezone"] = state ? state.timezone : undefined; resourceInputs["tzoffset"] = state ? state.tzoffset : undefined; } else { const args = argsOrState; if ((!args || args.address === undefined) && !opts.urn) { throw new Error("Missing required property 'address'"); } if ((!args || args.orgId === undefined) && !opts.urn) { throw new Error("Missing required property 'orgId'"); } resourceInputs["address"] = args ? args.address : undefined; resourceInputs["alarmtemplateId"] = args ? args.alarmtemplateId : undefined; resourceInputs["aptemplateId"] = args ? args.aptemplateId : undefined; resourceInputs["countryCode"] = args ? args.countryCode : undefined; resourceInputs["gatewaytemplateId"] = args ? args.gatewaytemplateId : undefined; resourceInputs["latlng"] = args ? args.latlng : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networktemplateId"] = args ? args.networktemplateId : undefined; resourceInputs["notes"] = args ? args.notes : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["rftemplateId"] = args ? args.rftemplateId : undefined; resourceInputs["secpolicyId"] = args ? args.secpolicyId : undefined; resourceInputs["sitegroupIds"] = args ? args.sitegroupIds : undefined; resourceInputs["sitetemplateId"] = args ? args.sitetemplateId : undefined; resourceInputs["timezone"] = args ? args.timezone : undefined; resourceInputs["tzoffset"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Base.__pulumiType, name, resourceInputs, opts); } } exports.Base = Base; /** @internal */ Base.__pulumiType = 'junipermist:device/base:base'; //# sourceMappingURL=base.js.map