UNPKG

@pulumi/wavefront

Version:

A Pulumi package for creating and managing wavefront cloud resources.

106 lines 4.73 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.MaintenanceWindow = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Wavefront Maintenance Window Resource. This allows maintenance windows to be created, updated, and deleted. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as wavefront from "@pulumi/wavefront"; * * const basic = new wavefront.MaintenanceWindow("basic", { * reason: "Routine maintenance for 2020", * title: "Routine maintenance", * startTimeInSeconds: 1600123456, * endTimeInSeconds: 1601123456, * relevantHostNames: [ * "my_hostname", * "my_other_hostname", * ], * }); * ``` * * ## Import * * Maintenance windows can be imported using the `id`, e.g. * * ```sh * $ pulumi import wavefront:index/maintenanceWindow:MaintenanceWindow basic 1600383357095 * ``` */ class MaintenanceWindow extends pulumi.CustomResource { /** * Get an existing MaintenanceWindow 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 MaintenanceWindow(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of MaintenanceWindow. 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'] === MaintenanceWindow.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["endTimeInSeconds"] = state?.endTimeInSeconds; resourceInputs["hostTagGroupHostNamesGroupAnded"] = state?.hostTagGroupHostNamesGroupAnded; resourceInputs["reason"] = state?.reason; resourceInputs["relevantCustomerTags"] = state?.relevantCustomerTags; resourceInputs["relevantHostNames"] = state?.relevantHostNames; resourceInputs["relevantHostTags"] = state?.relevantHostTags; resourceInputs["relevantHostTagsAnded"] = state?.relevantHostTagsAnded; resourceInputs["startTimeInSeconds"] = state?.startTimeInSeconds; resourceInputs["title"] = state?.title; } else { const args = argsOrState; if (args?.endTimeInSeconds === undefined && !opts.urn) { throw new Error("Missing required property 'endTimeInSeconds'"); } if (args?.reason === undefined && !opts.urn) { throw new Error("Missing required property 'reason'"); } if (args?.startTimeInSeconds === undefined && !opts.urn) { throw new Error("Missing required property 'startTimeInSeconds'"); } if (args?.title === undefined && !opts.urn) { throw new Error("Missing required property 'title'"); } resourceInputs["endTimeInSeconds"] = args?.endTimeInSeconds; resourceInputs["hostTagGroupHostNamesGroupAnded"] = args?.hostTagGroupHostNamesGroupAnded; resourceInputs["reason"] = args?.reason; resourceInputs["relevantCustomerTags"] = args?.relevantCustomerTags; resourceInputs["relevantHostNames"] = args?.relevantHostNames; resourceInputs["relevantHostTags"] = args?.relevantHostTags; resourceInputs["relevantHostTagsAnded"] = args?.relevantHostTagsAnded; resourceInputs["startTimeInSeconds"] = args?.startTimeInSeconds; resourceInputs["title"] = args?.title; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MaintenanceWindow.__pulumiType, name, resourceInputs, opts); } } exports.MaintenanceWindow = MaintenanceWindow; /** @internal */ MaintenanceWindow.__pulumiType = 'wavefront:index/maintenanceWindow:MaintenanceWindow'; //# sourceMappingURL=maintenanceWindow.js.map