UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

162 lines 7.95 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.MwsNccPrivateEndpointRule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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). * * > This resource can only be used with an account-level provider! * * > This feature is available on Azure, and in Public Preview on AWS. * * ## Example Usage * * Create a private endpoint to an Azure storage account * * ```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", * }); * ``` * * Create a private endpoint rule to an AWS VPC endpoint and to an S3 bucket * * ```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, * resourceNames: ["bucket"], * }); * const vpce = new databricks.MwsNccPrivateEndpointRule("vpce", { * networkConnectivityConfigId: ncc.networkConnectivityConfigId, * endpointService: "com.amazonaws.vpce.us-west-2.vpce-svc-xyz", * domainNames: ["subdomain.internal.net"], * }); * ``` * * ## 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. * * hcl * * import { * * to = databricks_mws_ncc_private_endpoint_rule.this * * id = "<network_connectivity_config_id>/<rule_id>" * * } * * Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command: * * ```sh * $ pulumi import databricks:index/mwsNccPrivateEndpointRule:MwsNccPrivateEndpointRule this "<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["accountId"] = state ? state.accountId : undefined; 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["domainNames"] = state ? state.domainNames : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["endpointName"] = state ? state.endpointName : undefined; resourceInputs["endpointService"] = state ? state.endpointService : undefined; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["networkConnectivityConfigId"] = state ? state.networkConnectivityConfigId : undefined; resourceInputs["resourceId"] = state ? state.resourceId : undefined; resourceInputs["resourceNames"] = state ? state.resourceNames : undefined; resourceInputs["ruleId"] = state ? state.ruleId : undefined; resourceInputs["updatedTime"] = state ? state.updatedTime : undefined; resourceInputs["vpcEndpointId"] = state ? state.vpcEndpointId : undefined; } else { const args = argsOrState; if ((!args || args.networkConnectivityConfigId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkConnectivityConfigId'"); } resourceInputs["accountId"] = args ? args.accountId : undefined; 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["domainNames"] = args ? args.domainNames : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["endpointName"] = args ? args.endpointName : undefined; resourceInputs["endpointService"] = args ? args.endpointService : undefined; resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["networkConnectivityConfigId"] = args ? args.networkConnectivityConfigId : undefined; resourceInputs["resourceId"] = args ? args.resourceId : undefined; resourceInputs["resourceNames"] = args ? args.resourceNames : undefined; resourceInputs["ruleId"] = args ? args.ruleId : undefined; resourceInputs["updatedTime"] = args ? args.updatedTime : undefined; resourceInputs["vpcEndpointId"] = args ? args.vpcEndpointId : 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