@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
109 lines • 4.39 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.WorkspaceEntityTagAssignment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
*
* This resource allows you to create, update, list, and delete tag assignments for workspace scoped entities.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const dashboardTag = new databricks.WorkspaceEntityTagAssignment("dashboard_tag", {
* entityType: "dashboards",
* entityId: "2807324866692453",
* tagKey: "sensitivity_level",
* tagValue: "high",
* });
* const geniespaceTag = new databricks.WorkspaceEntityTagAssignment("geniespace_tag", {
* entityType: "geniespaces",
* entityId: "2807324866692453",
* tagKey: "sensitivity_level",
* tagValue: "high",
* });
* ```
*
* ## Import
*
* As of Pulumi v1.5, resources can be imported through configuration.
*
* hcl
*
* import {
*
* id = "entity_type,entity_id,tag_key"
*
* to = databricks_workspace_entity_tag_assignment.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/workspaceEntityTagAssignment:WorkspaceEntityTagAssignment this "entity_type,entity_id,tag_key"
* ```
*/
class WorkspaceEntityTagAssignment extends pulumi.CustomResource {
/**
* Get an existing WorkspaceEntityTagAssignment 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 WorkspaceEntityTagAssignment(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of WorkspaceEntityTagAssignment. 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'] === WorkspaceEntityTagAssignment.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["entityId"] = state?.entityId;
resourceInputs["entityType"] = state?.entityType;
resourceInputs["tagKey"] = state?.tagKey;
resourceInputs["tagValue"] = state?.tagValue;
}
else {
const args = argsOrState;
if (args?.entityId === undefined && !opts.urn) {
throw new Error("Missing required property 'entityId'");
}
if (args?.entityType === undefined && !opts.urn) {
throw new Error("Missing required property 'entityType'");
}
if (args?.tagKey === undefined && !opts.urn) {
throw new Error("Missing required property 'tagKey'");
}
resourceInputs["entityId"] = args?.entityId;
resourceInputs["entityType"] = args?.entityType;
resourceInputs["tagKey"] = args?.tagKey;
resourceInputs["tagValue"] = args?.tagValue;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(WorkspaceEntityTagAssignment.__pulumiType, name, resourceInputs, opts);
}
}
exports.WorkspaceEntityTagAssignment = WorkspaceEntityTagAssignment;
/** @internal */
WorkspaceEntityTagAssignment.__pulumiType = 'databricks:index/workspaceEntityTagAssignment:WorkspaceEntityTagAssignment';
//# sourceMappingURL=workspaceEntityTagAssignment.js.map