Skip to main content

role_assignments

Creates, updates, deletes, gets or lists a role_assignments resource.

Overview

Namerole_assignments
TypeResource
Idazure.synapse_access_control.role_assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accessDecisionsarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
check_principal_accessselectendpointCheck if the given principalId has access to perform list of actions at a given scope.
get_role_assignment_by_idselectrole_assignment_id, endpointGet role assignment by role assignment Id.
list_role_assignmentsselectendpointroleId, principalId, scope, x-ms-continuationList role assignments.
create_role_assignmentinsertendpointCreate role assignment.
get_role_assignmentsexecendpointroleId, principalId, x-ms-continuationList role assignments.
delete_role_assignment_by_idexecrole_assignment_id, endpointDelete role assignment by role assignment Id.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
role_assignment_idstringThe ID of the role assignment.
principalIdstringObject ID of the AAD principal or security-group.
roleIdstringSynapse Built-In Role Id.
scopestringScope of the Synapse Built-in Role.
x-ms-continuationstringContinuation token.

SELECT examples

Check if the given principalId has access to perform list of actions at a given scope.

SELECT
accessDecisions
FROM azure.synapse_access_control.role_assignments
WHERE endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Create role assignment.

INSERT INTO azure.synapse_access_control.role_assignments (
endpoint
)
SELECT
'{{ endpoint }}'
RETURNING
id,
principalId,
principalType,
roleDefinitionId,
scope
;

Lifecycle Methods

List role assignments.

EXEC azure.synapse_access_control.role_assignments.get_role_assignments 
@endpoint='{{ endpoint }}' --required,
@roleId='{{ roleId }}',
@principalId='{{ principalId }}',
@x-ms-continuation='{{ x-ms-continuation }}'
;