@azure/synapse-access-control 1.0.0-beta.3 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -18
- package/dist/browser/accessControlClient.d.ts +21 -0
- package/dist/browser/accessControlClient.d.ts.map +1 -0
- package/dist/browser/accessControlClient.js +103 -0
- package/dist/browser/accessControlClient.js.map +1 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +11 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/models/index.d.ts +213 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/mappers.d.ts +16 -0
- package/dist/browser/models/mappers.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/models/mappers.js +151 -151
- package/dist/browser/models/mappers.js.map +1 -0
- package/dist/browser/models/parameters.d.ts +20 -0
- package/dist/browser/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/models/parameters.js +42 -42
- package/dist/browser/models/parameters.js.map +1 -0
- package/dist/browser/operations/index.d.ts +3 -0
- package/dist/browser/operations/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/index.js +2 -2
- package/{dist-esm/src → dist/browser}/operations/index.js.map +1 -1
- package/dist/browser/operations/roleAssignments.d.ts +55 -0
- package/dist/browser/operations/roleAssignments.d.ts.map +1 -0
- package/dist/browser/operations/roleAssignments.js +210 -0
- package/dist/browser/operations/roleAssignments.js.map +1 -0
- package/dist/browser/operations/roleDefinitions.d.ts +29 -0
- package/dist/browser/operations/roleDefinitions.d.ts.map +1 -0
- package/dist/browser/operations/roleDefinitions.js +110 -0
- package/dist/browser/operations/roleDefinitions.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +3 -0
- package/dist/browser/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/index.js +10 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/operationsInterfaces/roleAssignments.d.ts +40 -0
- package/dist/browser/operationsInterfaces/roleAssignments.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/roleAssignments.js.map +1 -0
- package/dist/browser/operationsInterfaces/roleDefinitions.d.ts +21 -0
- package/dist/browser/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/roleDefinitions.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/tracing.d.ts +2 -0
- package/dist/browser/tracing.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/tracing.js +4 -3
- package/dist/browser/tracing.js.map +1 -0
- package/dist/commonjs/accessControlClient.d.ts +21 -0
- package/dist/commonjs/accessControlClient.d.ts.map +1 -0
- package/dist/commonjs/accessControlClient.js +108 -0
- package/dist/commonjs/accessControlClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +16 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +213 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +10 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +16 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +460 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +20 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +152 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +3 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +13 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/roleAssignments.d.ts +55 -0
- package/dist/commonjs/operations/roleAssignments.d.ts.map +1 -0
- package/dist/commonjs/operations/roleAssignments.js +215 -0
- package/dist/commonjs/operations/roleAssignments.js.map +1 -0
- package/dist/commonjs/operations/roleDefinitions.d.ts +29 -0
- package/dist/commonjs/operations/roleDefinitions.d.ts.map +1 -0
- package/dist/commonjs/operations/roleDefinitions.js +115 -0
- package/dist/commonjs/operations/roleDefinitions.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +13 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/roleAssignments.d.ts +40 -0
- package/dist/commonjs/operationsInterfaces/roleAssignments.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/roleAssignments.js +10 -0
- package/dist/commonjs/operationsInterfaces/roleAssignments.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/roleDefinitions.d.ts +21 -0
- package/dist/commonjs/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/roleDefinitions.js +10 -0
- package/dist/commonjs/operationsInterfaces/roleDefinitions.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tracing.d.ts +2 -0
- package/dist/commonjs/tracing.d.ts.map +1 -0
- package/dist/commonjs/tracing.js +17 -0
- package/dist/commonjs/tracing.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/accessControlClient.d.ts +21 -0
- package/dist/esm/accessControlClient.d.ts.map +1 -0
- package/dist/esm/accessControlClient.js +103 -0
- package/dist/esm/accessControlClient.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models/index.d.ts +213 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/{dist-esm/src/operationsInterfaces → dist/esm/models}/index.js +1 -2
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +16 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +457 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +20 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +149 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/index.d.ts +3 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +10 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/roleAssignments.d.ts +55 -0
- package/dist/esm/operations/roleAssignments.d.ts.map +1 -0
- package/dist/esm/operations/roleAssignments.js +210 -0
- package/dist/esm/operations/roleAssignments.js.map +1 -0
- package/dist/esm/operations/roleDefinitions.d.ts +29 -0
- package/dist/esm/operations/roleDefinitions.d.ts.map +1 -0
- package/dist/esm/operations/roleDefinitions.js +110 -0
- package/dist/esm/operations/roleDefinitions.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +10 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/roleAssignments.d.ts +40 -0
- package/dist/esm/operationsInterfaces/roleAssignments.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/roleAssignments.js +9 -0
- package/dist/esm/operationsInterfaces/roleAssignments.js.map +1 -0
- package/dist/esm/operationsInterfaces/roleDefinitions.d.ts +21 -0
- package/dist/esm/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/roleDefinitions.js +9 -0
- package/dist/esm/operationsInterfaces/roleDefinitions.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/tracing.d.ts +2 -0
- package/dist/esm/tracing.d.ts.map +1 -0
- package/dist/esm/tracing.js +14 -0
- package/dist/esm/tracing.js.map +1 -0
- package/dist/react-native/accessControlClient.d.ts +21 -0
- package/dist/react-native/accessControlClient.d.ts.map +1 -0
- package/dist/react-native/accessControlClient.js +103 -0
- package/dist/react-native/accessControlClient.js.map +1 -0
- package/dist/react-native/index.d.ts +4 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +11 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/models/index.d.ts +213 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +9 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +16 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +457 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +20 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +149 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +3 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +10 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/roleAssignments.d.ts +55 -0
- package/dist/react-native/operations/roleAssignments.d.ts.map +1 -0
- package/dist/react-native/operations/roleAssignments.js +210 -0
- package/dist/react-native/operations/roleAssignments.js.map +1 -0
- package/dist/react-native/operations/roleDefinitions.d.ts +29 -0
- package/dist/react-native/operations/roleDefinitions.d.ts.map +1 -0
- package/dist/react-native/operations/roleDefinitions.js +110 -0
- package/dist/react-native/operations/roleDefinitions.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +10 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/roleAssignments.d.ts +40 -0
- package/dist/react-native/operationsInterfaces/roleAssignments.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/roleAssignments.js +9 -0
- package/dist/react-native/operationsInterfaces/roleAssignments.js.map +1 -0
- package/dist/react-native/operationsInterfaces/roleDefinitions.d.ts +21 -0
- package/dist/react-native/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/roleDefinitions.js +9 -0
- package/dist/react-native/operationsInterfaces/roleDefinitions.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/tracing.d.ts +2 -0
- package/dist/react-native/tracing.d.ts.map +1 -0
- package/dist/react-native/tracing.js +14 -0
- package/dist/react-native/tracing.js.map +1 -0
- package/package.json +84 -84
- package/CHANGELOG.md +0 -18
- package/dist/index.js +0 -1070
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/src/accessControlClient.js +0 -24
- package/dist-esm/src/accessControlClient.js.map +0 -1
- package/dist-esm/src/accessControlClientContext.js +0 -49
- package/dist-esm/src/accessControlClientContext.js.map +0 -1
- package/dist-esm/src/index.js +0 -12
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/roleAssignments.js +0 -243
- package/dist-esm/src/operations/roleAssignments.js.map +0 -1
- package/dist-esm/src/operations/roleDefinitions.js +0 -150
- package/dist-esm/src/operations/roleDefinitions.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/roleAssignments.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/roleDefinitions.js.map +0 -1
- package/dist-esm/src/tracing.js.map +0 -1
- package/dist-esm/test/public/test.spec.js +0 -18
- package/dist-esm/test/public/test.spec.js.map +0 -1
- package/dist-esm/test/public/utils/env.browser.js +0 -4
- package/dist-esm/test/public/utils/env.browser.js.map +0 -1
- package/dist-esm/test/public/utils/env.js +0 -5
- package/dist-esm/test/public/utils/env.js.map +0 -1
- package/dist-esm/test/public/utils/recordedClient.js +0 -41
- package/dist-esm/test/public/utils/recordedClient.js.map +0 -1
- package/rollup.config.js +0 -3
- package/tsconfig.json +0 -19
- package/types/synapse-access-control.d.ts +0 -329
- /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/roleAssignments.js +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/roleDefinitions.js +0 -0
package/dist/index.js
DELETED
|
@@ -1,1070 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var coreTracing = require('@azure/core-tracing');
|
|
6
|
-
var coreClient = require('@azure/core-client');
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) Microsoft Corporation.
|
|
10
|
-
* Licensed under the MIT License.
|
|
11
|
-
*
|
|
12
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
13
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
14
|
-
*/
|
|
15
|
-
const createSpan = coreTracing.createSpanFunction({
|
|
16
|
-
namespace: "Azure.Synapse.AccessControl",
|
|
17
|
-
packagePrefix: "Microsoft.Synapse"
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
* Copyright (c) Microsoft Corporation.
|
|
22
|
-
* Licensed under the MIT License.
|
|
23
|
-
*
|
|
24
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
25
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
26
|
-
*/
|
|
27
|
-
const CheckPrincipalAccessRequest = {
|
|
28
|
-
type: {
|
|
29
|
-
name: "Composite",
|
|
30
|
-
className: "CheckPrincipalAccessRequest",
|
|
31
|
-
modelProperties: {
|
|
32
|
-
subject: {
|
|
33
|
-
serializedName: "subject",
|
|
34
|
-
type: {
|
|
35
|
-
name: "Composite",
|
|
36
|
-
className: "SubjectInfo"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
actions: {
|
|
40
|
-
serializedName: "actions",
|
|
41
|
-
required: true,
|
|
42
|
-
type: {
|
|
43
|
-
name: "Sequence",
|
|
44
|
-
element: {
|
|
45
|
-
type: {
|
|
46
|
-
name: "Composite",
|
|
47
|
-
className: "RequiredAction"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
scope: {
|
|
53
|
-
serializedName: "scope",
|
|
54
|
-
required: true,
|
|
55
|
-
type: {
|
|
56
|
-
name: "String"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const SubjectInfo = {
|
|
63
|
-
type: {
|
|
64
|
-
name: "Composite",
|
|
65
|
-
className: "SubjectInfo",
|
|
66
|
-
modelProperties: {
|
|
67
|
-
principalId: {
|
|
68
|
-
serializedName: "principalId",
|
|
69
|
-
required: true,
|
|
70
|
-
type: {
|
|
71
|
-
name: "Uuid"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
groupIds: {
|
|
75
|
-
serializedName: "groupIds",
|
|
76
|
-
type: {
|
|
77
|
-
name: "Sequence",
|
|
78
|
-
element: {
|
|
79
|
-
type: {
|
|
80
|
-
name: "Uuid"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
const RequiredAction = {
|
|
89
|
-
type: {
|
|
90
|
-
name: "Composite",
|
|
91
|
-
className: "RequiredAction",
|
|
92
|
-
modelProperties: {
|
|
93
|
-
id: {
|
|
94
|
-
serializedName: "id",
|
|
95
|
-
required: true,
|
|
96
|
-
type: {
|
|
97
|
-
name: "String"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
isDataAction: {
|
|
101
|
-
serializedName: "isDataAction",
|
|
102
|
-
required: true,
|
|
103
|
-
type: {
|
|
104
|
-
name: "Boolean"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
const CheckPrincipalAccessResponse = {
|
|
111
|
-
type: {
|
|
112
|
-
name: "Composite",
|
|
113
|
-
className: "CheckPrincipalAccessResponse",
|
|
114
|
-
modelProperties: {
|
|
115
|
-
accessDecisions: {
|
|
116
|
-
serializedName: "accessDecisions",
|
|
117
|
-
type: {
|
|
118
|
-
name: "Sequence",
|
|
119
|
-
element: {
|
|
120
|
-
type: {
|
|
121
|
-
name: "Composite",
|
|
122
|
-
className: "CheckAccessDecision"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
const CheckAccessDecision = {
|
|
131
|
-
type: {
|
|
132
|
-
name: "Composite",
|
|
133
|
-
className: "CheckAccessDecision",
|
|
134
|
-
modelProperties: {
|
|
135
|
-
accessDecision: {
|
|
136
|
-
serializedName: "accessDecision",
|
|
137
|
-
type: {
|
|
138
|
-
name: "String"
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
actionId: {
|
|
142
|
-
serializedName: "actionId",
|
|
143
|
-
type: {
|
|
144
|
-
name: "String"
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
roleAssignment: {
|
|
148
|
-
serializedName: "roleAssignment",
|
|
149
|
-
type: {
|
|
150
|
-
name: "Composite",
|
|
151
|
-
className: "RoleAssignmentDetails"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
const RoleAssignmentDetails = {
|
|
158
|
-
type: {
|
|
159
|
-
name: "Composite",
|
|
160
|
-
className: "RoleAssignmentDetails",
|
|
161
|
-
modelProperties: {
|
|
162
|
-
id: {
|
|
163
|
-
serializedName: "id",
|
|
164
|
-
type: {
|
|
165
|
-
name: "String"
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
roleDefinitionId: {
|
|
169
|
-
serializedName: "roleDefinitionId",
|
|
170
|
-
type: {
|
|
171
|
-
name: "Uuid"
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
principalId: {
|
|
175
|
-
serializedName: "principalId",
|
|
176
|
-
type: {
|
|
177
|
-
name: "Uuid"
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
scope: {
|
|
181
|
-
serializedName: "scope",
|
|
182
|
-
type: {
|
|
183
|
-
name: "String"
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
principalType: {
|
|
187
|
-
serializedName: "principalType",
|
|
188
|
-
type: {
|
|
189
|
-
name: "String"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
const ErrorContract = {
|
|
196
|
-
type: {
|
|
197
|
-
name: "Composite",
|
|
198
|
-
className: "ErrorContract",
|
|
199
|
-
modelProperties: {
|
|
200
|
-
error: {
|
|
201
|
-
serializedName: "error",
|
|
202
|
-
type: {
|
|
203
|
-
name: "Composite",
|
|
204
|
-
className: "ErrorResponse"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
const ErrorResponse = {
|
|
211
|
-
type: {
|
|
212
|
-
name: "Composite",
|
|
213
|
-
className: "ErrorResponse",
|
|
214
|
-
modelProperties: {
|
|
215
|
-
code: {
|
|
216
|
-
serializedName: "code",
|
|
217
|
-
readOnly: true,
|
|
218
|
-
type: {
|
|
219
|
-
name: "String"
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
message: {
|
|
223
|
-
serializedName: "message",
|
|
224
|
-
readOnly: true,
|
|
225
|
-
type: {
|
|
226
|
-
name: "String"
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
target: {
|
|
230
|
-
serializedName: "target",
|
|
231
|
-
readOnly: true,
|
|
232
|
-
type: {
|
|
233
|
-
name: "String"
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
details: {
|
|
237
|
-
serializedName: "details",
|
|
238
|
-
readOnly: true,
|
|
239
|
-
type: {
|
|
240
|
-
name: "Sequence",
|
|
241
|
-
element: {
|
|
242
|
-
type: {
|
|
243
|
-
name: "Composite",
|
|
244
|
-
className: "ErrorResponse"
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
additionalInfo: {
|
|
250
|
-
serializedName: "additionalInfo",
|
|
251
|
-
readOnly: true,
|
|
252
|
-
type: {
|
|
253
|
-
name: "Sequence",
|
|
254
|
-
element: {
|
|
255
|
-
type: {
|
|
256
|
-
name: "Composite",
|
|
257
|
-
className: "ErrorAdditionalInfo"
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
const ErrorAdditionalInfo = {
|
|
266
|
-
type: {
|
|
267
|
-
name: "Composite",
|
|
268
|
-
className: "ErrorAdditionalInfo",
|
|
269
|
-
modelProperties: {
|
|
270
|
-
type: {
|
|
271
|
-
serializedName: "type",
|
|
272
|
-
readOnly: true,
|
|
273
|
-
type: {
|
|
274
|
-
name: "String"
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
info: {
|
|
278
|
-
serializedName: "info",
|
|
279
|
-
readOnly: true,
|
|
280
|
-
type: {
|
|
281
|
-
name: "Dictionary",
|
|
282
|
-
value: { type: { name: "any" } }
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
const RoleAssignmentDetailsList = {
|
|
289
|
-
type: {
|
|
290
|
-
name: "Composite",
|
|
291
|
-
className: "RoleAssignmentDetailsList",
|
|
292
|
-
modelProperties: {
|
|
293
|
-
count: {
|
|
294
|
-
serializedName: "count",
|
|
295
|
-
type: {
|
|
296
|
-
name: "Number"
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
value: {
|
|
300
|
-
serializedName: "value",
|
|
301
|
-
type: {
|
|
302
|
-
name: "Sequence",
|
|
303
|
-
element: {
|
|
304
|
-
type: {
|
|
305
|
-
name: "Composite",
|
|
306
|
-
className: "RoleAssignmentDetails"
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
const RoleAssignmentRequest = {
|
|
315
|
-
type: {
|
|
316
|
-
name: "Composite",
|
|
317
|
-
className: "RoleAssignmentRequest",
|
|
318
|
-
modelProperties: {
|
|
319
|
-
roleId: {
|
|
320
|
-
serializedName: "roleId",
|
|
321
|
-
required: true,
|
|
322
|
-
type: {
|
|
323
|
-
name: "Uuid"
|
|
324
|
-
}
|
|
325
|
-
},
|
|
326
|
-
principalId: {
|
|
327
|
-
serializedName: "principalId",
|
|
328
|
-
required: true,
|
|
329
|
-
type: {
|
|
330
|
-
name: "Uuid"
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
scope: {
|
|
334
|
-
serializedName: "scope",
|
|
335
|
-
required: true,
|
|
336
|
-
type: {
|
|
337
|
-
name: "String"
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
principalType: {
|
|
341
|
-
serializedName: "principalType",
|
|
342
|
-
type: {
|
|
343
|
-
name: "String"
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
|
-
const SynapseRoleDefinition = {
|
|
350
|
-
type: {
|
|
351
|
-
name: "Composite",
|
|
352
|
-
className: "SynapseRoleDefinition",
|
|
353
|
-
modelProperties: {
|
|
354
|
-
id: {
|
|
355
|
-
serializedName: "id",
|
|
356
|
-
type: {
|
|
357
|
-
name: "Uuid"
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
name: {
|
|
361
|
-
serializedName: "name",
|
|
362
|
-
type: {
|
|
363
|
-
name: "String"
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
isBuiltIn: {
|
|
367
|
-
serializedName: "isBuiltIn",
|
|
368
|
-
type: {
|
|
369
|
-
name: "Boolean"
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
description: {
|
|
373
|
-
serializedName: "description",
|
|
374
|
-
type: {
|
|
375
|
-
name: "String"
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
permissions: {
|
|
379
|
-
serializedName: "permissions",
|
|
380
|
-
type: {
|
|
381
|
-
name: "Sequence",
|
|
382
|
-
element: {
|
|
383
|
-
type: {
|
|
384
|
-
name: "Composite",
|
|
385
|
-
className: "SynapseRbacPermission"
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
scopes: {
|
|
391
|
-
serializedName: "scopes",
|
|
392
|
-
type: {
|
|
393
|
-
name: "Sequence",
|
|
394
|
-
element: {
|
|
395
|
-
type: {
|
|
396
|
-
name: "String"
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
availabilityStatus: {
|
|
402
|
-
serializedName: "availabilityStatus",
|
|
403
|
-
type: {
|
|
404
|
-
name: "String"
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
const SynapseRbacPermission = {
|
|
411
|
-
type: {
|
|
412
|
-
name: "Composite",
|
|
413
|
-
className: "SynapseRbacPermission",
|
|
414
|
-
modelProperties: {
|
|
415
|
-
actions: {
|
|
416
|
-
serializedName: "actions",
|
|
417
|
-
type: {
|
|
418
|
-
name: "Sequence",
|
|
419
|
-
element: {
|
|
420
|
-
type: {
|
|
421
|
-
name: "String"
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
notActions: {
|
|
427
|
-
serializedName: "notActions",
|
|
428
|
-
type: {
|
|
429
|
-
name: "Sequence",
|
|
430
|
-
element: {
|
|
431
|
-
type: {
|
|
432
|
-
name: "String"
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
},
|
|
437
|
-
dataActions: {
|
|
438
|
-
serializedName: "dataActions",
|
|
439
|
-
type: {
|
|
440
|
-
name: "Sequence",
|
|
441
|
-
element: {
|
|
442
|
-
type: {
|
|
443
|
-
name: "String"
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
notDataActions: {
|
|
449
|
-
serializedName: "notDataActions",
|
|
450
|
-
type: {
|
|
451
|
-
name: "Sequence",
|
|
452
|
-
element: {
|
|
453
|
-
type: {
|
|
454
|
-
name: "String"
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
const RoleAssignmentsListRoleAssignmentsHeaders = {
|
|
463
|
-
type: {
|
|
464
|
-
name: "Composite",
|
|
465
|
-
className: "RoleAssignmentsListRoleAssignmentsHeaders",
|
|
466
|
-
modelProperties: {
|
|
467
|
-
xMsContinuation: {
|
|
468
|
-
serializedName: "x-ms-continuation",
|
|
469
|
-
type: {
|
|
470
|
-
name: "String"
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
var Mappers = /*#__PURE__*/Object.freeze({
|
|
478
|
-
__proto__: null,
|
|
479
|
-
CheckPrincipalAccessRequest: CheckPrincipalAccessRequest,
|
|
480
|
-
SubjectInfo: SubjectInfo,
|
|
481
|
-
RequiredAction: RequiredAction,
|
|
482
|
-
CheckPrincipalAccessResponse: CheckPrincipalAccessResponse,
|
|
483
|
-
CheckAccessDecision: CheckAccessDecision,
|
|
484
|
-
RoleAssignmentDetails: RoleAssignmentDetails,
|
|
485
|
-
ErrorContract: ErrorContract,
|
|
486
|
-
ErrorResponse: ErrorResponse,
|
|
487
|
-
ErrorAdditionalInfo: ErrorAdditionalInfo,
|
|
488
|
-
RoleAssignmentDetailsList: RoleAssignmentDetailsList,
|
|
489
|
-
RoleAssignmentRequest: RoleAssignmentRequest,
|
|
490
|
-
SynapseRoleDefinition: SynapseRoleDefinition,
|
|
491
|
-
SynapseRbacPermission: SynapseRbacPermission,
|
|
492
|
-
RoleAssignmentsListRoleAssignmentsHeaders: RoleAssignmentsListRoleAssignmentsHeaders
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
/*
|
|
496
|
-
* Copyright (c) Microsoft Corporation.
|
|
497
|
-
* Licensed under the MIT License.
|
|
498
|
-
*
|
|
499
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
500
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
501
|
-
*/
|
|
502
|
-
const contentType = {
|
|
503
|
-
parameterPath: ["options", "contentType"],
|
|
504
|
-
mapper: {
|
|
505
|
-
defaultValue: "application/json",
|
|
506
|
-
isConstant: true,
|
|
507
|
-
serializedName: "Content-Type",
|
|
508
|
-
type: {
|
|
509
|
-
name: "String"
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
const accept = {
|
|
514
|
-
parameterPath: "accept",
|
|
515
|
-
mapper: {
|
|
516
|
-
defaultValue: "application/json, text/json",
|
|
517
|
-
isConstant: true,
|
|
518
|
-
serializedName: "Accept",
|
|
519
|
-
type: {
|
|
520
|
-
name: "String"
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
const endpoint = {
|
|
525
|
-
parameterPath: "endpoint",
|
|
526
|
-
mapper: {
|
|
527
|
-
serializedName: "endpoint",
|
|
528
|
-
required: true,
|
|
529
|
-
type: {
|
|
530
|
-
name: "String"
|
|
531
|
-
}
|
|
532
|
-
},
|
|
533
|
-
skipEncoding: true
|
|
534
|
-
};
|
|
535
|
-
const apiVersion = {
|
|
536
|
-
parameterPath: "apiVersion",
|
|
537
|
-
mapper: {
|
|
538
|
-
defaultValue: "2020-12-01",
|
|
539
|
-
isConstant: true,
|
|
540
|
-
serializedName: "api-version",
|
|
541
|
-
type: {
|
|
542
|
-
name: "String"
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
const roleId = {
|
|
547
|
-
parameterPath: ["options", "roleId"],
|
|
548
|
-
mapper: {
|
|
549
|
-
serializedName: "roleId",
|
|
550
|
-
type: {
|
|
551
|
-
name: "String"
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
const principalId = {
|
|
556
|
-
parameterPath: ["options", "principalId"],
|
|
557
|
-
mapper: {
|
|
558
|
-
serializedName: "principalId",
|
|
559
|
-
type: {
|
|
560
|
-
name: "String"
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
const scope1 = {
|
|
565
|
-
parameterPath: ["options", "scope"],
|
|
566
|
-
mapper: {
|
|
567
|
-
serializedName: "scope",
|
|
568
|
-
type: {
|
|
569
|
-
name: "String"
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
const continuationToken = {
|
|
574
|
-
parameterPath: ["options", "continuationToken"],
|
|
575
|
-
mapper: {
|
|
576
|
-
serializedName: "x-ms-continuation",
|
|
577
|
-
type: {
|
|
578
|
-
name: "String"
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
const roleAssignmentId = {
|
|
583
|
-
parameterPath: "roleAssignmentId",
|
|
584
|
-
mapper: {
|
|
585
|
-
constraints: {
|
|
586
|
-
MinLength: 1
|
|
587
|
-
},
|
|
588
|
-
serializedName: "roleAssignmentId",
|
|
589
|
-
required: true,
|
|
590
|
-
type: {
|
|
591
|
-
name: "String"
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
};
|
|
595
|
-
const isBuiltIn = {
|
|
596
|
-
parameterPath: ["options", "isBuiltIn"],
|
|
597
|
-
mapper: {
|
|
598
|
-
serializedName: "isBuiltIn",
|
|
599
|
-
type: {
|
|
600
|
-
name: "Boolean"
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
};
|
|
604
|
-
const roleDefinitionId = {
|
|
605
|
-
parameterPath: "roleDefinitionId",
|
|
606
|
-
mapper: {
|
|
607
|
-
serializedName: "roleDefinitionId",
|
|
608
|
-
required: true,
|
|
609
|
-
type: {
|
|
610
|
-
name: "String"
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
|
|
615
|
-
/*
|
|
616
|
-
* Copyright (c) Microsoft Corporation.
|
|
617
|
-
* Licensed under the MIT License.
|
|
618
|
-
*
|
|
619
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
620
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
621
|
-
*/
|
|
622
|
-
/** Class representing a RoleAssignments. */
|
|
623
|
-
class RoleAssignmentsImpl {
|
|
624
|
-
/**
|
|
625
|
-
* Initialize a new instance of the class RoleAssignments class.
|
|
626
|
-
* @param client Reference to the service client
|
|
627
|
-
*/
|
|
628
|
-
constructor(client) {
|
|
629
|
-
this.client = client;
|
|
630
|
-
}
|
|
631
|
-
/**
|
|
632
|
-
* Check if the given principalId has access to perform list of actions at a given scope.
|
|
633
|
-
* @param subject Subject details
|
|
634
|
-
* @param actions List of actions.
|
|
635
|
-
* @param scope Scope at which the check access is done.
|
|
636
|
-
* @param options The options parameters.
|
|
637
|
-
*/
|
|
638
|
-
async checkPrincipalAccess(subject, actions, scope, options) {
|
|
639
|
-
const { span } = createSpan("AccessControlClient-checkPrincipalAccess", options || {});
|
|
640
|
-
try {
|
|
641
|
-
const result = await this.client.sendOperationRequest({ subject, actions, scope, options }, checkPrincipalAccessOperationSpec);
|
|
642
|
-
return result;
|
|
643
|
-
}
|
|
644
|
-
catch (error) {
|
|
645
|
-
span.setStatus({
|
|
646
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
647
|
-
message: error.message
|
|
648
|
-
});
|
|
649
|
-
throw error;
|
|
650
|
-
}
|
|
651
|
-
finally {
|
|
652
|
-
span.end();
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* List role assignments.
|
|
657
|
-
* @param options The options parameters.
|
|
658
|
-
*/
|
|
659
|
-
async listRoleAssignments(options) {
|
|
660
|
-
const { span } = createSpan("AccessControlClient-listRoleAssignments", options || {});
|
|
661
|
-
try {
|
|
662
|
-
const result = await this.client.sendOperationRequest({ options }, listRoleAssignmentsOperationSpec);
|
|
663
|
-
return result;
|
|
664
|
-
}
|
|
665
|
-
catch (error) {
|
|
666
|
-
span.setStatus({
|
|
667
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
668
|
-
message: error.message
|
|
669
|
-
});
|
|
670
|
-
throw error;
|
|
671
|
-
}
|
|
672
|
-
finally {
|
|
673
|
-
span.end();
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
/**
|
|
677
|
-
* Create role assignment.
|
|
678
|
-
* @param roleAssignmentId The ID of the role assignment.
|
|
679
|
-
* @param roleId Role ID of the Synapse Built-In Role
|
|
680
|
-
* @param principalId Object ID of the AAD principal or security-group
|
|
681
|
-
* @param scope Scope at which the role assignment is created
|
|
682
|
-
* @param options The options parameters.
|
|
683
|
-
*/
|
|
684
|
-
async createRoleAssignment(roleAssignmentId, roleId, principalId, scope, options) {
|
|
685
|
-
const { span } = createSpan("AccessControlClient-createRoleAssignment", options || {});
|
|
686
|
-
try {
|
|
687
|
-
const result = await this.client.sendOperationRequest({ roleAssignmentId, roleId, principalId, scope, options }, createRoleAssignmentOperationSpec);
|
|
688
|
-
return result;
|
|
689
|
-
}
|
|
690
|
-
catch (error) {
|
|
691
|
-
span.setStatus({
|
|
692
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
693
|
-
message: error.message
|
|
694
|
-
});
|
|
695
|
-
throw error;
|
|
696
|
-
}
|
|
697
|
-
finally {
|
|
698
|
-
span.end();
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
/**
|
|
702
|
-
* Get role assignment by role assignment Id.
|
|
703
|
-
* @param roleAssignmentId The ID of the role assignment.
|
|
704
|
-
* @param options The options parameters.
|
|
705
|
-
*/
|
|
706
|
-
async getRoleAssignmentById(roleAssignmentId, options) {
|
|
707
|
-
const { span } = createSpan("AccessControlClient-getRoleAssignmentById", options || {});
|
|
708
|
-
try {
|
|
709
|
-
const result = await this.client.sendOperationRequest({ roleAssignmentId, options }, getRoleAssignmentByIdOperationSpec);
|
|
710
|
-
return result;
|
|
711
|
-
}
|
|
712
|
-
catch (error) {
|
|
713
|
-
span.setStatus({
|
|
714
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
715
|
-
message: error.message
|
|
716
|
-
});
|
|
717
|
-
throw error;
|
|
718
|
-
}
|
|
719
|
-
finally {
|
|
720
|
-
span.end();
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* Delete role assignment by role assignment Id.
|
|
725
|
-
* @param roleAssignmentId The ID of the role assignment.
|
|
726
|
-
* @param options The options parameters.
|
|
727
|
-
*/
|
|
728
|
-
async deleteRoleAssignmentById(roleAssignmentId, options) {
|
|
729
|
-
const { span } = createSpan("AccessControlClient-deleteRoleAssignmentById", options || {});
|
|
730
|
-
try {
|
|
731
|
-
const result = await this.client.sendOperationRequest({ roleAssignmentId, options }, deleteRoleAssignmentByIdOperationSpec);
|
|
732
|
-
return result;
|
|
733
|
-
}
|
|
734
|
-
catch (error) {
|
|
735
|
-
span.setStatus({
|
|
736
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
737
|
-
message: error.message
|
|
738
|
-
});
|
|
739
|
-
throw error;
|
|
740
|
-
}
|
|
741
|
-
finally {
|
|
742
|
-
span.end();
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
// Operation Specifications
|
|
747
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
748
|
-
const checkPrincipalAccessOperationSpec = {
|
|
749
|
-
path: "/checkAccessSynapseRbac",
|
|
750
|
-
httpMethod: "POST",
|
|
751
|
-
responses: {
|
|
752
|
-
200: {
|
|
753
|
-
bodyMapper: CheckPrincipalAccessResponse
|
|
754
|
-
},
|
|
755
|
-
default: {
|
|
756
|
-
bodyMapper: ErrorContract
|
|
757
|
-
}
|
|
758
|
-
},
|
|
759
|
-
requestBody: {
|
|
760
|
-
parameterPath: {
|
|
761
|
-
subject: ["subject"],
|
|
762
|
-
actions: ["actions"],
|
|
763
|
-
scope: ["scope"]
|
|
764
|
-
},
|
|
765
|
-
mapper: Object.assign(Object.assign({}, CheckPrincipalAccessRequest), { required: true })
|
|
766
|
-
},
|
|
767
|
-
queryParameters: [apiVersion],
|
|
768
|
-
urlParameters: [endpoint],
|
|
769
|
-
headerParameters: [contentType, accept],
|
|
770
|
-
mediaType: "json",
|
|
771
|
-
serializer
|
|
772
|
-
};
|
|
773
|
-
const listRoleAssignmentsOperationSpec = {
|
|
774
|
-
path: "/roleAssignments",
|
|
775
|
-
httpMethod: "GET",
|
|
776
|
-
responses: {
|
|
777
|
-
200: {
|
|
778
|
-
bodyMapper: RoleAssignmentDetailsList,
|
|
779
|
-
headersMapper: RoleAssignmentsListRoleAssignmentsHeaders
|
|
780
|
-
},
|
|
781
|
-
default: {
|
|
782
|
-
bodyMapper: ErrorContract
|
|
783
|
-
}
|
|
784
|
-
},
|
|
785
|
-
queryParameters: [
|
|
786
|
-
apiVersion,
|
|
787
|
-
roleId,
|
|
788
|
-
principalId,
|
|
789
|
-
scope1
|
|
790
|
-
],
|
|
791
|
-
urlParameters: [endpoint],
|
|
792
|
-
headerParameters: [accept, continuationToken],
|
|
793
|
-
serializer
|
|
794
|
-
};
|
|
795
|
-
const createRoleAssignmentOperationSpec = {
|
|
796
|
-
path: "/roleAssignments/{roleAssignmentId}",
|
|
797
|
-
httpMethod: "PUT",
|
|
798
|
-
responses: {
|
|
799
|
-
200: {
|
|
800
|
-
bodyMapper: RoleAssignmentDetails
|
|
801
|
-
},
|
|
802
|
-
default: {
|
|
803
|
-
bodyMapper: ErrorContract
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
requestBody: {
|
|
807
|
-
parameterPath: {
|
|
808
|
-
roleId: ["roleId"],
|
|
809
|
-
principalId: ["principalId"],
|
|
810
|
-
scope: ["scope"],
|
|
811
|
-
principalType: ["options", "principalType"]
|
|
812
|
-
},
|
|
813
|
-
mapper: Object.assign(Object.assign({}, RoleAssignmentRequest), { required: true })
|
|
814
|
-
},
|
|
815
|
-
queryParameters: [apiVersion],
|
|
816
|
-
urlParameters: [endpoint, roleAssignmentId],
|
|
817
|
-
headerParameters: [contentType, accept],
|
|
818
|
-
mediaType: "json",
|
|
819
|
-
serializer
|
|
820
|
-
};
|
|
821
|
-
const getRoleAssignmentByIdOperationSpec = {
|
|
822
|
-
path: "/roleAssignments/{roleAssignmentId}",
|
|
823
|
-
httpMethod: "GET",
|
|
824
|
-
responses: {
|
|
825
|
-
200: {
|
|
826
|
-
bodyMapper: RoleAssignmentDetails
|
|
827
|
-
},
|
|
828
|
-
default: {
|
|
829
|
-
bodyMapper: ErrorContract
|
|
830
|
-
}
|
|
831
|
-
},
|
|
832
|
-
queryParameters: [apiVersion],
|
|
833
|
-
urlParameters: [endpoint, roleAssignmentId],
|
|
834
|
-
headerParameters: [accept],
|
|
835
|
-
serializer
|
|
836
|
-
};
|
|
837
|
-
const deleteRoleAssignmentByIdOperationSpec = {
|
|
838
|
-
path: "/roleAssignments/{roleAssignmentId}",
|
|
839
|
-
httpMethod: "DELETE",
|
|
840
|
-
responses: {
|
|
841
|
-
200: {},
|
|
842
|
-
204: {},
|
|
843
|
-
default: {
|
|
844
|
-
bodyMapper: ErrorContract
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
queryParameters: [apiVersion, scope1],
|
|
848
|
-
urlParameters: [endpoint, roleAssignmentId],
|
|
849
|
-
headerParameters: [accept],
|
|
850
|
-
serializer
|
|
851
|
-
};
|
|
852
|
-
|
|
853
|
-
/*
|
|
854
|
-
* Copyright (c) Microsoft Corporation.
|
|
855
|
-
* Licensed under the MIT License.
|
|
856
|
-
*
|
|
857
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
858
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
859
|
-
*/
|
|
860
|
-
/** Class representing a RoleDefinitions. */
|
|
861
|
-
class RoleDefinitionsImpl {
|
|
862
|
-
/**
|
|
863
|
-
* Initialize a new instance of the class RoleDefinitions class.
|
|
864
|
-
* @param client Reference to the service client
|
|
865
|
-
*/
|
|
866
|
-
constructor(client) {
|
|
867
|
-
this.client = client;
|
|
868
|
-
}
|
|
869
|
-
/**
|
|
870
|
-
* List role definitions.
|
|
871
|
-
* @param options The options parameters.
|
|
872
|
-
*/
|
|
873
|
-
async listRoleDefinitions(options) {
|
|
874
|
-
const { span } = createSpan("AccessControlClient-listRoleDefinitions", options || {});
|
|
875
|
-
try {
|
|
876
|
-
const result = await this.client.sendOperationRequest({ options }, listRoleDefinitionsOperationSpec);
|
|
877
|
-
return result;
|
|
878
|
-
}
|
|
879
|
-
catch (error) {
|
|
880
|
-
span.setStatus({
|
|
881
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
882
|
-
message: error.message
|
|
883
|
-
});
|
|
884
|
-
throw error;
|
|
885
|
-
}
|
|
886
|
-
finally {
|
|
887
|
-
span.end();
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
/**
|
|
891
|
-
* Get role definition by role definition Id.
|
|
892
|
-
* @param roleDefinitionId Synapse Built-In Role Definition Id.
|
|
893
|
-
* @param options The options parameters.
|
|
894
|
-
*/
|
|
895
|
-
async getRoleDefinitionById(roleDefinitionId, options) {
|
|
896
|
-
const { span } = createSpan("AccessControlClient-getRoleDefinitionById", options || {});
|
|
897
|
-
try {
|
|
898
|
-
const result = await this.client.sendOperationRequest({ roleDefinitionId, options }, getRoleDefinitionByIdOperationSpec);
|
|
899
|
-
return result;
|
|
900
|
-
}
|
|
901
|
-
catch (error) {
|
|
902
|
-
span.setStatus({
|
|
903
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
904
|
-
message: error.message
|
|
905
|
-
});
|
|
906
|
-
throw error;
|
|
907
|
-
}
|
|
908
|
-
finally {
|
|
909
|
-
span.end();
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* List rbac scopes.
|
|
914
|
-
* @param options The options parameters.
|
|
915
|
-
*/
|
|
916
|
-
async listScopes(options) {
|
|
917
|
-
const { span } = createSpan("AccessControlClient-listScopes", options || {});
|
|
918
|
-
try {
|
|
919
|
-
const result = await this.client.sendOperationRequest({ options }, listScopesOperationSpec);
|
|
920
|
-
return result;
|
|
921
|
-
}
|
|
922
|
-
catch (error) {
|
|
923
|
-
span.setStatus({
|
|
924
|
-
code: coreTracing.SpanStatusCode.UNSET,
|
|
925
|
-
message: error.message
|
|
926
|
-
});
|
|
927
|
-
throw error;
|
|
928
|
-
}
|
|
929
|
-
finally {
|
|
930
|
-
span.end();
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
// Operation Specifications
|
|
935
|
-
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
936
|
-
const listRoleDefinitionsOperationSpec = {
|
|
937
|
-
path: "/roleDefinitions",
|
|
938
|
-
httpMethod: "GET",
|
|
939
|
-
responses: {
|
|
940
|
-
200: {
|
|
941
|
-
bodyMapper: {
|
|
942
|
-
type: {
|
|
943
|
-
name: "Sequence",
|
|
944
|
-
element: {
|
|
945
|
-
type: { name: "Composite", className: "SynapseRoleDefinition" }
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
},
|
|
950
|
-
default: {
|
|
951
|
-
bodyMapper: ErrorContract
|
|
952
|
-
}
|
|
953
|
-
},
|
|
954
|
-
queryParameters: [
|
|
955
|
-
apiVersion,
|
|
956
|
-
scope1,
|
|
957
|
-
isBuiltIn
|
|
958
|
-
],
|
|
959
|
-
urlParameters: [endpoint],
|
|
960
|
-
headerParameters: [accept],
|
|
961
|
-
serializer: serializer$1
|
|
962
|
-
};
|
|
963
|
-
const getRoleDefinitionByIdOperationSpec = {
|
|
964
|
-
path: "/roleDefinitions/{roleDefinitionId}",
|
|
965
|
-
httpMethod: "GET",
|
|
966
|
-
responses: {
|
|
967
|
-
200: {
|
|
968
|
-
bodyMapper: SynapseRoleDefinition
|
|
969
|
-
},
|
|
970
|
-
default: {
|
|
971
|
-
bodyMapper: ErrorContract
|
|
972
|
-
}
|
|
973
|
-
},
|
|
974
|
-
queryParameters: [apiVersion],
|
|
975
|
-
urlParameters: [endpoint, roleDefinitionId],
|
|
976
|
-
headerParameters: [accept],
|
|
977
|
-
serializer: serializer$1
|
|
978
|
-
};
|
|
979
|
-
const listScopesOperationSpec = {
|
|
980
|
-
path: "/rbacScopes",
|
|
981
|
-
httpMethod: "GET",
|
|
982
|
-
responses: {
|
|
983
|
-
200: {
|
|
984
|
-
bodyMapper: {
|
|
985
|
-
type: { name: "Sequence", element: { type: { name: "String" } } }
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
|
-
default: {
|
|
989
|
-
bodyMapper: ErrorContract
|
|
990
|
-
}
|
|
991
|
-
},
|
|
992
|
-
queryParameters: [apiVersion],
|
|
993
|
-
urlParameters: [endpoint],
|
|
994
|
-
headerParameters: [accept],
|
|
995
|
-
serializer: serializer$1
|
|
996
|
-
};
|
|
997
|
-
|
|
998
|
-
/*
|
|
999
|
-
* Copyright (c) Microsoft Corporation.
|
|
1000
|
-
* Licensed under the MIT License.
|
|
1001
|
-
*
|
|
1002
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1003
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1004
|
-
*/
|
|
1005
|
-
class AccessControlClientContext extends coreClient.ServiceClient {
|
|
1006
|
-
/**
|
|
1007
|
-
* Initializes a new instance of the AccessControlClientContext class.
|
|
1008
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1009
|
-
* @param endpoint The workspace development endpoint, for example
|
|
1010
|
-
* https://myworkspace.dev.azuresynapse.net.
|
|
1011
|
-
* @param options The parameter options
|
|
1012
|
-
*/
|
|
1013
|
-
constructor(credentials, endpoint, options) {
|
|
1014
|
-
if (credentials === undefined) {
|
|
1015
|
-
throw new Error("'credentials' cannot be null");
|
|
1016
|
-
}
|
|
1017
|
-
if (endpoint === undefined) {
|
|
1018
|
-
throw new Error("'endpoint' cannot be null");
|
|
1019
|
-
}
|
|
1020
|
-
// Initializing default values for options
|
|
1021
|
-
if (!options) {
|
|
1022
|
-
options = {};
|
|
1023
|
-
}
|
|
1024
|
-
const defaults = {
|
|
1025
|
-
requestContentType: "application/json; charset=utf-8",
|
|
1026
|
-
credential: credentials
|
|
1027
|
-
};
|
|
1028
|
-
const packageDetails = `azsdk-js-synapse-access-control/1.0.0-beta.3`;
|
|
1029
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1030
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1031
|
-
: `${packageDetails}`;
|
|
1032
|
-
if (!options.credentialScopes) {
|
|
1033
|
-
options.credentialScopes = ["https://dev.azuresynapse.net/.default"];
|
|
1034
|
-
}
|
|
1035
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1036
|
-
userAgentPrefix
|
|
1037
|
-
}, baseUri: options.endpoint || "{endpoint}" });
|
|
1038
|
-
super(optionsWithDefaults);
|
|
1039
|
-
// Parameter assignments
|
|
1040
|
-
this.endpoint = endpoint;
|
|
1041
|
-
// Assigning values to Constant parameters
|
|
1042
|
-
this.apiVersion = options.apiVersion || "2020-12-01";
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
/*
|
|
1047
|
-
* Copyright (c) Microsoft Corporation.
|
|
1048
|
-
* Licensed under the MIT License.
|
|
1049
|
-
*
|
|
1050
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1051
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1052
|
-
*/
|
|
1053
|
-
class AccessControlClient extends AccessControlClientContext {
|
|
1054
|
-
/**
|
|
1055
|
-
* Initializes a new instance of the AccessControlClient class.
|
|
1056
|
-
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1057
|
-
* @param endpoint The workspace development endpoint, for example
|
|
1058
|
-
* https://myworkspace.dev.azuresynapse.net.
|
|
1059
|
-
* @param options The parameter options
|
|
1060
|
-
*/
|
|
1061
|
-
constructor(credentials, endpoint, options) {
|
|
1062
|
-
super(credentials, endpoint, options);
|
|
1063
|
-
this.roleAssignments = new RoleAssignmentsImpl(this);
|
|
1064
|
-
this.roleDefinitions = new RoleDefinitionsImpl(this);
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
exports.AccessControlClient = AccessControlClient;
|
|
1069
|
-
exports.AccessControlClientContext = AccessControlClientContext;
|
|
1070
|
-
//# sourceMappingURL=index.js.map
|