@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
100 lines • 4.68 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.AlertV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The Alert v2 resource allows you to manage SQL alerts in Databricks SQL. Alerts monitor query results and notify you when specific conditions are met.
*
* Alerts run on a schedule and evaluate query results against defined thresholds. When an alert is triggered, notifications can be sent to specified users or destinations.
*
* ## Example Usage
*
* ## Import
*
* As of Pulumi v1.5, resources can be imported through configuration.
*
* hcl
*
* import {
*
* id = id
*
* to = databricks_alert_v2.this
*
* }
*
* If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:
*
* ```sh
* $ pulumi import databricks:index/alertV2:AlertV2 databricks_alert_v2 id
* ```
*/
class AlertV2 extends pulumi.CustomResource {
/**
* Get an existing AlertV2 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 AlertV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AlertV2. 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'] === AlertV2.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["customDescription"] = state ? state.customDescription : undefined;
resourceInputs["customSummary"] = state ? state.customSummary : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["evaluation"] = state ? state.evaluation : undefined;
resourceInputs["lifecycleState"] = state ? state.lifecycleState : undefined;
resourceInputs["ownerUserName"] = state ? state.ownerUserName : undefined;
resourceInputs["parentPath"] = state ? state.parentPath : undefined;
resourceInputs["queryText"] = state ? state.queryText : undefined;
resourceInputs["runAsUserName"] = state ? state.runAsUserName : undefined;
resourceInputs["schedule"] = state ? state.schedule : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["warehouseId"] = state ? state.warehouseId : undefined;
}
else {
const args = argsOrState;
resourceInputs["customDescription"] = args ? args.customDescription : undefined;
resourceInputs["customSummary"] = args ? args.customSummary : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["evaluation"] = args ? args.evaluation : undefined;
resourceInputs["parentPath"] = args ? args.parentPath : undefined;
resourceInputs["queryText"] = args ? args.queryText : undefined;
resourceInputs["schedule"] = args ? args.schedule : undefined;
resourceInputs["warehouseId"] = args ? args.warehouseId : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["lifecycleState"] = undefined /*out*/;
resourceInputs["ownerUserName"] = undefined /*out*/;
resourceInputs["runAsUserName"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AlertV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.AlertV2 = AlertV2;
/** @internal */
AlertV2.__pulumiType = 'databricks:index/alertV2:AlertV2';
//# sourceMappingURL=alertV2.js.map