Role Assignments - List Role Assignments
列出角色分配。
GET {endpoint}/roleAssignments?api-version=2020-12-01
GET {endpoint}/roleAssignments?api-version=2020-12-01&roleId={roleId}&principalId={principalId}&scope={scope}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
工作区开发终结点,例如 |
|
api-version
|
query | True |
string |
Synapse 客户端 API 版本。 |
|
principal
|
query |
string |
AAD 主体或安全组的对象 ID。 |
|
|
role
|
query |
string |
Synapse Built-In 角色 ID。 |
|
|
scope
|
query |
string |
Synapse 内置角色的范围。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| x-ms-continuation |
string |
继续标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功响应。 Media Types: "application/json", "text/json" 标头 x-ms-continuation: string |
|
| Other Status Codes |
描述作失败的原因的错误响应。 Media Types: "application/json", "text/json" |
示例
List role assignments
示例请求
GET exampleWorkspace.dev.azuresynapse.net/roleAssignments?api-version=2020-12-01&roleId=00000000-0000-0000-0000-000000000000&principalId=00000000-0000-0000-0000-000000000000&scope=workspaces/exampleWorkspace
示例响应
{
"count": 2,
"value": [
{
"id": "00000000-0000-0000-0000-000000000000",
"roleDefinitionId": "00000000-0000-0000-0000-000000000000",
"principalId": "00000000-0000-0000-0000-000000000000",
"scope": "workspaces/exampleWorkspace",
"principalType": "User || Group || ServicePrincipal"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"roleDefinitionId": "00000000-0000-0000-0000-000000000000",
"principalId": "00000000-0000-0000-0000-000000000000",
"scope": "workspaces/exampleWorkspace",
"principalType": "User || Group || ServicePrincipal"
}
]
}
{
"error": {
"code": "Error code",
"message": "Error message"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Role |
角色分配响应详细信息 |
|
Role |
角色分配响应详细信息 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorContract
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误响应 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
RoleAssignmentDetails
角色分配响应详细信息
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
角色分配 ID |
| principalId |
string (uuid) |
AAD 主体或安全组的对象 ID |
| principalType |
string |
主体 ID 的类型:用户、组或 ServicePrincipal |
| roleDefinitionId |
string (uuid) |
Synapse Built-In 角色的角色 ID |
| scope |
string |
创建角色分配的范围 |
RoleAssignmentDetailsList
角色分配响应详细信息
| 名称 | 类型 | 说明 |
|---|---|---|
| count |
integer |
角色分配数 |
| value |
角色分配列表 |