UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

102 lines 3.89 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.QualityMonitorV2 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Users with MANAGE Schema can use quality monitor v2 to set up data quality monitoring checks for UC objects, currently support schema. * * > **Note** This resource can only be used with an workspace-level provider! * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.Schema("this", { * catalogName: "my_catalog", * name: "my_schema", * }); * const thisQualityMonitorV2 = new databricks.QualityMonitorV2("this", { * objectType: "schema", * objectId: _this.schemaId, * }); * ``` * * ## Import * * As of Pulumi v1.5, resources can be imported through configuration. * * hcl * * import { * * id = "object_type,object_id" * * to = databricks_quality_monitor_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/qualityMonitorV2:QualityMonitorV2 databricks_quality_monitor_v2 "object_type,object_id" * ``` */ class QualityMonitorV2 extends pulumi.CustomResource { /** * Get an existing QualityMonitorV2 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 QualityMonitorV2(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of QualityMonitorV2. 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'] === QualityMonitorV2.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["anomalyDetectionConfig"] = state?.anomalyDetectionConfig; resourceInputs["objectId"] = state?.objectId; resourceInputs["objectType"] = state?.objectType; resourceInputs["workspaceId"] = state?.workspaceId; } else { const args = argsOrState; if (args?.objectId === undefined && !opts.urn) { throw new Error("Missing required property 'objectId'"); } if (args?.objectType === undefined && !opts.urn) { throw new Error("Missing required property 'objectType'"); } resourceInputs["objectId"] = args?.objectId; resourceInputs["objectType"] = args?.objectType; resourceInputs["workspaceId"] = args?.workspaceId; resourceInputs["anomalyDetectionConfig"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(QualityMonitorV2.__pulumiType, name, resourceInputs, opts); } } exports.QualityMonitorV2 = QualityMonitorV2; /** @internal */ QualityMonitorV2.__pulumiType = 'databricks:index/qualityMonitorV2:QualityMonitorV2'; //# sourceMappingURL=qualityMonitorV2.js.map