< Back

Set-DatabricksPermission

Sat Jan 11, 2020 10:06 am

NAME Set-DatabricksPermission



SYNOPSIS

Add permissions to objects





SYNTAX

Set-DatabricksPermission [[-BearerToken] <String>] [[-Region] <String>] [-Principal] <String> [[-PrincipalType]

<String>] [-PermissionLevel] <String> [-DatabricksObjectType] <String> [-DatabricksObjectId] <String>

[<CommonParameters>]





DESCRIPTION

Add permissions to objects





PARAMETERS

-BearerToken <String>

Your Databricks Bearer token to authenticate to your workspace (see User Settings in Databricks WebUI)



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Region <String>

Azure Region - must match the URL of your Databricks workspace, example northeurope



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Principal <String>

The name of the "user","group","service_principal" that will be added to the object.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PrincipalType <String>

Which type of pricipal do you want to add to the object.

Valid values for this parameter are:

"user_name"???????????????????????????????????? || ??????????????????"group_name"?????????????????? ??????????????????|| "service_principal_name"



Required? false

Position? 4

Default value user_name

Accept pipeline input? false

Accept wildcard characters? false



-PermissionLevel <String>

See Get-DatabricksPermissionLevels

For Secret Scopes this value must be READ, WRITE or MANAGE



Required? true

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DatabricksObjectType <String>

Job, Cluster, secretScope or Instance-pool



Required? true

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DatabricksObjectId <String>

JobId, ClusterId, secretScope or Instance-poolId



Required? true

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author: Simon D'Morias / Data Thirst Ltd



-------------------------- EXAMPLE 1 --------------------------



C:\\PS>Set-DatabricksPermission -BearerToken $BearerToken -Region $Region -Principal "MyTestGroup" -PermissionLevel

'CAN_MANAGE' -DatabricksObjectType 'Cluster' -DatabricksObjectId "tubby-1234"



This adds the permission CAN_MANAGE to a cluster for all users in the MyTestGroup











RELATED LINKS