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

databricks.Permissions

Explore with Pulumi AI

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

    Import

    Import Example

    Configuration file:

    hcl

    resource “databricks_mlflow_model” “model” {

    name = “example_model”

    description = “MLflow registered model”

    }

    resource “databricks_permissions” “model_usage” {

    registered_model_id = databricks_mlflow_model.model.registered_model_id

    access_control {

    group_name       = "users"
    
    permission_level = "CAN_READ"
    

    }

    }

    Import command:

    bash

    $ pulumi import databricks:index/permissions:Permissions model_usage /registered-models/<registered_model_id>
    

    Create Permissions Resource

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

    Constructor syntax

    new Permissions(name: string, args: PermissionsArgs, opts?: CustomResourceOptions);
    @overload
    def Permissions(resource_name: str,
                    args: PermissionsArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Permissions(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    access_controls: Optional[Sequence[PermissionsAccessControlArgs]] = None,
                    authorization: Optional[str] = None,
                    cluster_id: Optional[str] = None,
                    cluster_policy_id: Optional[str] = None,
                    directory_id: Optional[str] = None,
                    directory_path: Optional[str] = None,
                    experiment_id: Optional[str] = None,
                    instance_pool_id: Optional[str] = None,
                    job_id: Optional[str] = None,
                    notebook_id: Optional[str] = None,
                    notebook_path: Optional[str] = None,
                    object_type: Optional[str] = None,
                    pipeline_id: Optional[str] = None,
                    registered_model_id: Optional[str] = None,
                    repo_id: Optional[str] = None,
                    repo_path: Optional[str] = None,
                    serving_endpoint_id: Optional[str] = None,
                    sql_alert_id: Optional[str] = None,
                    sql_dashboard_id: Optional[str] = None,
                    sql_endpoint_id: Optional[str] = None,
                    sql_query_id: Optional[str] = None,
                    workspace_file_id: Optional[str] = None,
                    workspace_file_path: Optional[str] = None)
    func NewPermissions(ctx *Context, name string, args PermissionsArgs, opts ...ResourceOption) (*Permissions, error)
    public Permissions(string name, PermissionsArgs args, CustomResourceOptions? opts = null)
    public Permissions(String name, PermissionsArgs args)
    public Permissions(String name, PermissionsArgs args, CustomResourceOptions options)
    
    type: databricks:Permissions
    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 PermissionsArgs
    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 PermissionsArgs
    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 PermissionsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PermissionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PermissionsArgs
    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 permissionsResource = new Databricks.Permissions("permissionsResource", new()
    {
        AccessControls = new[]
        {
            new Databricks.Inputs.PermissionsAccessControlArgs
            {
                PermissionLevel = "string",
                GroupName = "string",
                ServicePrincipalName = "string",
                UserName = "string",
            },
        },
        Authorization = "string",
        ClusterId = "string",
        ClusterPolicyId = "string",
        DirectoryId = "string",
        DirectoryPath = "string",
        ExperimentId = "string",
        InstancePoolId = "string",
        JobId = "string",
        NotebookId = "string",
        NotebookPath = "string",
        ObjectType = "string",
        PipelineId = "string",
        RegisteredModelId = "string",
        RepoId = "string",
        RepoPath = "string",
        ServingEndpointId = "string",
        SqlAlertId = "string",
        SqlDashboardId = "string",
        SqlEndpointId = "string",
        SqlQueryId = "string",
        WorkspaceFileId = "string",
        WorkspaceFilePath = "string",
    });
    
    example, err := databricks.NewPermissions(ctx, "permissionsResource", &databricks.PermissionsArgs{
    	AccessControls: databricks.PermissionsAccessControlArray{
    		&databricks.PermissionsAccessControlArgs{
    			PermissionLevel:      pulumi.String("string"),
    			GroupName:            pulumi.String("string"),
    			ServicePrincipalName: pulumi.String("string"),
    			UserName:             pulumi.String("string"),
    		},
    	},
    	Authorization:     pulumi.String("string"),
    	ClusterId:         pulumi.String("string"),
    	ClusterPolicyId:   pulumi.String("string"),
    	DirectoryId:       pulumi.String("string"),
    	DirectoryPath:     pulumi.String("string"),
    	ExperimentId:      pulumi.String("string"),
    	InstancePoolId:    pulumi.String("string"),
    	JobId:             pulumi.String("string"),
    	NotebookId:        pulumi.String("string"),
    	NotebookPath:      pulumi.String("string"),
    	ObjectType:        pulumi.String("string"),
    	PipelineId:        pulumi.String("string"),
    	RegisteredModelId: pulumi.String("string"),
    	RepoId:            pulumi.String("string"),
    	RepoPath:          pulumi.String("string"),
    	ServingEndpointId: pulumi.String("string"),
    	SqlAlertId:        pulumi.String("string"),
    	SqlDashboardId:    pulumi.String("string"),
    	SqlEndpointId:     pulumi.String("string"),
    	SqlQueryId:        pulumi.String("string"),
    	WorkspaceFileId:   pulumi.String("string"),
    	WorkspaceFilePath: pulumi.String("string"),
    })
    
    var permissionsResource = new Permissions("permissionsResource", PermissionsArgs.builder()
        .accessControls(PermissionsAccessControlArgs.builder()
            .permissionLevel("string")
            .groupName("string")
            .servicePrincipalName("string")
            .userName("string")
            .build())
        .authorization("string")
        .clusterId("string")
        .clusterPolicyId("string")
        .directoryId("string")
        .directoryPath("string")
        .experimentId("string")
        .instancePoolId("string")
        .jobId("string")
        .notebookId("string")
        .notebookPath("string")
        .objectType("string")
        .pipelineId("string")
        .registeredModelId("string")
        .repoId("string")
        .repoPath("string")
        .servingEndpointId("string")
        .sqlAlertId("string")
        .sqlDashboardId("string")
        .sqlEndpointId("string")
        .sqlQueryId("string")
        .workspaceFileId("string")
        .workspaceFilePath("string")
        .build());
    
    permissions_resource = databricks.Permissions("permissionsResource",
        access_controls=[databricks.PermissionsAccessControlArgs(
            permission_level="string",
            group_name="string",
            service_principal_name="string",
            user_name="string",
        )],
        authorization="string",
        cluster_id="string",
        cluster_policy_id="string",
        directory_id="string",
        directory_path="string",
        experiment_id="string",
        instance_pool_id="string",
        job_id="string",
        notebook_id="string",
        notebook_path="string",
        object_type="string",
        pipeline_id="string",
        registered_model_id="string",
        repo_id="string",
        repo_path="string",
        serving_endpoint_id="string",
        sql_alert_id="string",
        sql_dashboard_id="string",
        sql_endpoint_id="string",
        sql_query_id="string",
        workspace_file_id="string",
        workspace_file_path="string")
    
    const permissionsResource = new databricks.Permissions("permissionsResource", {
        accessControls: [{
            permissionLevel: "string",
            groupName: "string",
            servicePrincipalName: "string",
            userName: "string",
        }],
        authorization: "string",
        clusterId: "string",
        clusterPolicyId: "string",
        directoryId: "string",
        directoryPath: "string",
        experimentId: "string",
        instancePoolId: "string",
        jobId: "string",
        notebookId: "string",
        notebookPath: "string",
        objectType: "string",
        pipelineId: "string",
        registeredModelId: "string",
        repoId: "string",
        repoPath: "string",
        servingEndpointId: "string",
        sqlAlertId: "string",
        sqlDashboardId: "string",
        sqlEndpointId: "string",
        sqlQueryId: "string",
        workspaceFileId: "string",
        workspaceFilePath: "string",
    });
    
    type: databricks:Permissions
    properties:
        accessControls:
            - groupName: string
              permissionLevel: string
              servicePrincipalName: string
              userName: string
        authorization: string
        clusterId: string
        clusterPolicyId: string
        directoryId: string
        directoryPath: string
        experimentId: string
        instancePoolId: string
        jobId: string
        notebookId: string
        notebookPath: string
        objectType: string
        pipelineId: string
        registeredModelId: string
        repoId: string
        repoPath: string
        servingEndpointId: string
        sqlAlertId: string
        sqlDashboardId: string
        sqlEndpointId: string
        sqlQueryId: string
        workspaceFileId: string
        workspaceFilePath: string
    

    Permissions 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 Permissions resource accepts the following input properties:

    Outputs

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

    Get an existing Permissions 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?: PermissionsState, opts?: CustomResourceOptions): Permissions
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_controls: Optional[Sequence[PermissionsAccessControlArgs]] = None,
            authorization: Optional[str] = None,
            cluster_id: Optional[str] = None,
            cluster_policy_id: Optional[str] = None,
            directory_id: Optional[str] = None,
            directory_path: Optional[str] = None,
            experiment_id: Optional[str] = None,
            instance_pool_id: Optional[str] = None,
            job_id: Optional[str] = None,
            notebook_id: Optional[str] = None,
            notebook_path: Optional[str] = None,
            object_type: Optional[str] = None,
            pipeline_id: Optional[str] = None,
            registered_model_id: Optional[str] = None,
            repo_id: Optional[str] = None,
            repo_path: Optional[str] = None,
            serving_endpoint_id: Optional[str] = None,
            sql_alert_id: Optional[str] = None,
            sql_dashboard_id: Optional[str] = None,
            sql_endpoint_id: Optional[str] = None,
            sql_query_id: Optional[str] = None,
            workspace_file_id: Optional[str] = None,
            workspace_file_path: Optional[str] = None) -> Permissions
    func GetPermissions(ctx *Context, name string, id IDInput, state *PermissionsState, opts ...ResourceOption) (*Permissions, error)
    public static Permissions Get(string name, Input<string> id, PermissionsState? state, CustomResourceOptions? opts = null)
    public static Permissions get(String name, Output<String> id, PermissionsState 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:

    Supporting Types

    PermissionsAccessControl, PermissionsAccessControlArgs

    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