UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

123 lines 5.04 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.CustomAppIntegration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to enable [custom OAuth applications](https://docs.databricks.com/en/integrations/enable-disable-oauth.html#enable-custom-oauth-applications-using-the-databricks-ui). * * > This resource can only be used with an account-level provider! * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.CustomAppIntegration("this", { * name: "custom_integration_name", * redirectUrls: ["https://example.com"], * scopes: ["all-apis"], * tokenAccessPolicy: { * accessTokenTtlInMinutes: 15, * refreshTokenTtlInMinutes: 30, * }, * }); * ``` * * ## Related Resources * * The following resources are used in the context: * * * databricks.MwsWorkspaces to set up Databricks workspaces. * * ## Import * * This resource can be imported by its integration ID: * * hcl * * import { * * to = databricks_custom_app_integration.this * * id = "<integration_id>" * * } * * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command: * * bash * * ```sh * $ pulumi import databricks:index/customAppIntegration:CustomAppIntegration this "<integration_id>" * ``` */ class CustomAppIntegration extends pulumi.CustomResource { /** * Get an existing CustomAppIntegration 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 CustomAppIntegration(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of CustomAppIntegration. 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'] === CustomAppIntegration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["clientId"] = state?.clientId; resourceInputs["clientSecret"] = state?.clientSecret; resourceInputs["confidential"] = state?.confidential; resourceInputs["createTime"] = state?.createTime; resourceInputs["createdBy"] = state?.createdBy; resourceInputs["creatorUsername"] = state?.creatorUsername; resourceInputs["integrationId"] = state?.integrationId; resourceInputs["name"] = state?.name; resourceInputs["redirectUrls"] = state?.redirectUrls; resourceInputs["scopes"] = state?.scopes; resourceInputs["tokenAccessPolicy"] = state?.tokenAccessPolicy; resourceInputs["userAuthorizedScopes"] = state?.userAuthorizedScopes; } else { const args = argsOrState; resourceInputs["clientId"] = args?.clientId; resourceInputs["clientSecret"] = args?.clientSecret ? pulumi.secret(args.clientSecret) : undefined; resourceInputs["confidential"] = args?.confidential; resourceInputs["createTime"] = args?.createTime; resourceInputs["createdBy"] = args?.createdBy; resourceInputs["creatorUsername"] = args?.creatorUsername; resourceInputs["integrationId"] = args?.integrationId; resourceInputs["name"] = args?.name; resourceInputs["redirectUrls"] = args?.redirectUrls; resourceInputs["scopes"] = args?.scopes; resourceInputs["tokenAccessPolicy"] = args?.tokenAccessPolicy; resourceInputs["userAuthorizedScopes"] = args?.userAuthorizedScopes; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["clientSecret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(CustomAppIntegration.__pulumiType, name, resourceInputs, opts); } } exports.CustomAppIntegration = CustomAppIntegration; /** @internal */ CustomAppIntegration.__pulumiType = 'databricks:index/customAppIntegration:CustomAppIntegration'; //# sourceMappingURL=customAppIntegration.js.map