@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
109 lines • 5.47 kB
JavaScript
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** 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");
/**
* > Initialize provider with `alias = "account"`, and `host` pointing to the account URL, like, `host = "https://accounts.cloud.databricks.com"`. Use `provider = databricks.account` for all account-level resources.
*
* 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).
*
* ## 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.
*
* ```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, Object.assign(Object.assign({}, 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 ? state.clientId : undefined;
resourceInputs["clientSecret"] = state ? state.clientSecret : undefined;
resourceInputs["confidential"] = state ? state.confidential : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["createdBy"] = state ? state.createdBy : undefined;
resourceInputs["creatorUsername"] = state ? state.creatorUsername : undefined;
resourceInputs["integrationId"] = state ? state.integrationId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["redirectUrls"] = state ? state.redirectUrls : undefined;
resourceInputs["scopes"] = state ? state.scopes : undefined;
resourceInputs["tokenAccessPolicy"] = state ? state.tokenAccessPolicy : undefined;
resourceInputs["userAuthorizedScopes"] = state ? state.userAuthorizedScopes : undefined;
}
else {
const args = argsOrState;
resourceInputs["clientId"] = args ? args.clientId : undefined;
resourceInputs["clientSecret"] = (args === null || args === void 0 ? void 0 : args.clientSecret) ? pulumi.secret(args.clientSecret) : undefined;
resourceInputs["confidential"] = args ? args.confidential : undefined;
resourceInputs["createTime"] = args ? args.createTime : undefined;
resourceInputs["createdBy"] = args ? args.createdBy : undefined;
resourceInputs["creatorUsername"] = args ? args.creatorUsername : undefined;
resourceInputs["integrationId"] = args ? args.integrationId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["redirectUrls"] = args ? args.redirectUrls : undefined;
resourceInputs["scopes"] = args ? args.scopes : undefined;
resourceInputs["tokenAccessPolicy"] = args ? args.tokenAccessPolicy : undefined;
resourceInputs["userAuthorizedScopes"] = args ? args.userAuthorizedScopes : undefined;
}
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
;