1. Packages
  2. Databricks
  3. API Docs
  4. CatalogWorkspaceBinding
Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi

databricks.CatalogWorkspaceBinding

Explore with Pulumi AI

databricks logo
Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const sandbox = new databricks.Catalog("sandbox", {
        name: "sandbox",
        isolationMode: "ISOLATED",
    });
    const sandboxCatalogWorkspaceBinding = new databricks.CatalogWorkspaceBinding("sandbox", {
        securableName: sandbox.name,
        workspaceId: other.workspaceId,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    sandbox = databricks.Catalog("sandbox",
        name="sandbox",
        isolation_mode="ISOLATED")
    sandbox_catalog_workspace_binding = databricks.CatalogWorkspaceBinding("sandbox",
        securable_name=sandbox.name,
        workspace_id=other["workspaceId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		sandbox, err := databricks.NewCatalog(ctx, "sandbox", &databricks.CatalogArgs{
    			Name:          pulumi.String("sandbox"),
    			IsolationMode: pulumi.String("ISOLATED"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewCatalogWorkspaceBinding(ctx, "sandbox", &databricks.CatalogWorkspaceBindingArgs{
    			SecurableName: sandbox.Name,
    			WorkspaceId:   pulumi.Any(other.WorkspaceId),
    		})
    		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 sandbox = new Databricks.Catalog("sandbox", new()
        {
            Name = "sandbox",
            IsolationMode = "ISOLATED",
        });
    
        var sandboxCatalogWorkspaceBinding = new Databricks.CatalogWorkspaceBinding("sandbox", new()
        {
            SecurableName = sandbox.Name,
            WorkspaceId = other.WorkspaceId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.Catalog;
    import com.pulumi.databricks.CatalogArgs;
    import com.pulumi.databricks.CatalogWorkspaceBinding;
    import com.pulumi.databricks.CatalogWorkspaceBindingArgs;
    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) {
            var sandbox = new Catalog("sandbox", CatalogArgs.builder()
                .name("sandbox")
                .isolationMode("ISOLATED")
                .build());
    
            var sandboxCatalogWorkspaceBinding = new CatalogWorkspaceBinding("sandboxCatalogWorkspaceBinding", CatalogWorkspaceBindingArgs.builder()
                .securableName(sandbox.name())
                .workspaceId(other.workspaceId())
                .build());
    
        }
    }
    
    resources:
      sandbox:
        type: databricks:Catalog
        properties:
          name: sandbox
          isolationMode: ISOLATED
      sandboxCatalogWorkspaceBinding:
        type: databricks:CatalogWorkspaceBinding
        name: sandbox
        properties:
          securableName: ${sandbox.name}
          workspaceId: ${other.workspaceId}
    

    Create CatalogWorkspaceBinding Resource

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

    Constructor syntax

    new CatalogWorkspaceBinding(name: string, args?: CatalogWorkspaceBindingArgs, opts?: CustomResourceOptions);
    @overload
    def CatalogWorkspaceBinding(resource_name: str,
                                args: Optional[CatalogWorkspaceBindingArgs] = None,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def CatalogWorkspaceBinding(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                binding_type: Optional[str] = None,
                                catalog_name: Optional[str] = None,
                                securable_name: Optional[str] = None,
                                securable_type: Optional[str] = None,
                                workspace_id: Optional[str] = None)
    func NewCatalogWorkspaceBinding(ctx *Context, name string, args *CatalogWorkspaceBindingArgs, opts ...ResourceOption) (*CatalogWorkspaceBinding, error)
    public CatalogWorkspaceBinding(string name, CatalogWorkspaceBindingArgs? args = null, CustomResourceOptions? opts = null)
    public CatalogWorkspaceBinding(String name, CatalogWorkspaceBindingArgs args)
    public CatalogWorkspaceBinding(String name, CatalogWorkspaceBindingArgs args, CustomResourceOptions options)
    
    type: databricks:CatalogWorkspaceBinding
    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 CatalogWorkspaceBindingArgs
    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 CatalogWorkspaceBindingArgs
    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 CatalogWorkspaceBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CatalogWorkspaceBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CatalogWorkspaceBindingArgs
    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 catalogWorkspaceBindingResource = new Databricks.CatalogWorkspaceBinding("catalogWorkspaceBindingResource", new()
    {
        BindingType = "string",
        SecurableName = "string",
        SecurableType = "string",
        WorkspaceId = "string",
    });
    
    example, err := databricks.NewCatalogWorkspaceBinding(ctx, "catalogWorkspaceBindingResource", &databricks.CatalogWorkspaceBindingArgs{
    	BindingType:   pulumi.String("string"),
    	SecurableName: pulumi.String("string"),
    	SecurableType: pulumi.String("string"),
    	WorkspaceId:   pulumi.String("string"),
    })
    
    var catalogWorkspaceBindingResource = new CatalogWorkspaceBinding("catalogWorkspaceBindingResource", CatalogWorkspaceBindingArgs.builder()
        .bindingType("string")
        .securableName("string")
        .securableType("string")
        .workspaceId("string")
        .build());
    
    catalog_workspace_binding_resource = databricks.CatalogWorkspaceBinding("catalogWorkspaceBindingResource",
        binding_type="string",
        securable_name="string",
        securable_type="string",
        workspace_id="string")
    
    const catalogWorkspaceBindingResource = new databricks.CatalogWorkspaceBinding("catalogWorkspaceBindingResource", {
        bindingType: "string",
        securableName: "string",
        securableType: "string",
        workspaceId: "string",
    });
    
    type: databricks:CatalogWorkspaceBinding
    properties:
        bindingType: string
        securableName: string
        securableType: string
        workspaceId: string
    

    CatalogWorkspaceBinding Resource Properties

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

    Inputs

    The CatalogWorkspaceBinding resource accepts the following input properties:

    BindingType string
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    CatalogName string

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    SecurableName string
    Name of securable. Change forces creation of a new resource.
    SecurableType string
    Type of securable. Default to catalog. Change forces creation of a new resource.
    WorkspaceId string
    ID of the workspace. Change forces creation of a new resource.
    BindingType string
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    CatalogName string

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    SecurableName string
    Name of securable. Change forces creation of a new resource.
    SecurableType string
    Type of securable. Default to catalog. Change forces creation of a new resource.
    WorkspaceId string
    ID of the workspace. Change forces creation of a new resource.
    bindingType String
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalogName String

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securableName String
    Name of securable. Change forces creation of a new resource.
    securableType String
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspaceId String
    ID of the workspace. Change forces creation of a new resource.
    bindingType string
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalogName string

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securableName string
    Name of securable. Change forces creation of a new resource.
    securableType string
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspaceId string
    ID of the workspace. Change forces creation of a new resource.
    binding_type str
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalog_name str

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securable_name str
    Name of securable. Change forces creation of a new resource.
    securable_type str
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspace_id str
    ID of the workspace. Change forces creation of a new resource.
    bindingType String
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalogName String

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securableName String
    Name of securable. Change forces creation of a new resource.
    securableType String
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspaceId String
    ID of the workspace. Change forces creation of a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CatalogWorkspaceBinding 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 CatalogWorkspaceBinding Resource

    Get an existing CatalogWorkspaceBinding 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?: CatalogWorkspaceBindingState, opts?: CustomResourceOptions): CatalogWorkspaceBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            binding_type: Optional[str] = None,
            catalog_name: Optional[str] = None,
            securable_name: Optional[str] = None,
            securable_type: Optional[str] = None,
            workspace_id: Optional[str] = None) -> CatalogWorkspaceBinding
    func GetCatalogWorkspaceBinding(ctx *Context, name string, id IDInput, state *CatalogWorkspaceBindingState, opts ...ResourceOption) (*CatalogWorkspaceBinding, error)
    public static CatalogWorkspaceBinding Get(string name, Input<string> id, CatalogWorkspaceBindingState? state, CustomResourceOptions? opts = null)
    public static CatalogWorkspaceBinding get(String name, Output<String> id, CatalogWorkspaceBindingState 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:
    BindingType string
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    CatalogName string

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    SecurableName string
    Name of securable. Change forces creation of a new resource.
    SecurableType string
    Type of securable. Default to catalog. Change forces creation of a new resource.
    WorkspaceId string
    ID of the workspace. Change forces creation of a new resource.
    BindingType string
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    CatalogName string

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    SecurableName string
    Name of securable. Change forces creation of a new resource.
    SecurableType string
    Type of securable. Default to catalog. Change forces creation of a new resource.
    WorkspaceId string
    ID of the workspace. Change forces creation of a new resource.
    bindingType String
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalogName String

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securableName String
    Name of securable. Change forces creation of a new resource.
    securableType String
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspaceId String
    ID of the workspace. Change forces creation of a new resource.
    bindingType string
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalogName string

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securableName string
    Name of securable. Change forces creation of a new resource.
    securableType string
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspaceId string
    ID of the workspace. Change forces creation of a new resource.
    binding_type str
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalog_name str

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securable_name str
    Name of securable. Change forces creation of a new resource.
    securable_type str
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspace_id str
    ID of the workspace. Change forces creation of a new resource.
    bindingType String
    Binding mode. Default to BINDING_TYPE_READ_WRITE. Possible values are BINDING_TYPE_READ_ONLY, BINDING_TYPE_READ_WRITE
    catalogName String

    Deprecated: Please use 'securable_name' and 'securable_type instead.

    securableName String
    Name of securable. Change forces creation of a new resource.
    securableType String
    Type of securable. Default to catalog. Change forces creation of a new resource.
    workspaceId String
    ID of the workspace. Change forces creation of a new resource.

    Import

    This resource can be imported by using combination of workspace ID, securable type and name:

    $ pulumi import databricks:index/catalogWorkspaceBinding:CatalogWorkspaceBinding this "<workspace_id>|<securable_type>|<securable_name>"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.46.1 published on Friday, Jun 28, 2024 by Pulumi