@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
209 lines (208 loc) • 9.07 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* This resource can be used to upgrade the firmware of a single device (Wi-Fi Access Points, Switches and SRX/SSR Gateways).
*
* The resource will send the upgrade command to Mist, which will take care of deploying the new firmware version to the device, and reboot it if required.
*
* The time required to upgrade a device depends on the type of device and its hardware. By default, the resource will track the upgrade process and only return the result once the device is upgraded and rebooted (unless `reboot`==`false` or `rebootAt` is set).\
* If required it is possible to run the upgrade in async mode (attribute `sync`=`false`). In this case, the resource will only trigger the upgrade and return the Mist response, but will not track the upgrade progress.
*
* The list of available firmware versions can be retrieved with the `junipermist.device.getVersions` data source.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as junipermist from "@pulumi/juniper-mist";
*
* const apUpgrade = new junipermist.UpgradeDevice("ap_upgrade", {
* siteId: terraformTest.id,
* deviceId: apOne.id,
* targetVersion: "0.14.29543",
* });
* const switchUpgrade = new junipermist.UpgradeDevice("switch_upgrade", {
* siteId: terraformTest.id,
* deviceId: switchOne.id,
* targetVersion: "24.2R1-S1.10",
* reboot: true,
* syncUpgradeTimeout: 3600,
* });
* ```
*/
export declare class UpgradeDevice extends pulumi.CustomResource {
/**
* Get an existing UpgradeDevice 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: string, id: pulumi.Input<pulumi.ID>, state?: UpgradeDeviceState, opts?: pulumi.CustomResourceOptions): UpgradeDevice;
/**
* Returns true if the given object is an instance of UpgradeDevice. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is UpgradeDevice;
readonly deviceId: pulumi.Output<string>;
/**
* current device firmware version
*/
readonly deviceVersion: pulumi.Output<string>;
readonly fwupdate: pulumi.Output<outputs.UpgradeDeviceFwupdate>;
/**
* For Switches and Gateways only (APs are automatically rebooted). Reboot device immediately after upgrade is completed
*/
readonly reboot: pulumi.Output<boolean>;
/**
* For Switches and Gateways only and if `reboot`==`true`. Reboot start time in epoch seconds, default is `startTime`
*/
readonly rebootAt: pulumi.Output<number | undefined>;
readonly siteId: pulumi.Output<string>;
/**
* For Junos devices only. Perform recovery snapshot after device is rebooted
*/
readonly snapshot: pulumi.Output<boolean>;
/**
* Firmware download start time in epoch
*/
readonly startTime: pulumi.Output<number | undefined>;
/**
* enum: `error`, `inprogress`, `scheduled`, `starting`, `success`
*/
readonly status: pulumi.Output<string>;
/**
* if set to `false`, the provider will just trigger the upgrade and not wait for the end of the upgrade process. Default is `true`
*/
readonly syncUpgrade: pulumi.Output<boolean>;
/**
* if set to `syncUpgrade`==`true`, how long to wait between each refresh of the upgrade status, in seconds. Default is 30, minimum is 15
*/
readonly syncUpgradeRefreshInterval: pulumi.Output<number>;
/**
* if set to `syncUpgrade`==`true`, how long to wait for the upgrade to start before raising an error, in seconds. Default is 60, minimum is 60
*/
readonly syncUpgradeStartTimeout: pulumi.Output<number>;
/**
* if set to `syncUpgrade`==`true`, how long to wait for the upgrade to end before raising an error, in seconds. Default is 1800
*/
readonly syncUpgradeTimeout: pulumi.Output<number>;
/**
* firmware version to deploy to the device. Use the `junipermist.device.getVersions` datasource to get the list of available firmware versions
*/
readonly targetVersion: pulumi.Output<string>;
/**
* Epoch (seconds)
*/
readonly timestamp: pulumi.Output<number>;
/**
* Create a UpgradeDevice resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UpgradeDeviceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering UpgradeDevice resources.
*/
export interface UpgradeDeviceState {
deviceId?: pulumi.Input<string>;
/**
* current device firmware version
*/
deviceVersion?: pulumi.Input<string>;
fwupdate?: pulumi.Input<inputs.UpgradeDeviceFwupdate>;
/**
* For Switches and Gateways only (APs are automatically rebooted). Reboot device immediately after upgrade is completed
*/
reboot?: pulumi.Input<boolean>;
/**
* For Switches and Gateways only and if `reboot`==`true`. Reboot start time in epoch seconds, default is `startTime`
*/
rebootAt?: pulumi.Input<number>;
siteId?: pulumi.Input<string>;
/**
* For Junos devices only. Perform recovery snapshot after device is rebooted
*/
snapshot?: pulumi.Input<boolean>;
/**
* Firmware download start time in epoch
*/
startTime?: pulumi.Input<number>;
/**
* enum: `error`, `inprogress`, `scheduled`, `starting`, `success`
*/
status?: pulumi.Input<string>;
/**
* if set to `false`, the provider will just trigger the upgrade and not wait for the end of the upgrade process. Default is `true`
*/
syncUpgrade?: pulumi.Input<boolean>;
/**
* if set to `syncUpgrade`==`true`, how long to wait between each refresh of the upgrade status, in seconds. Default is 30, minimum is 15
*/
syncUpgradeRefreshInterval?: pulumi.Input<number>;
/**
* if set to `syncUpgrade`==`true`, how long to wait for the upgrade to start before raising an error, in seconds. Default is 60, minimum is 60
*/
syncUpgradeStartTimeout?: pulumi.Input<number>;
/**
* if set to `syncUpgrade`==`true`, how long to wait for the upgrade to end before raising an error, in seconds. Default is 1800
*/
syncUpgradeTimeout?: pulumi.Input<number>;
/**
* firmware version to deploy to the device. Use the `junipermist.device.getVersions` datasource to get the list of available firmware versions
*/
targetVersion?: pulumi.Input<string>;
/**
* Epoch (seconds)
*/
timestamp?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a UpgradeDevice resource.
*/
export interface UpgradeDeviceArgs {
deviceId: pulumi.Input<string>;
/**
* For Switches and Gateways only (APs are automatically rebooted). Reboot device immediately after upgrade is completed
*/
reboot?: pulumi.Input<boolean>;
/**
* For Switches and Gateways only and if `reboot`==`true`. Reboot start time in epoch seconds, default is `startTime`
*/
rebootAt?: pulumi.Input<number>;
siteId: pulumi.Input<string>;
/**
* For Junos devices only. Perform recovery snapshot after device is rebooted
*/
snapshot?: pulumi.Input<boolean>;
/**
* Firmware download start time in epoch
*/
startTime?: pulumi.Input<number>;
/**
* if set to `false`, the provider will just trigger the upgrade and not wait for the end of the upgrade process. Default is `true`
*/
syncUpgrade?: pulumi.Input<boolean>;
/**
* if set to `syncUpgrade`==`true`, how long to wait between each refresh of the upgrade status, in seconds. Default is 30, minimum is 15
*/
syncUpgradeRefreshInterval?: pulumi.Input<number>;
/**
* if set to `syncUpgrade`==`true`, how long to wait for the upgrade to start before raising an error, in seconds. Default is 60, minimum is 60
*/
syncUpgradeStartTimeout?: pulumi.Input<number>;
/**
* if set to `syncUpgrade`==`true`, how long to wait for the upgrade to end before raising an error, in seconds. Default is 1800
*/
syncUpgradeTimeout?: pulumi.Input<number>;
/**
* firmware version to deploy to the device. Use the `junipermist.device.getVersions` datasource to get the list of available firmware versions
*/
targetVersion: pulumi.Input<string>;
}