1. Packages
  2. Databricks
  3. API Docs
  4. MwsNccBinding
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

databricks.MwsNccBinding

Explore with Pulumi AI

databricks logo
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Initialize provider with alias = "account", host = "https://accounts.azuredatabricks.net" and use provider = databricks.account for all databricks_mws_* resources.

    This feature is available for AWS & Azure only, and is in Public Preview in AWS.

    Allows you to attach a Network Connectivity Config object to a databricks.MwsWorkspaces resource to create a Databricks Workspace that leverages serverless network connectivity configs.

    The NCC and workspace must be in the same region.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const config = new pulumi.Config();
    const region = config.requireObject("region");
    const prefix = config.requireObject("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,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    config = pulumi.Config()
    region = config.require_object("region")
    prefix = config.require_object("prefix")
    ncc = databricks.MwsNetworkConnectivityConfig("ncc",
        name=f"ncc-for-{prefix}",
        region=region)
    ncc_binding = databricks.MwsNccBinding("ncc_binding",
        network_connectivity_config_id=ncc.network_connectivity_config_id,
        workspace_id=databricks_workspace_id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		region := cfg.RequireObject("region")
    		prefix := cfg.RequireObject("prefix")
    		ncc, err := databricks.NewMwsNetworkConnectivityConfig(ctx, "ncc", &databricks.MwsNetworkConnectivityConfigArgs{
    			Name:   pulumi.Sprintf("ncc-for-%v", prefix),
    			Region: pulumi.Any(region),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewMwsNccBinding(ctx, "ncc_binding", &databricks.MwsNccBindingArgs{
    			NetworkConnectivityConfigId: ncc.NetworkConnectivityConfigId,
    			WorkspaceId:                 pulumi.Any(databricksWorkspaceId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var region = config.RequireObject<dynamic>("region");
        var prefix = config.RequireObject<dynamic>("prefix");
        var ncc = new Databricks.MwsNetworkConnectivityConfig("ncc", new()
        {
            Name = $"ncc-for-{prefix}",
            Region = region,
        });
    
        var nccBinding = new Databricks.MwsNccBinding("ncc_binding", new()
        {
            NetworkConnectivityConfigId = ncc.NetworkConnectivityConfigId,
            WorkspaceId = databricksWorkspaceId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.MwsNetworkConnectivityConfig;
    import com.pulumi.databricks.MwsNetworkConnectivityConfigArgs;
    import com.pulumi.databricks.MwsNccBinding;
    import com.pulumi.databricks.MwsNccBindingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var region = config.get("region");
            final var prefix = config.get("prefix");
            var ncc = new MwsNetworkConnectivityConfig("ncc", MwsNetworkConnectivityConfigArgs.builder()
                .name(String.format("ncc-for-%s", prefix))
                .region(region)
                .build());
    
            var nccBinding = new MwsNccBinding("nccBinding", MwsNccBindingArgs.builder()
                .networkConnectivityConfigId(ncc.networkConnectivityConfigId())
                .workspaceId(databricksWorkspaceId)
                .build());
    
        }
    }
    
    configuration:
      region:
        type: dynamic
      prefix:
        type: dynamic
    resources:
      ncc:
        type: databricks:MwsNetworkConnectivityConfig
        properties:
          name: ncc-for-${prefix}
          region: ${region}
      nccBinding:
        type: databricks:MwsNccBinding
        name: ncc_binding
        properties:
          networkConnectivityConfigId: ${ncc.networkConnectivityConfigId}
          workspaceId: ${databricksWorkspaceId}
    

    The following resources are used in the context:

    • databricks.MwsWorkspaces to set up Databricks workspaces.
    • databricks.MwsNetworkConnectivityConfig to create Network Connectivity Config objects.

    Create MwsNccBinding Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MwsNccBinding(name: string, args: MwsNccBindingArgs, opts?: CustomResourceOptions);
    @overload
    def MwsNccBinding(resource_name: str,
                      args: MwsNccBindingArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def MwsNccBinding(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      network_connectivity_config_id: Optional[str] = None,
                      workspace_id: Optional[str] = None)
    func NewMwsNccBinding(ctx *Context, name string, args MwsNccBindingArgs, opts ...ResourceOption) (*MwsNccBinding, error)
    public MwsNccBinding(string name, MwsNccBindingArgs args, CustomResourceOptions? opts = null)
    public MwsNccBinding(String name, MwsNccBindingArgs args)
    public MwsNccBinding(String name, MwsNccBindingArgs args, CustomResourceOptions options)
    
    type: databricks:MwsNccBinding
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MwsNccBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MwsNccBindingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MwsNccBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MwsNccBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MwsNccBindingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var mwsNccBindingResource = new Databricks.MwsNccBinding("mwsNccBindingResource", new()
    {
        NetworkConnectivityConfigId = "string",
        WorkspaceId = "string",
    });
    
    example, err := databricks.NewMwsNccBinding(ctx, "mwsNccBindingResource", &databricks.MwsNccBindingArgs{
    	NetworkConnectivityConfigId: pulumi.String("string"),
    	WorkspaceId:                 pulumi.String("string"),
    })
    
    var mwsNccBindingResource = new MwsNccBinding("mwsNccBindingResource", MwsNccBindingArgs.builder()
        .networkConnectivityConfigId("string")
        .workspaceId("string")
        .build());
    
    mws_ncc_binding_resource = databricks.MwsNccBinding("mwsNccBindingResource",
        network_connectivity_config_id="string",
        workspace_id="string")
    
    const mwsNccBindingResource = new databricks.MwsNccBinding("mwsNccBindingResource", {
        networkConnectivityConfigId: "string",
        workspaceId: "string",
    });
    
    type: databricks:MwsNccBinding
    properties:
        networkConnectivityConfigId: string
        workspaceId: string
    

    MwsNccBinding Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MwsNccBinding resource accepts the following input properties:

    NetworkConnectivityConfigId string
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    WorkspaceId string
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    NetworkConnectivityConfigId string
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    WorkspaceId string
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    networkConnectivityConfigId String
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspaceId String
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    networkConnectivityConfigId string
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspaceId string
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    network_connectivity_config_id str
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspace_id str
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    networkConnectivityConfigId String
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspaceId String
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MwsNccBinding resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MwsNccBinding Resource

    Get an existing MwsNccBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MwsNccBindingState, opts?: CustomResourceOptions): MwsNccBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            network_connectivity_config_id: Optional[str] = None,
            workspace_id: Optional[str] = None) -> MwsNccBinding
    func GetMwsNccBinding(ctx *Context, name string, id IDInput, state *MwsNccBindingState, opts ...ResourceOption) (*MwsNccBinding, error)
    public static MwsNccBinding Get(string name, Input<string> id, MwsNccBindingState? state, CustomResourceOptions? opts = null)
    public static MwsNccBinding get(String name, Output<String> id, MwsNccBindingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    NetworkConnectivityConfigId string
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    WorkspaceId string
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    NetworkConnectivityConfigId string
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    WorkspaceId string
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    networkConnectivityConfigId String
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspaceId String
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    networkConnectivityConfigId string
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspaceId string
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    network_connectivity_config_id str
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspace_id str
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.
    networkConnectivityConfigId String
    Canonical unique identifier of Network Connectivity Config in Databricks Account.
    workspaceId String
    Identifier of the workspace to attach the NCC to. Change forces creation of a new resource.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi