UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

168 lines 7.79 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 private endpoints to an Azure storage account and an Azure standard load balancer. * * ```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", * }); * const slb = new databricks.MwsNccPrivateEndpointRule("slb", { * networkConnectivityConfigId: ncc.networkConnectivityConfigId, * resourceId: "/subscriptions/653bb673-1234-abcd-a90b-d064d5d53ca4/resourcegroups/example-resource-group/providers/Microsoft.Network/privatelinkServices/example-private-link-service", * domainNames: ["my-example.exampledomain.com"], * }); * ``` * * 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, * endpointService: "com.amazonaws.us-east-1.s3", * 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, { ...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?.accountId; resourceInputs["connectionState"] = state?.connectionState; resourceInputs["creationTime"] = state?.creationTime; resourceInputs["deactivated"] = state?.deactivated; resourceInputs["deactivatedAt"] = state?.deactivatedAt; resourceInputs["domainNames"] = state?.domainNames; resourceInputs["enabled"] = state?.enabled; resourceInputs["endpointName"] = state?.endpointName; resourceInputs["endpointService"] = state?.endpointService; resourceInputs["groupId"] = state?.groupId; resourceInputs["networkConnectivityConfigId"] = state?.networkConnectivityConfigId; resourceInputs["resourceId"] = state?.resourceId; resourceInputs["resourceNames"] = state?.resourceNames; resourceInputs["ruleId"] = state?.ruleId; resourceInputs["updatedTime"] = state?.updatedTime; resourceInputs["vpcEndpointId"] = state?.vpcEndpointId; } else { const args = argsOrState; if (args?.networkConnectivityConfigId === undefined && !opts.urn) { throw new Error("Missing required property 'networkConnectivityConfigId'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["connectionState"] = args?.connectionState; resourceInputs["creationTime"] = args?.creationTime; resourceInputs["deactivated"] = args?.deactivated; resourceInputs["deactivatedAt"] = args?.deactivatedAt; resourceInputs["domainNames"] = args?.domainNames; resourceInputs["enabled"] = args?.enabled; resourceInputs["endpointName"] = args?.endpointName; resourceInputs["endpointService"] = args?.endpointService; resourceInputs["groupId"] = args?.groupId; resourceInputs["networkConnectivityConfigId"] = args?.networkConnectivityConfigId; resourceInputs["resourceId"] = args?.resourceId; resourceInputs["resourceNames"] = args?.resourceNames; resourceInputs["ruleId"] = args?.ruleId; resourceInputs["updatedTime"] = args?.updatedTime; resourceInputs["vpcEndpointId"] = args?.vpcEndpointId; } 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