@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
130 lines • 6.6 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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Psk = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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 `mist_org_psk` with:
*
* Org PSK can be imported by specifying the org_id and the psk_id
*
* ```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, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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 ? state.email : undefined;
resourceInputs["expireTime"] = state ? state.expireTime : undefined;
resourceInputs["expiryNotificationTime"] = state ? state.expiryNotificationTime : undefined;
resourceInputs["mac"] = state ? state.mac : undefined;
resourceInputs["macs"] = state ? state.macs : undefined;
resourceInputs["maxUsage"] = state ? state.maxUsage : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["note"] = state ? state.note : undefined;
resourceInputs["notifyExpiry"] = state ? state.notifyExpiry : undefined;
resourceInputs["notifyOnCreateOrEdit"] = state ? state.notifyOnCreateOrEdit : undefined;
resourceInputs["oldPassphrase"] = state ? state.oldPassphrase : undefined;
resourceInputs["orgId"] = state ? state.orgId : undefined;
resourceInputs["passphrase"] = state ? state.passphrase : undefined;
resourceInputs["role"] = state ? state.role : undefined;
resourceInputs["ssid"] = state ? state.ssid : undefined;
resourceInputs["usage"] = state ? state.usage : undefined;
resourceInputs["vlanId"] = state ? state.vlanId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.orgId === undefined) && !opts.urn) {
throw new Error("Missing required property 'orgId'");
}
if ((!args || args.passphrase === undefined) && !opts.urn) {
throw new Error("Missing required property 'passphrase'");
}
if ((!args || args.ssid === undefined) && !opts.urn) {
throw new Error("Missing required property 'ssid'");
}
resourceInputs["email"] = args ? args.email : undefined;
resourceInputs["expireTime"] = args ? args.expireTime : undefined;
resourceInputs["expiryNotificationTime"] = args ? args.expiryNotificationTime : undefined;
resourceInputs["mac"] = args ? args.mac : undefined;
resourceInputs["macs"] = args ? args.macs : undefined;
resourceInputs["maxUsage"] = args ? args.maxUsage : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["note"] = args ? args.note : undefined;
resourceInputs["notifyExpiry"] = args ? args.notifyExpiry : undefined;
resourceInputs["notifyOnCreateOrEdit"] = args ? args.notifyOnCreateOrEdit : undefined;
resourceInputs["oldPassphrase"] = (args === null || args === void 0 ? void 0 : args.oldPassphrase) ? pulumi.secret(args.oldPassphrase) : undefined;
resourceInputs["orgId"] = args ? args.orgId : undefined;
resourceInputs["passphrase"] = (args === null || args === void 0 ? void 0 : args.passphrase) ? pulumi.secret(args.passphrase) : undefined;
resourceInputs["role"] = args ? args.role : undefined;
resourceInputs["ssid"] = args ? args.ssid : undefined;
resourceInputs["usage"] = args ? args.usage : undefined;
resourceInputs["vlanId"] = args ? args.vlanId : undefined;
}
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;
/** @internal */
Psk.__pulumiType = 'junipermist:org/psk:Psk';
//# sourceMappingURL=psk.js.map