Class RoleAssignmentsClient

java.lang.Object
com.azure.analytics.synapse.accesscontrol.RoleAssignmentsClient

public final class RoleAssignmentsClient extends Object
Initializes a new instance of the synchronous AccessControlClient type.
  • Method Details

    • checkPrincipalAccess

      public CheckPrincipalAccessResponse checkPrincipalAccess(SubjectInfo subject, List<RequiredAction> actions, String scope)
      Check if the given principalId has access to perform list of actions at a given scope.
      Parameters:
      subject - Subject details.
      actions - List of actions.
      scope - Scope at which the check access is done.
      Returns:
      check access response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • checkPrincipalAccessWithResponse

      public Response<CheckPrincipalAccessResponse> checkPrincipalAccessWithResponse(SubjectInfo subject, List<RequiredAction> actions, String scope, Context context)
      Check if the given principalId has access to perform list of actions at a given scope.
      Parameters:
      subject - Subject details.
      actions - List of actions.
      scope - Scope at which the check access is done.
      context - The context to associate with this operation.
      Returns:
      check access response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listRoleAssignments

      public RoleAssignmentDetailsList listRoleAssignments(String roleId, String principalId, String scope, String continuationToken)
      List role assignments.
      Parameters:
      roleId - Synapse Built-In Role Id.
      principalId - Object ID of the AAD principal or security-group.
      scope - Scope of the Synapse Built-in Role.
      continuationToken - Continuation token.
      Returns:
      role Assignment response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listRoleAssignments

      public RoleAssignmentDetailsList listRoleAssignments()
      List role assignments.
      Returns:
      role Assignment response details.
      Throws:
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listRoleAssignmentsWithResponse

      public RoleAssignmentsListRoleAssignmentsResponse listRoleAssignmentsWithResponse(String roleId, String principalId, String scope, String continuationToken, Context context)
      List role assignments.
      Parameters:
      roleId - Synapse Built-In Role Id.
      principalId - Object ID of the AAD principal or security-group.
      scope - Scope of the Synapse Built-in Role.
      continuationToken - Continuation token.
      context - The context to associate with this operation.
      Returns:
      role Assignment response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createRoleAssignment

      public RoleAssignmentDetails createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, String scope, String principalType)
      Create role assignment.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      roleId - Role ID of the Synapse Built-In Role.
      principalId - Object ID of the AAD principal or security-group.
      scope - Scope at which the role assignment is created.
      principalType - Type of the principal Id: User, Group or ServicePrincipal.
      Returns:
      role Assignment response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createRoleAssignment

      public RoleAssignmentDetails createRoleAssignment(String roleAssignmentId, UUID roleId, UUID principalId, String scope)
      Create role assignment.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      roleId - Role ID of the Synapse Built-In Role.
      principalId - Object ID of the AAD principal or security-group.
      scope - Scope at which the role assignment is created.
      Returns:
      role Assignment response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createRoleAssignmentWithResponse

      public Response<RoleAssignmentDetails> createRoleAssignmentWithResponse(String roleAssignmentId, UUID roleId, UUID principalId, String scope, String principalType, Context context)
      Create role assignment.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      roleId - Role ID of the Synapse Built-In Role.
      principalId - Object ID of the AAD principal or security-group.
      scope - Scope at which the role assignment is created.
      principalType - Type of the principal Id: User, Group or ServicePrincipal.
      context - The context to associate with this operation.
      Returns:
      role Assignment response details.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getRoleAssignmentById

      public RoleAssignmentDetails getRoleAssignmentById(String roleAssignmentId)
      Get role assignment by role assignment Id.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      Returns:
      role assignment by role assignment Id.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getRoleAssignmentByIdWithResponse

      public Response<RoleAssignmentDetails> getRoleAssignmentByIdWithResponse(String roleAssignmentId, Context context)
      Get role assignment by role assignment Id.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      context - The context to associate with this operation.
      Returns:
      role assignment by role assignment Id.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteRoleAssignmentById

      public void deleteRoleAssignmentById(String roleAssignmentId, String scope)
      Delete role assignment by role assignment Id.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      scope - Scope of the Synapse Built-in Role.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteRoleAssignmentById

      public void deleteRoleAssignmentById(String roleAssignmentId)
      Delete role assignment by role assignment Id.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteRoleAssignmentByIdWithResponse

      public Response<Void> deleteRoleAssignmentByIdWithResponse(String roleAssignmentId, String scope, Context context)
      Delete role assignment by role assignment Id.
      Parameters:
      roleAssignmentId - The ID of the role assignment.
      scope - Scope of the Synapse Built-in Role.
      context - The context to associate with this operation.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      ErrorContractException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.