UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

118 lines 6.13 kB
"use strict"; // *** 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.MwsNccPrivateEndpointRule = 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. * * > This feature is only available in Azure. * * Allows you to create a private endpoint in a Network Connectivity Config that can be used to [configure private connectivity from serverless compute](https://learn.microsoft.com/en-us/azure/databricks/security/network/serverless-network-security/serverless-private-link). * * ## 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 storage = new databricks.MwsNccPrivateEndpointRule("storage", { * networkConnectivityConfigId: ncc.networkConnectivityConfigId, * resourceId: "/subscriptions/653bb673-1234-abcd-a90b-d064d5d53ca4/resourcegroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/examplesa", * groupId: "blob", * }); * ``` * * ## Related Resources * * The following resources are used in the context: * * * databricks.MwsNetworkConnectivityConfig to create Network Connectivity Config objects. * * databricks.MwsNccBinding to attach an NCC to a workspace. * * ## Import * * This resource can be imported by Databricks account ID and Network Connectivity Config ID. * * ```sh * $ pulumi import databricks:index/mwsNccPrivateEndpointRule:MwsNccPrivateEndpointRule rule <network_connectivity_config_id>/<rule_id> * ``` */ class MwsNccPrivateEndpointRule extends pulumi.CustomResource { /** * Get an existing MwsNccPrivateEndpointRule 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 MwsNccPrivateEndpointRule(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MwsNccPrivateEndpointRule. 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'] === MwsNccPrivateEndpointRule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["connectionState"] = state ? state.connectionState : undefined; resourceInputs["creationTime"] = state ? state.creationTime : undefined; resourceInputs["deactivated"] = state ? state.deactivated : undefined; resourceInputs["deactivatedAt"] = state ? state.deactivatedAt : undefined; resourceInputs["endpointName"] = state ? state.endpointName : undefined; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["networkConnectivityConfigId"] = state ? state.networkConnectivityConfigId : undefined; resourceInputs["resourceId"] = state ? state.resourceId : undefined; resourceInputs["ruleId"] = state ? state.ruleId : undefined; resourceInputs["updatedTime"] = state ? state.updatedTime : undefined; } else { const args = argsOrState; if ((!args || args.groupId === undefined) && !opts.urn) { throw new Error("Missing required property 'groupId'"); } if ((!args || args.networkConnectivityConfigId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkConnectivityConfigId'"); } if ((!args || args.resourceId === undefined) && !opts.urn) { throw new Error("Missing required property 'resourceId'"); } resourceInputs["connectionState"] = args ? args.connectionState : undefined; resourceInputs["creationTime"] = args ? args.creationTime : undefined; resourceInputs["deactivated"] = args ? args.deactivated : undefined; resourceInputs["deactivatedAt"] = args ? args.deactivatedAt : undefined; resourceInputs["endpointName"] = args ? args.endpointName : undefined; resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["networkConnectivityConfigId"] = args ? args.networkConnectivityConfigId : undefined; resourceInputs["resourceId"] = args ? args.resourceId : undefined; resourceInputs["ruleId"] = args ? args.ruleId : undefined; resourceInputs["updatedTime"] = args ? args.updatedTime : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MwsNccPrivateEndpointRule.__pulumiType, name, resourceInputs, opts); } } exports.MwsNccPrivateEndpointRule = MwsNccPrivateEndpointRule; /** @internal */ MwsNccPrivateEndpointRule.__pulumiType = 'databricks:index/mwsNccPrivateEndpointRule:MwsNccPrivateEndpointRule'; //# sourceMappingURL=mwsNccPrivateEndpointRule.js.map