UNPKG

@pulumi/juniper-mist

Version:

A Pulumi package for creating and managing Juniper Mist resources.

106 lines 4.48 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.NacEndpoint = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This resource manages the NAC Endpoints (User MACs). * * NAC Endpoints (User MACs) provide a database of endpoints identified by their MAC addresses. They can be used assign each endpoint with various attributes, such as name, VLAN, role and client label. Once an endpoint is labeled, the label name can be used to create `junipermist.org.Nactag` resource as match criteria. * * The `junipermist.org.Nactag` resource can be used to create Tags regrouping one or multiple endpoint MAC Addresses, but the use of the User MACs provides additional features: * * possibility to assign specific attributes, like a Name, a Radius Group, a VLAN ID, ... * * possibility to assign one or multiple Tags (Labels) to a User MAC * * improved management for large list of MAC Addresses * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as junipermist from "@pulumi/juniper-mist"; * * const endpointOne = new junipermist.org.NacEndpoint("endpoint_one", { * mac: "921b638445cd", * labels: [ * "byod", * "flr1", * ], * vlan: "30", * notes: "mac address refers to Canon printers", * name: "endpoint_one", * radiusGroup: "VIP", * }); * ``` * * ## Import * * Using `pulumi import`, import `mist_org_nac_endpoint` with: * * NAC Endpoint can be imported by specifying the org_id and the nac_endpoint_id * * ```sh * $ pulumi import junipermist:org/nacEndpoint:NacEndpoint endpoint_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309 * ``` */ class NacEndpoint extends pulumi.CustomResource { /** * Get an existing NacEndpoint 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 NacEndpoint(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of NacEndpoint. 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'] === NacEndpoint.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["labels"] = state?.labels; resourceInputs["mac"] = state?.mac; resourceInputs["name"] = state?.name; resourceInputs["notes"] = state?.notes; resourceInputs["orgId"] = state?.orgId; resourceInputs["radiusGroup"] = state?.radiusGroup; resourceInputs["vlan"] = state?.vlan; } else { const args = argsOrState; if (args?.mac === undefined && !opts.urn) { throw new Error("Missing required property 'mac'"); } if (args?.orgId === undefined && !opts.urn) { throw new Error("Missing required property 'orgId'"); } resourceInputs["labels"] = args?.labels; resourceInputs["mac"] = args?.mac; resourceInputs["name"] = args?.name; resourceInputs["notes"] = args?.notes; resourceInputs["orgId"] = args?.orgId; resourceInputs["radiusGroup"] = args?.radiusGroup; resourceInputs["vlan"] = args?.vlan; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NacEndpoint.__pulumiType, name, resourceInputs, opts); } } exports.NacEndpoint = NacEndpoint; /** @internal */ NacEndpoint.__pulumiType = 'junipermist:org/nacEndpoint:NacEndpoint'; //# sourceMappingURL=nacEndpoint.js.map