UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

168 lines 7.46 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.App = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * [Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customer's Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline. * * > This resource can only be used with a workspace-level provider! * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.App("this", { * name: "my-custom-app", * description: "My app", * resources: [ * { * name: "sql-warehouse", * sqlWarehouse: { * id: "e9ca293f79a74b5c", * permission: "CAN_MANAGE", * }, * }, * { * name: "serving-endpoint", * servingEndpoint: { * name: "databricks-meta-llama-3-1-70b-instruct", * permission: "CAN_MANAGE", * }, * }, * { * name: "job", * job: { * id: "1234", * permission: "CAN_MANAGE", * }, * }, * ], * }); * ``` * * ## Related Resources * * The following resources are used in the same context: * * * databricks.SqlEndpoint to manage Databricks SQL [Endpoints](https://docs.databricks.com/sql/admin/sql-endpoints.html). * * databricks.ModelServing to serve this model on a Databricks serving endpoint. * * databricks.Secret to manage [secrets](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace. * * databricks.Job to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code. * * ## Import * * This resource can be imported by name: * * hcl * * import { * * to = databricks_app.this * * id = "<app_name>" * * } * * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command: * * bash * * ```sh * $ pulumi import databricks:index/app:App this <app_name> * ``` */ class App extends pulumi.CustomResource { /** * Get an existing App 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 App(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of App. 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'] === App.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["activeDeployment"] = state?.activeDeployment; resourceInputs["appStatus"] = state?.appStatus; resourceInputs["budgetPolicyId"] = state?.budgetPolicyId; resourceInputs["computeSize"] = state?.computeSize; resourceInputs["computeStatus"] = state?.computeStatus; resourceInputs["createTime"] = state?.createTime; resourceInputs["creator"] = state?.creator; resourceInputs["defaultSourceCodePath"] = state?.defaultSourceCodePath; resourceInputs["description"] = state?.description; resourceInputs["effectiveBudgetPolicyId"] = state?.effectiveBudgetPolicyId; resourceInputs["effectiveUserApiScopes"] = state?.effectiveUserApiScopes; resourceInputs["name"] = state?.name; resourceInputs["noCompute"] = state?.noCompute; resourceInputs["oauth2AppClientId"] = state?.oauth2AppClientId; resourceInputs["oauth2AppIntegrationId"] = state?.oauth2AppIntegrationId; resourceInputs["pendingDeployment"] = state?.pendingDeployment; resourceInputs["providerConfig"] = state?.providerConfig; resourceInputs["resources"] = state?.resources; resourceInputs["servicePrincipalClientId"] = state?.servicePrincipalClientId; resourceInputs["servicePrincipalId"] = state?.servicePrincipalId; resourceInputs["servicePrincipalName"] = state?.servicePrincipalName; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["updater"] = state?.updater; resourceInputs["url"] = state?.url; resourceInputs["userApiScopes"] = state?.userApiScopes; } else { const args = argsOrState; resourceInputs["budgetPolicyId"] = args?.budgetPolicyId; resourceInputs["computeSize"] = args?.computeSize; resourceInputs["description"] = args?.description; resourceInputs["name"] = args?.name; resourceInputs["noCompute"] = args?.noCompute; resourceInputs["providerConfig"] = args?.providerConfig; resourceInputs["resources"] = args?.resources; resourceInputs["userApiScopes"] = args?.userApiScopes; resourceInputs["activeDeployment"] = undefined /*out*/; resourceInputs["appStatus"] = undefined /*out*/; resourceInputs["computeStatus"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["creator"] = undefined /*out*/; resourceInputs["defaultSourceCodePath"] = undefined /*out*/; resourceInputs["effectiveBudgetPolicyId"] = undefined /*out*/; resourceInputs["effectiveUserApiScopes"] = undefined /*out*/; resourceInputs["oauth2AppClientId"] = undefined /*out*/; resourceInputs["oauth2AppIntegrationId"] = undefined /*out*/; resourceInputs["pendingDeployment"] = undefined /*out*/; resourceInputs["servicePrincipalClientId"] = undefined /*out*/; resourceInputs["servicePrincipalId"] = undefined /*out*/; resourceInputs["servicePrincipalName"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; resourceInputs["updater"] = undefined /*out*/; resourceInputs["url"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(App.__pulumiType, name, resourceInputs, opts); } } exports.App = App; /** @internal */ App.__pulumiType = 'databricks:index/app:App'; //# sourceMappingURL=app.js.map