UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

135 lines 5.67 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.ExternalMetadata = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types) * * To enrich lineage with workloads that are run outside of Databricks (for example, first mile ETL or last mile BI), * Unity Catalog is introducing the external metadata object. UC lets you add external metadata objects to augment the data lineage it captures automatically, giving you an end-to-end lineage view in UC. * This is useful when you want to capture where data came from (for example, Salesforce or MySQL) before it was ingested into UC or where data is being consumed outside UC (for example, Tableau or PowerBI). * * > **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.ExternalMetadata("this", { * name: "security_events_stream", * systemType: "KAFKA", * entityType: "Topic", * url: "https://kafka.com/12345", * description: "A stream of security related events in the critical services.", * columns: [ * "type", * "message", * "details", * "date", * "time", * ], * properties: { * topic: "prod.security.events.raw", * enabled: "true", * format: "zstd", * }, * }); * ``` * * ## Import * * As of Pulumi v1.5, resources can be imported through configuration. * * hcl * * import { * * id = "name" * * to = databricks_external_metadata.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/externalMetadata:ExternalMetadata this "name" * ``` */ class ExternalMetadata extends pulumi.CustomResource { /** * Get an existing ExternalMetadata 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 ExternalMetadata(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ExternalMetadata. 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'] === ExternalMetadata.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["columns"] = state?.columns; resourceInputs["createTime"] = state?.createTime; resourceInputs["createdBy"] = state?.createdBy; resourceInputs["description"] = state?.description; resourceInputs["entityType"] = state?.entityType; resourceInputs["metastoreId"] = state?.metastoreId; resourceInputs["name"] = state?.name; resourceInputs["owner"] = state?.owner; resourceInputs["properties"] = state?.properties; resourceInputs["systemType"] = state?.systemType; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["updatedBy"] = state?.updatedBy; resourceInputs["url"] = state?.url; } else { const args = argsOrState; if (args?.entityType === undefined && !opts.urn) { throw new Error("Missing required property 'entityType'"); } if (args?.systemType === undefined && !opts.urn) { throw new Error("Missing required property 'systemType'"); } resourceInputs["columns"] = args?.columns; resourceInputs["description"] = args?.description; resourceInputs["entityType"] = args?.entityType; resourceInputs["name"] = args?.name; resourceInputs["owner"] = args?.owner; resourceInputs["properties"] = args?.properties; resourceInputs["systemType"] = args?.systemType; resourceInputs["url"] = args?.url; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["createdBy"] = undefined /*out*/; resourceInputs["metastoreId"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; resourceInputs["updatedBy"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ExternalMetadata.__pulumiType, name, resourceInputs, opts); } } exports.ExternalMetadata = ExternalMetadata; /** @internal */ ExternalMetadata.__pulumiType = 'databricks:index/externalMetadata:ExternalMetadata'; //# sourceMappingURL=externalMetadata.js.map