-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
roleAssignments.json
388 lines (388 loc) · 10.3 KB
/
roleAssignments.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
{
"swagger": "2.0",
"info": {
"version": "2020-02-01-preview",
"title": "AccessControlClient"
},
"x-ms-parameterized-host": {
"hostTemplate": "{endpoint}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
}
]
},
"schemes": [
"https"
],
"paths": {
"/rbac/roleAssignments": {
"post": {
"tags": [
"RoleAssignments"
],
"operationId": "CreateRoleAssignment",
"description": "Create role assignment.",
"x-ms-examples": {
"Create role assignment": {
"$ref": "./examples/RoleAssignments_CreateRoleAssignment.json"
}
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "createRoleAssignmentOptions",
"in": "body",
"required": true,
"description": "Details of role id and object id.",
"schema": {
"$ref": "#/definitions/RoleAssignmentOptions"
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success response.",
"schema": {
"$ref": "#/definitions/RoleAssignmentDetails"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorContract"
}
}
}
},
"get": {
"tags": [
"RoleAssignments"
],
"operationId": "GetRoleAssignments",
"description": "List role assignments.",
"x-ms-examples": {
"Get role assignment information": {
"$ref": "./examples/RoleAssignments_ListRoleAssignments.json"
}
},
"consumes": [],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/RoleIdParameterInQuery"
},
{
"$ref": "#/parameters/PrincipalIdParameter"
},
{
"$ref": "#/parameters/XMsContinuationToken"
}
],
"responses": {
"200": {
"description": "Success response.",
"headers": {
"x-ms-continuation": {
"description": "If the number of role assignments to be listed exceeds the maxResults limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the list operation to continue listing the role assignments.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/RoleAssignmentDetailsList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorContract"
}
}
}
}
},
"/rbac/roleAssignments/{roleAssignmentId}": {
"get": {
"tags": [
"RoleAssignments"
],
"operationId": "GetRoleAssignmentById",
"description": "Get role assignment by role assignment Id.",
"x-ms-examples": {
"Get role assignment information": {
"$ref": "./examples/RoleAssignments_GetRoleAssignmentById.json"
}
},
"consumes": [],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/RoleAssignmentIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success response.",
"schema": {
"$ref": "#/definitions/RoleAssignmentDetails"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorContract"
}
}
}
},
"delete": {
"tags": [
"RoleAssignments"
],
"operationId": "DeleteRoleAssignmentById",
"description": "Delete role assignment by role assignment Id.",
"x-ms-examples": {
"Delete role assignment": {
"$ref": "./examples/RoleAssignments_DeleteRoleAssignmentById.json"
}
},
"consumes": [],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/RoleAssignmentIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success response."
},
"204": {
"description": "No Content."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorContract"
}
}
}
}
},
"/rbac/getMyAssignedRoles": {
"post": {
"tags": [
"RoleAssignments"
],
"operationId": "GetCallerRoleAssignments",
"description": "List role assignments of the caller.",
"x-ms-examples": {
"Get caller role assignments": {
"$ref": "./examples/RoleAssignments_ListCallerRoleAssignments.json"
}
},
"consumes": [],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success response.",
"schema": {
"type": "array",
"items": {
"description": "Role ID of the Synapse Built-In Role",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorContract"
}
}
}
}
}
},
"definitions": {
"ErrorContract": {
"title": "Error details.",
"description": "Contains details when the response code indicates an error.",
"type": "object",
"properties": {
"error": {
"description": "The error details.",
"$ref": "#/definitions/ErrorResponse"
}
}
},
"ErrorResponse": {
"required": [
"code",
"message"
],
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/ErrorDetail"
}
}
}
},
"ErrorDetail": {
"required": [
"code",
"message"
],
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"target": {
"type": "string"
}
}
},
"RoleAssignmentDetailsList": {
"description": "A list of role assignments",
"type": "array",
"items": {
"$ref": "#/definitions/RoleAssignmentDetails"
}
},
"RoleAssignmentOptions": {
"description": "Role Assignment request details",
"type": "object",
"properties": {
"roleId": {
"description": "Role ID of the Synapse Built-In Role",
"type": "string"
},
"principalId": {
"description": "Object ID of the AAD principal or security-group",
"type": "string"
}
},
"required": [
"roleId",
"principalId"
]
},
"RoleAssignmentDetails": {
"description": "Role Assignment response details",
"type": "object",
"properties": {
"id": {
"description": "Role Assignment ID",
"type": "string"
},
"roleId": {
"description": "Role ID of the Synapse Built-In Role",
"type": "string"
},
"principalId": {
"description": "Object ID of the AAD principal or security-group",
"type": "string"
}
}
}
},
"parameters": {
"Endpoint": {
"name": "endpoint",
"description": "The workspace development endpoint, for example `https://myworkspace.dev.azuresynapse.net`.",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "client"
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The Synapse client API Version."
},
"RoleIdParameterInQuery": {
"name": "roleId",
"in": "query",
"required": false,
"type": "string",
"description": "Synapse Built-In Role Id.",
"x-ms-parameter-location": "method"
},
"PrincipalIdParameter": {
"name": "principalId",
"in": "query",
"required": false,
"type": "string",
"description": "Object ID of the AAD principal or security-group.",
"x-ms-parameter-location": "method"
},
"RoleAssignmentIdParameter": {
"name": "roleAssignmentId",
"in": "path",
"required": true,
"type": "string",
"description": "The ID of the role assignment.",
"minLength": 1,
"x-ms-parameter-location": "method"
},
"XMsContinuationToken": {
"name": "x-ms-continuation",
"x-ms-client-name": "continuationToken",
"in": "header",
"required": false,
"type": "string",
"description": "Continuation token.",
"x-ms-parameter-location": "method"
}
}
}