@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
74 lines • 3.26 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.Image = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* This resource is used to upload a Device picture.
*
* This resource can be used to add a picture to a Wireless Access point, a Switch or a Gateway. A Maximum of 3 pictures can be uploaded.
*
* !> There is no validation on the Image currently uploaded to the Mist Cloud. Defining the same image twice (e.g. `image = 1`) for the same device will override the first image any warning or error.
*/
class Image extends pulumi.CustomResource {
/**
* Get an existing Image 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 Image(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Image. 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'] === Image.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["deviceId"] = state?.deviceId;
resourceInputs["file"] = state?.file;
resourceInputs["imageNumber"] = state?.imageNumber;
resourceInputs["siteId"] = state?.siteId;
}
else {
const args = argsOrState;
if (args?.deviceId === undefined && !opts.urn) {
throw new Error("Missing required property 'deviceId'");
}
if (args?.file === undefined && !opts.urn) {
throw new Error("Missing required property 'file'");
}
if (args?.imageNumber === undefined && !opts.urn) {
throw new Error("Missing required property 'imageNumber'");
}
if (args?.siteId === undefined && !opts.urn) {
throw new Error("Missing required property 'siteId'");
}
resourceInputs["deviceId"] = args?.deviceId;
resourceInputs["file"] = args?.file;
resourceInputs["imageNumber"] = args?.imageNumber;
resourceInputs["siteId"] = args?.siteId;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Image.__pulumiType, name, resourceInputs, opts);
}
}
exports.Image = Image;
/** @internal */
Image.__pulumiType = 'junipermist:device/image:Image';
//# sourceMappingURL=image.js.map