@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
106 lines • 5.35 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.MwsNetworkConnectivityConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > Initialize provider with `alias = "account"`, `host = "https://accounts.azuredatabricks.net"` and use `provider = databricks.account` for all `databricks_mws_*` resources.
*
* > **Public Preview** This feature is available for AWS & Azure only, and is in [Public Preview](https://docs.databricks.com/release-notes/release-types.html) in AWS.
*
* Allows you to create a Network Connectivity Config that can be used as part of a databricks.MwsWorkspaces resource to create a [Databricks Workspace that leverages serverless network connectivity configs](https://learn.microsoft.com/en-us/azure/databricks/security/network/serverless-network-security/serverless-firewall).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const config = new pulumi.Config();
* const region = config.requireObject<any>("region");
* const prefix = config.requireObject<any>("prefix");
* const ncc = new databricks.MwsNetworkConnectivityConfig("ncc", {
* name: `ncc-for-${prefix}`,
* region: region,
* });
* const nccBinding = new databricks.MwsNccBinding("ncc_binding", {
* networkConnectivityConfigId: ncc.networkConnectivityConfigId,
* workspaceId: databricksWorkspaceId,
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the context:
*
* * databricks.MwsWorkspaces to set up Databricks workspaces.
* * databricks.MwsNccBinding to attach an NCC to a workspace.
* * databricks.MwsNccPrivateEndpointRule to create a private endpoint rule.
*
* ## Import
*
* This resource can be imported by Databricks account ID and Network Connectivity Config ID.
*
* ```sh
* $ pulumi import databricks:index/mwsNetworkConnectivityConfig:MwsNetworkConnectivityConfig ncc <account_id>/<network_connectivity_config_id>
* ```
*/
class MwsNetworkConnectivityConfig extends pulumi.CustomResource {
/**
* Get an existing MwsNetworkConnectivityConfig 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 MwsNetworkConnectivityConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of MwsNetworkConnectivityConfig. 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'] === MwsNetworkConnectivityConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountId"] = state ? state.accountId : undefined;
resourceInputs["creationTime"] = state ? state.creationTime : undefined;
resourceInputs["egressConfig"] = state ? state.egressConfig : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["networkConnectivityConfigId"] = state ? state.networkConnectivityConfigId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["updatedTime"] = state ? state.updatedTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.region === undefined) && !opts.urn) {
throw new Error("Missing required property 'region'");
}
resourceInputs["accountId"] = args ? args.accountId : undefined;
resourceInputs["creationTime"] = args ? args.creationTime : undefined;
resourceInputs["egressConfig"] = args ? args.egressConfig : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["networkConnectivityConfigId"] = args ? args.networkConnectivityConfigId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["updatedTime"] = args ? args.updatedTime : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MwsNetworkConnectivityConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.MwsNetworkConnectivityConfig = MwsNetworkConnectivityConfig;
/** @internal */
MwsNetworkConnectivityConfig.__pulumiType = 'databricks:index/mwsNetworkConnectivityConfig:MwsNetworkConnectivityConfig';
//# sourceMappingURL=mwsNetworkConnectivityConfig.js.map
;