@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
154 lines • 7.04 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Psk = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* This data source provides the list of Org PSKs.
*
* A multi PSK (Pre-Shared Key) is a feature that allows the use of multiple PSKs for securing network connections.\
* It provides a simple and comprehensive way to onboard client devices without relying on client mac addresses.\
* Each psk has its own key name, which can be used for user-level accountability, key rotation, and visibility in the management platform. It supports the creation, rotation, and auto-expiration of psks, and allows vlan assignment and role assignment for dynamic per-user policies.\
* Multi PSKs create virtual broadcast domains and can be used for end-user onboarding via authenticated sso login.
*
* Mist supports three methods of Org PSKs lookup:
* * local
* * radius
* * cloud
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as junipermist from "@pulumi/juniper-mist";
*
* const pskOne = new junipermist.org.Psk("psk_one", {
* orgId: terraformTest.id,
* name: "JNP-FR-PAR",
* passphrase: "secretone",
* ssid: wlanOne.ssid,
* usage: "multi",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `junipermist.org.Psk` with:
* Org PSK can be imported by specifying the orgId and the pskId
*
* ```sh
* $ pulumi import junipermist:org/psk:Psk psk_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
* ```
*/
class Psk extends pulumi.CustomResource {
/**
* Get an existing Psk 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 Psk(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'junipermist:org/psk:Psk';
/**
* Returns true if the given object is an instance of Psk. 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'] === Psk.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["email"] = state?.email;
resourceInputs["expireTime"] = state?.expireTime;
resourceInputs["expiryNotificationTime"] = state?.expiryNotificationTime;
resourceInputs["mac"] = state?.mac;
resourceInputs["macs"] = state?.macs;
resourceInputs["maxUsage"] = state?.maxUsage;
resourceInputs["name"] = state?.name;
resourceInputs["note"] = state?.note;
resourceInputs["notifyExpiry"] = state?.notifyExpiry;
resourceInputs["notifyOnCreateOrEdit"] = state?.notifyOnCreateOrEdit;
resourceInputs["oldPassphrase"] = state?.oldPassphrase;
resourceInputs["orgId"] = state?.orgId;
resourceInputs["passphrase"] = state?.passphrase;
resourceInputs["role"] = state?.role;
resourceInputs["ssid"] = state?.ssid;
resourceInputs["usage"] = state?.usage;
resourceInputs["vlanId"] = state?.vlanId;
resourceInputs["vlanName"] = state?.vlanName;
}
else {
const args = argsOrState;
if (args?.orgId === undefined && !opts.urn) {
throw new Error("Missing required property 'orgId'");
}
if (args?.passphrase === undefined && !opts.urn) {
throw new Error("Missing required property 'passphrase'");
}
if (args?.ssid === undefined && !opts.urn) {
throw new Error("Missing required property 'ssid'");
}
resourceInputs["email"] = args?.email;
resourceInputs["expireTime"] = args?.expireTime;
resourceInputs["expiryNotificationTime"] = args?.expiryNotificationTime;
resourceInputs["mac"] = args?.mac;
resourceInputs["macs"] = args?.macs;
resourceInputs["maxUsage"] = args?.maxUsage;
resourceInputs["name"] = args?.name;
resourceInputs["note"] = args?.note;
resourceInputs["notifyExpiry"] = args?.notifyExpiry;
resourceInputs["notifyOnCreateOrEdit"] = args?.notifyOnCreateOrEdit;
resourceInputs["oldPassphrase"] = args?.oldPassphrase ? pulumi.secret(args.oldPassphrase) : undefined;
resourceInputs["orgId"] = args?.orgId;
resourceInputs["passphrase"] = args?.passphrase ? pulumi.secret(args.passphrase) : undefined;
resourceInputs["role"] = args?.role;
resourceInputs["ssid"] = args?.ssid;
resourceInputs["usage"] = args?.usage;
resourceInputs["vlanId"] = args?.vlanId;
resourceInputs["vlanName"] = args?.vlanName;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["oldPassphrase", "passphrase"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Psk.__pulumiType, name, resourceInputs, opts);
}
}
exports.Psk = Psk;
//# sourceMappingURL=psk.js.map