@databricks/sdk-accessmanagement 0.34.0 → 0.35.0

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.
@@ -1,371 +1,364 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
+
3
+ //#region src/v1/model.d.ts
2
4
  /** Permission level */
3
- export declare const PermissionLevel: {
4
- readonly CAN_MANAGE: "CAN_MANAGE";
5
- readonly CAN_RESTART: "CAN_RESTART";
6
- readonly CAN_ATTACH_TO: "CAN_ATTACH_TO";
7
- readonly IS_OWNER: "IS_OWNER";
8
- readonly CAN_MANAGE_RUN: "CAN_MANAGE_RUN";
9
- readonly CAN_VIEW: "CAN_VIEW";
10
- readonly CAN_READ: "CAN_READ";
11
- readonly CAN_RUN: "CAN_RUN";
12
- readonly CAN_EDIT: "CAN_EDIT";
13
- readonly CAN_USE: "CAN_USE";
14
- readonly CAN_MANAGE_STAGING_VERSIONS: "CAN_MANAGE_STAGING_VERSIONS";
15
- readonly CAN_MANAGE_PRODUCTION_VERSIONS: "CAN_MANAGE_PRODUCTION_VERSIONS";
16
- readonly CAN_EDIT_METADATA: "CAN_EDIT_METADATA";
17
- readonly CAN_VIEW_METADATA: "CAN_VIEW_METADATA";
18
- readonly CAN_BIND: "CAN_BIND";
19
- readonly CAN_QUERY: "CAN_QUERY";
20
- readonly CAN_MONITOR: "CAN_MONITOR";
21
- readonly CAN_CREATE: "CAN_CREATE";
22
- readonly CAN_MONITOR_ONLY: "CAN_MONITOR_ONLY";
23
- readonly CAN_CREATE_APP: "CAN_CREATE_APP";
5
+ declare const PermissionLevel: {
6
+ readonly CAN_MANAGE: "CAN_MANAGE";
7
+ readonly CAN_RESTART: "CAN_RESTART";
8
+ readonly CAN_ATTACH_TO: "CAN_ATTACH_TO";
9
+ readonly IS_OWNER: "IS_OWNER";
10
+ readonly CAN_MANAGE_RUN: "CAN_MANAGE_RUN";
11
+ readonly CAN_VIEW: "CAN_VIEW";
12
+ readonly CAN_READ: "CAN_READ";
13
+ readonly CAN_RUN: "CAN_RUN";
14
+ readonly CAN_EDIT: "CAN_EDIT";
15
+ readonly CAN_USE: "CAN_USE";
16
+ readonly CAN_MANAGE_STAGING_VERSIONS: "CAN_MANAGE_STAGING_VERSIONS";
17
+ readonly CAN_MANAGE_PRODUCTION_VERSIONS: "CAN_MANAGE_PRODUCTION_VERSIONS";
18
+ readonly CAN_EDIT_METADATA: "CAN_EDIT_METADATA";
19
+ readonly CAN_VIEW_METADATA: "CAN_VIEW_METADATA";
20
+ readonly CAN_BIND: "CAN_BIND";
21
+ readonly CAN_QUERY: "CAN_QUERY";
22
+ readonly CAN_MONITOR: "CAN_MONITOR";
23
+ readonly CAN_CREATE: "CAN_CREATE";
24
+ readonly CAN_MONITOR_ONLY: "CAN_MONITOR_ONLY";
25
+ readonly CAN_CREATE_APP: "CAN_CREATE_APP";
24
26
  };
25
- export type PermissionLevel = (typeof PermissionLevel)[keyof typeof PermissionLevel] | (string & {});
27
+ type PermissionLevel = (typeof PermissionLevel)[keyof typeof PermissionLevel] | (string & {});
26
28
  /**
27
29
  * Defines the identity to be used for authZ of the request on the server side. See one pager for
28
30
  * for more information: http://go/acl/service-identity
29
31
  */
30
- export declare const RequestAuthzIdentity: {
31
- readonly REQUEST_AUTHZ_IDENTITY_UNSPECIFIED: "REQUEST_AUTHZ_IDENTITY_UNSPECIFIED";
32
- readonly REQUEST_AUTHZ_IDENTITY_USER_CONTEXT: "REQUEST_AUTHZ_IDENTITY_USER_CONTEXT";
33
- readonly REQUEST_AUTHZ_IDENTITY_SERVICE_IDENTITY: "REQUEST_AUTHZ_IDENTITY_SERVICE_IDENTITY";
32
+ declare const RequestAuthzIdentity: {
33
+ readonly REQUEST_AUTHZ_IDENTITY_UNSPECIFIED: "REQUEST_AUTHZ_IDENTITY_UNSPECIFIED";
34
+ readonly REQUEST_AUTHZ_IDENTITY_USER_CONTEXT: "REQUEST_AUTHZ_IDENTITY_USER_CONTEXT";
35
+ readonly REQUEST_AUTHZ_IDENTITY_SERVICE_IDENTITY: "REQUEST_AUTHZ_IDENTITY_SERVICE_IDENTITY";
34
36
  };
35
- export type RequestAuthzIdentity = (typeof RequestAuthzIdentity)[keyof typeof RequestAuthzIdentity] | (string & {});
36
- export declare const WorkspacePermission: {
37
- readonly UNKNOWN: "UNKNOWN";
38
- /** The most basic workspace permission */
39
- readonly USER: "USER";
40
- readonly ADMIN: "ADMIN";
37
+ type RequestAuthzIdentity = (typeof RequestAuthzIdentity)[keyof typeof RequestAuthzIdentity] | (string & {});
38
+ declare const WorkspacePermission: {
39
+ readonly UNKNOWN: "UNKNOWN"; /** The most basic workspace permission */
40
+ readonly USER: "USER";
41
+ readonly ADMIN: "ADMIN";
41
42
  };
42
- export type WorkspacePermission = (typeof WorkspacePermission)[keyof typeof WorkspacePermission] | (string & {});
43
- export interface AccessControlRequest {
44
- principalName?: {
45
- $case: 'userName';
46
- /** name of the user */
47
- userName: string;
48
- } | {
49
- $case: 'groupName';
50
- /** name of the group */
51
- groupName: string;
52
- } | {
53
- $case: 'servicePrincipalName';
54
- /** application ID of a service principal */
55
- servicePrincipalName: string;
56
- } | undefined;
57
- permissionLevel?: PermissionLevel | undefined;
58
- }
59
- export interface AccessControlResponse {
60
- principalName?: {
61
- $case: 'userName';
62
- /** name of the user */
63
- userName: string;
64
- } | {
65
- $case: 'groupName';
66
- /** name of the group */
67
- groupName: string;
68
- } | {
69
- $case: 'servicePrincipalName';
70
- /** Name of the service principal. */
71
- servicePrincipalName: string;
72
- } | undefined;
73
- /** Display name of the user or service principal. */
74
- displayName?: string | undefined;
75
- /** All permissions. */
76
- allPermissions?: Permission[] | undefined;
43
+ type WorkspacePermission = (typeof WorkspacePermission)[keyof typeof WorkspacePermission] | (string & {});
44
+ interface AccessControlRequest {
45
+ principalName?: {
46
+ $case: 'userName'; /** name of the user */
47
+ userName: string;
48
+ } | {
49
+ $case: 'groupName'; /** name of the group */
50
+ groupName: string;
51
+ } | {
52
+ $case: 'servicePrincipalName'; /** application ID of a service principal */
53
+ servicePrincipalName: string;
54
+ } | undefined;
55
+ permissionLevel?: PermissionLevel | undefined;
56
+ }
57
+ interface AccessControlResponse {
58
+ principalName?: {
59
+ $case: 'userName'; /** name of the user */
60
+ userName: string;
61
+ } | {
62
+ $case: 'groupName'; /** name of the group */
63
+ groupName: string;
64
+ } | {
65
+ $case: 'servicePrincipalName'; /** Name of the service principal. */
66
+ servicePrincipalName: string;
67
+ } | undefined;
68
+ /** Display name of the user or service principal. */
69
+ displayName?: string | undefined;
70
+ /** All permissions. */
71
+ allPermissions?: Permission[] | undefined;
77
72
  }
78
73
  /**
79
74
  * represents an identity trying to access a resource - user or a service principal
80
75
  * group can be a principal of a permission set assignment but an actor is always a user or a service principal
81
76
  */
82
- export interface Actor {
83
- kind?: {
84
- $case: 'actorId';
85
- actorId: bigint;
86
- } | undefined;
87
- }
88
- export interface CheckPolicyRequest {
89
- actor?: Actor | undefined;
90
- permission?: string | undefined;
91
- /**
92
- * Ex: (servicePrincipal/use, accounts/<account-id>/servicePrincipals/<sp-id>)
93
- * Ex: (servicePrincipal.ruleSet/update, accounts/<account-id>/servicePrincipals/<sp-id>/ruleSets/default)
94
- */
95
- resource?: string | undefined;
96
- consistencyToken?: ConsistencyToken | undefined;
97
- authzIdentity?: RequestAuthzIdentity | undefined;
98
- resourceInfo?: ResourceInfo | undefined;
99
- }
100
- export interface CheckPolicyResponse {
101
- isPermitted?: boolean | undefined;
102
- consistencyToken?: ConsistencyToken | undefined;
103
- }
104
- export interface ConsistencyToken {
105
- value?: string | undefined;
77
+ interface Actor {
78
+ kind?: {
79
+ $case: 'actorId';
80
+ actorId: bigint;
81
+ } | undefined;
82
+ }
83
+ interface CheckPolicyRequest {
84
+ actor?: Actor | undefined;
85
+ permission?: string | undefined;
86
+ /**
87
+ * Ex: (servicePrincipal/use, accounts/<account-id>/servicePrincipals/<sp-id>)
88
+ * Ex: (servicePrincipal.ruleSet/update, accounts/<account-id>/servicePrincipals/<sp-id>/ruleSets/default)
89
+ */
90
+ resource?: string | undefined;
91
+ consistencyToken?: ConsistencyToken | undefined;
92
+ authzIdentity?: RequestAuthzIdentity | undefined;
93
+ resourceInfo?: ResourceInfo | undefined;
94
+ }
95
+ interface CheckPolicyResponse {
96
+ isPermitted?: boolean | undefined;
97
+ consistencyToken?: ConsistencyToken | undefined;
98
+ }
99
+ interface ConsistencyToken {
100
+ value?: string | undefined;
106
101
  }
107
102
  /** Removes all permission assignments for a workspace given a principal. */
108
- export interface DeleteWorkspacePermissionAssignmentRequest {
109
- /** The account ID. */
110
- accountId?: string | undefined;
111
- /** The workspace ID for the account. */
112
- workspaceId?: bigint | undefined;
113
- /** The ID of the user, service principal, or group. */
114
- principalId?: bigint | undefined;
115
- }
116
- export interface DeleteWorkspacePermissionAssignmentResponse {
117
- }
118
- export interface GetObjectPermissionsRequest {
119
- /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
120
- requestObjectType?: string | undefined;
121
- /** The id of the request object. */
122
- requestObjectId?: string | undefined;
123
- }
124
- export interface GetRuleSetRequest {
125
- /** <Databricks> account ID. */
126
- accountId?: string | undefined;
127
- /**
128
- * The ruleset name associated with the request.
129
- *
130
- * Examples | Summary
131
- * :--- | :---
132
- * `name=accounts/<ACCOUNT_ID>/ruleSets/default` | A name for a rule set on the account.
133
- * `name=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>/ruleSets/default` | A name for a rule set on the group.
134
- * `name=accounts/<ACCOUNT_ID>/servicePrincipals/<SERVICE_PRINCIPAL_APPLICATION_ID>/ruleSets/default` | A name for a rule set on the service principal.
135
- * `name=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>/ruleSets/default` | A name for a rule set on the tag policy.
136
- */
137
- name?: string | undefined;
138
- /**
139
- * Etag used for versioning. The response is at least as fresh as the eTag provided. Etag is used for optimistic
140
- * concurrency control as a way to help prevent simultaneous updates of a rule set from overwriting each other. It is
141
- * strongly suggested that systems make use of the etag in the read -> modify -> write pattern to perform rule set
142
- * updates in order to avoid race conditions that is get an etag from a GET rule set request, and pass it with the
143
- * PUT update request to identify the rule set version you are updating.
144
- *
145
- * Examples | Summary
146
- * :--- | :---
147
- * `etag=` | An empty etag can only be used in GET to indicate no freshness requirements.
148
- * `etag=RENUAAABhSweA4NvVmmUYdiU717H3Tgy0UJdor3gE4a+mq/oj9NjAf8ZsQ==` | An etag encoded a specific version of the rule set to get or to be updated.
149
- */
150
- etag?: string | undefined;
151
- }
152
- export interface GrantRule {
153
- /**
154
- * Principals this grant rule applies to.
155
- * A principal can be a user (for end users), a service principal (for applications and
156
- * compute workloads), or an account group. Each principal has its own identifier format:
157
- * * users/<USERNAME>
158
- * * groups/<GROUP_NAME>
159
- * * servicePrincipals/<SERVICE_PRINCIPAL_APPLICATION_ID>
160
- */
161
- principals?: string[] | undefined;
162
- /** Role that is assigned to the list of principals. */
163
- role?: string | undefined;
164
- }
165
- export interface ListAssignableRolesForResourceRequest {
166
- /** <Databricks> account ID. */
167
- accountId?: string | undefined;
168
- /**
169
- * The resource name for which assignable roles will be listed.
170
- *
171
- * Examples | Summary
172
- * :--- | :---
173
- * `resource=accounts/<ACCOUNT_ID>` | A resource name for the account.
174
- * `resource=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>` | A resource name for the group.
175
- * `resource=accounts/<ACCOUNT_ID>/servicePrincipals/<SP_ID>` | A resource name for the service principal.
176
- * `resource=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>` | A resource name for the tag policy.
177
- */
178
- resource?: string | undefined;
179
- }
180
- export interface ListAssignableRolesForResourceResponse {
181
- roles?: Role[] | undefined;
182
- }
183
- export interface ListPermissionLevelsRequest {
184
- /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
185
- requestObjectType?: string | undefined;
186
- requestObjectId?: string | undefined;
187
- }
188
- export interface ListPermissionLevelsResponse {
189
- /** Specific permission levels */
190
- permissionLevels?: PermissionsDescription[] | undefined;
103
+ interface DeleteWorkspacePermissionAssignmentRequest {
104
+ /** The account ID. */
105
+ accountId?: string | undefined;
106
+ /** The workspace ID for the account. */
107
+ workspaceId?: bigint | undefined;
108
+ /** The ID of the user, service principal, or group. */
109
+ principalId?: bigint | undefined;
110
+ }
111
+ interface DeleteWorkspacePermissionAssignmentResponse {}
112
+ interface GetObjectPermissionsRequest {
113
+ /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
114
+ requestObjectType?: string | undefined;
115
+ /** The id of the request object. */
116
+ requestObjectId?: string | undefined;
117
+ }
118
+ interface GetRuleSetRequest {
119
+ /** <Databricks> account ID. */
120
+ accountId?: string | undefined;
121
+ /**
122
+ * The ruleset name associated with the request.
123
+ *
124
+ * Examples | Summary
125
+ * :--- | :---
126
+ * `name=accounts/<ACCOUNT_ID>/ruleSets/default` | A name for a rule set on the account.
127
+ * `name=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>/ruleSets/default` | A name for a rule set on the group.
128
+ * `name=accounts/<ACCOUNT_ID>/servicePrincipals/<SERVICE_PRINCIPAL_APPLICATION_ID>/ruleSets/default` | A name for a rule set on the service principal.
129
+ * `name=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>/ruleSets/default` | A name for a rule set on the tag policy.
130
+ */
131
+ name?: string | undefined;
132
+ /**
133
+ * Etag used for versioning. The response is at least as fresh as the eTag provided. Etag is used for optimistic
134
+ * concurrency control as a way to help prevent simultaneous updates of a rule set from overwriting each other. It is
135
+ * strongly suggested that systems make use of the etag in the read -> modify -> write pattern to perform rule set
136
+ * updates in order to avoid race conditions that is get an etag from a GET rule set request, and pass it with the
137
+ * PUT update request to identify the rule set version you are updating.
138
+ *
139
+ * Examples | Summary
140
+ * :--- | :---
141
+ * `etag=` | An empty etag can only be used in GET to indicate no freshness requirements.
142
+ * `etag=RENUAAABhSweA4NvVmmUYdiU717H3Tgy0UJdor3gE4a+mq/oj9NjAf8ZsQ==` | An etag encoded a specific version of the rule set to get or to be updated.
143
+ */
144
+ etag?: string | undefined;
145
+ }
146
+ interface GrantRule {
147
+ /**
148
+ * Principals this grant rule applies to.
149
+ * A principal can be a user (for end users), a service principal (for applications and
150
+ * compute workloads), or an account group. Each principal has its own identifier format:
151
+ * * users/<USERNAME>
152
+ * * groups/<GROUP_NAME>
153
+ * * servicePrincipals/<SERVICE_PRINCIPAL_APPLICATION_ID>
154
+ */
155
+ principals?: string[] | undefined;
156
+ /** Role that is assigned to the list of principals. */
157
+ role?: string | undefined;
158
+ }
159
+ interface ListAssignableRolesForResourceRequest {
160
+ /** <Databricks> account ID. */
161
+ accountId?: string | undefined;
162
+ /**
163
+ * The resource name for which assignable roles will be listed.
164
+ *
165
+ * Examples | Summary
166
+ * :--- | :---
167
+ * `resource=accounts/<ACCOUNT_ID>` | A resource name for the account.
168
+ * `resource=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>` | A resource name for the group.
169
+ * `resource=accounts/<ACCOUNT_ID>/servicePrincipals/<SP_ID>` | A resource name for the service principal.
170
+ * `resource=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>` | A resource name for the tag policy.
171
+ */
172
+ resource?: string | undefined;
173
+ }
174
+ interface ListAssignableRolesForResourceResponse {
175
+ roles?: Role[] | undefined;
176
+ }
177
+ interface ListPermissionLevelsRequest {
178
+ /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
179
+ requestObjectType?: string | undefined;
180
+ requestObjectId?: string | undefined;
181
+ }
182
+ interface ListPermissionLevelsResponse {
183
+ /** Specific permission levels */
184
+ permissionLevels?: PermissionsDescription[] | undefined;
191
185
  }
192
186
  /** Gets all the permission assignments for a workspace, given an account and a workspace. */
193
- export interface ListWorkspacePermissionAssignmentsRequest {
194
- /** The account ID. */
195
- accountId?: string | undefined;
196
- /** The workspace ID for the account. */
197
- workspaceId?: bigint | undefined;
187
+ interface ListWorkspacePermissionAssignmentsRequest {
188
+ /** The account ID. */
189
+ accountId?: string | undefined;
190
+ /** The workspace ID for the account. */
191
+ workspaceId?: bigint | undefined;
198
192
  }
199
- export interface ListWorkspacePermissionAssignmentsResponse {
200
- /** Array of permissions assignments defined for a workspace. */
201
- permissionAssignments?: WorkspacePermissionAssignmentOutput[] | undefined;
193
+ interface ListWorkspacePermissionAssignmentsResponse {
194
+ /** Array of permissions assignments defined for a workspace. */
195
+ permissionAssignments?: WorkspacePermissionAssignmentOutput[] | undefined;
202
196
  }
203
197
  /** List permissions for a workspace, given an account and a workspace. */
204
- export interface ListWorkspacePermissionsRequest {
205
- /** The account ID. */
206
- accountId?: string | undefined;
207
- /** The workspace ID. */
208
- workspaceId?: bigint | undefined;
209
- }
210
- export interface ListWorkspacePermissionsResponse {
211
- /** Array of permissions defined for a workspace. */
212
- permissions?: PermissionOutput[] | undefined;
213
- }
214
- export interface Permission {
215
- permissionLevel?: PermissionLevel | undefined;
216
- inherited?: boolean | undefined;
217
- inheritedFromObject?: string[] | undefined;
218
- }
219
- export interface PermissionOutput {
220
- permissionLevel?: WorkspacePermission | undefined;
221
- /** The results of a permissions query. */
222
- description?: string | undefined;
223
- }
224
- export interface PermissionsDescription {
225
- permissionLevel?: PermissionLevel | undefined;
226
- description?: string | undefined;
227
- }
228
- export interface PermissionsResponse {
229
- objectId?: string | undefined;
230
- objectType?: string | undefined;
231
- accessControlList?: AccessControlResponse[] | undefined;
198
+ interface ListWorkspacePermissionsRequest {
199
+ /** The account ID. */
200
+ accountId?: string | undefined;
201
+ /** The workspace ID. */
202
+ workspaceId?: bigint | undefined;
203
+ }
204
+ interface ListWorkspacePermissionsResponse {
205
+ /** Array of permissions defined for a workspace. */
206
+ permissions?: PermissionOutput[] | undefined;
207
+ }
208
+ interface Permission {
209
+ permissionLevel?: PermissionLevel | undefined;
210
+ inherited?: boolean | undefined;
211
+ inheritedFromObject?: string[] | undefined;
212
+ }
213
+ interface PermissionOutput {
214
+ permissionLevel?: WorkspacePermission | undefined;
215
+ /** The results of a permissions query. */
216
+ description?: string | undefined;
217
+ }
218
+ interface PermissionsDescription {
219
+ permissionLevel?: PermissionLevel | undefined;
220
+ description?: string | undefined;
221
+ }
222
+ interface PermissionsResponse {
223
+ objectId?: string | undefined;
224
+ objectType?: string | undefined;
225
+ accessControlList?: AccessControlResponse[] | undefined;
232
226
  }
233
227
  /** Information about the principal assigned to the workspace. */
234
- export interface PrincipalOutput {
235
- principalName?: {
236
- $case: 'userName';
237
- /** The username of the user. Present only if the principal is a user. */
238
- userName: string;
239
- } | {
240
- $case: 'groupName';
241
- /** The group name of the group. Present only if the principal is a group. */
242
- groupName: string;
243
- } | {
244
- $case: 'servicePrincipalName';
245
- /** The name of the service principal. Present only if the principal is a service principal. */
246
- servicePrincipalName: string;
247
- } | undefined;
248
- /** The unique, opaque id of the principal. */
249
- principalId?: bigint | undefined;
250
- /** The display name of the principal. */
251
- displayName?: string | undefined;
252
- }
253
- export interface ResourceInfo {
254
- /** Id of the current resource. */
255
- id?: string | undefined;
256
- /** Parent resource info for the current resource. The parent may have another parent. */
257
- parentResourceInfo?: ResourceInfo | undefined;
258
- /** The legacy acl path of the current resource. */
259
- legacyAclPath?: string | undefined;
260
- }
261
- export interface Role {
262
- /** Role to assign to a principal or a list of principals on a resource. */
263
- name?: string | undefined;
264
- }
265
- export interface RuleSet {
266
- /** Name of the rule set. */
267
- name?: string | undefined;
268
- /**
269
- * Identifies the version of the rule set returned.
270
- * Etag used for versioning. The response is at least as fresh as the eTag provided.
271
- * Etag is used for optimistic concurrency control as a way to help prevent simultaneous
272
- * updates of a rule set from overwriting each other. It is strongly suggested that systems
273
- * make use of the etag in the read -> modify -> write pattern to perform rule set updates in
274
- * order to avoid race conditions that is get an etag from a GET rule set request, and pass it
275
- * with the PUT update request to identify the rule set version you are updating.
276
- */
277
- etag?: string | undefined;
278
- grantRules?: GrantRule[] | undefined;
279
- }
280
- export interface RuleSetUpdateRequest {
281
- /** Name of the rule set. */
282
- name?: string | undefined;
283
- /**
284
- * Identifies the version of the rule set returned.
285
- * Etag used for versioning. The response is at least as fresh as the eTag provided.
286
- * Etag is used for optimistic concurrency control as a way to help prevent simultaneous
287
- * updates of a rule set from overwriting each other. It is strongly suggested that systems
288
- * make use of the etag in the read -> modify -> write pattern to perform rule set updates in
289
- * order to avoid race conditions that is get an etag from a GET rule set request, and pass it
290
- * with the PUT update request to identify the rule set version you are updating.
291
- */
292
- etag?: string | undefined;
293
- grantRules?: GrantRule[] | undefined;
294
- }
295
- export interface SetObjectPermissionsRequest {
296
- /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
297
- requestObjectType?: string | undefined;
298
- /** The id of the request object. */
299
- requestObjectId?: string | undefined;
300
- accessControlList?: AccessControlRequest[] | undefined;
301
- }
302
- export interface UpdateObjectPermissionsRequest {
303
- /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
304
- requestObjectType?: string | undefined;
305
- /** The id of the request object. */
306
- requestObjectId?: string | undefined;
307
- accessControlList?: AccessControlRequest[] | undefined;
308
- }
309
- export interface UpdateRuleSetRequest {
310
- /** <Databricks> account ID. */
311
- accountId?: string | undefined;
312
- /** Name of the rule set. */
313
- name?: string | undefined;
314
- ruleSet?: RuleSetUpdateRequest | undefined;
315
- }
316
- export interface UpdateWorkspacePermissionAssignmentRequest {
317
- /** The account ID. */
318
- accountId?: string | undefined;
319
- /** The workspace ID. */
320
- workspaceId?: bigint | undefined;
321
- /** The ID of the user, service principal, or group. */
322
- principalId?: bigint | undefined;
323
- /**
324
- * Array of permissions assignments to update on the workspace.
325
- * Valid values are "USER" and "ADMIN" (case-sensitive).
326
- * If both "USER" and "ADMIN" are provided, "ADMIN" takes precedence.
327
- * Other values will be ignored.
328
- * Note that excluding this field, or providing unsupported values, will have the same effect as providing an empty list, which will result in the deletion of all permissions for the principal.
329
- */
330
- permissions?: WorkspacePermission[] | undefined;
228
+ interface PrincipalOutput {
229
+ principalName?: {
230
+ $case: 'userName'; /** The username of the user. Present only if the principal is a user. */
231
+ userName: string;
232
+ } | {
233
+ $case: 'groupName'; /** The group name of the group. Present only if the principal is a group. */
234
+ groupName: string;
235
+ } | {
236
+ $case: 'servicePrincipalName'; /** The name of the service principal. Present only if the principal is a service principal. */
237
+ servicePrincipalName: string;
238
+ } | undefined;
239
+ /** The unique, opaque id of the principal. */
240
+ principalId?: bigint | undefined;
241
+ /** The display name of the principal. */
242
+ displayName?: string | undefined;
243
+ }
244
+ interface ResourceInfo {
245
+ /** Id of the current resource. */
246
+ id?: string | undefined;
247
+ /** Parent resource info for the current resource. The parent may have another parent. */
248
+ parentResourceInfo?: ResourceInfo | undefined;
249
+ /** The legacy acl path of the current resource. */
250
+ legacyAclPath?: string | undefined;
251
+ }
252
+ interface Role {
253
+ /** Role to assign to a principal or a list of principals on a resource. */
254
+ name?: string | undefined;
255
+ }
256
+ interface RuleSet {
257
+ /** Name of the rule set. */
258
+ name?: string | undefined;
259
+ /**
260
+ * Identifies the version of the rule set returned.
261
+ * Etag used for versioning. The response is at least as fresh as the eTag provided.
262
+ * Etag is used for optimistic concurrency control as a way to help prevent simultaneous
263
+ * updates of a rule set from overwriting each other. It is strongly suggested that systems
264
+ * make use of the etag in the read -> modify -> write pattern to perform rule set updates in
265
+ * order to avoid race conditions that is get an etag from a GET rule set request, and pass it
266
+ * with the PUT update request to identify the rule set version you are updating.
267
+ */
268
+ etag?: string | undefined;
269
+ grantRules?: GrantRule[] | undefined;
270
+ }
271
+ interface RuleSetUpdateRequest {
272
+ /** Name of the rule set. */
273
+ name?: string | undefined;
274
+ /**
275
+ * Identifies the version of the rule set returned.
276
+ * Etag used for versioning. The response is at least as fresh as the eTag provided.
277
+ * Etag is used for optimistic concurrency control as a way to help prevent simultaneous
278
+ * updates of a rule set from overwriting each other. It is strongly suggested that systems
279
+ * make use of the etag in the read -> modify -> write pattern to perform rule set updates in
280
+ * order to avoid race conditions that is get an etag from a GET rule set request, and pass it
281
+ * with the PUT update request to identify the rule set version you are updating.
282
+ */
283
+ etag?: string | undefined;
284
+ grantRules?: GrantRule[] | undefined;
285
+ }
286
+ interface SetObjectPermissionsRequest {
287
+ /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
288
+ requestObjectType?: string | undefined;
289
+ /** The id of the request object. */
290
+ requestObjectId?: string | undefined;
291
+ accessControlList?: AccessControlRequest[] | undefined;
292
+ }
293
+ interface UpdateObjectPermissionsRequest {
294
+ /** The type of the request object. Can be one of the following: alerts, alertsv2, authorization, clusters, cluster-policies, dashboards, database-projects, dbsql-dashboards, directories, experiments, files, genie, instance-pools, jobs, knowledge-assistants, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. */
295
+ requestObjectType?: string | undefined;
296
+ /** The id of the request object. */
297
+ requestObjectId?: string | undefined;
298
+ accessControlList?: AccessControlRequest[] | undefined;
299
+ }
300
+ interface UpdateRuleSetRequest {
301
+ /** <Databricks> account ID. */
302
+ accountId?: string | undefined;
303
+ /** Name of the rule set. */
304
+ name?: string | undefined;
305
+ ruleSet?: RuleSetUpdateRequest | undefined;
306
+ }
307
+ interface UpdateWorkspacePermissionAssignmentRequest {
308
+ /** The account ID. */
309
+ accountId?: string | undefined;
310
+ /** The workspace ID. */
311
+ workspaceId?: bigint | undefined;
312
+ /** The ID of the user, service principal, or group. */
313
+ principalId?: bigint | undefined;
314
+ /**
315
+ * Array of permissions assignments to update on the workspace.
316
+ * Valid values are "USER" and "ADMIN" (case-sensitive).
317
+ * If both "USER" and "ADMIN" are provided, "ADMIN" takes precedence.
318
+ * Other values will be ignored.
319
+ * Note that excluding this field, or providing unsupported values, will have the same effect as providing an empty list, which will result in the deletion of all permissions for the principal.
320
+ */
321
+ permissions?: WorkspacePermission[] | undefined;
331
322
  }
332
323
  /**
333
324
  * The output format for existing workspace PermissionAssignment records, which contains some info for
334
325
  * user consumption.
335
326
  */
336
- export interface WorkspacePermissionAssignmentOutput {
337
- /** Information about the principal assigned to the workspace. */
338
- principal?: PrincipalOutput | undefined;
339
- /** The permissions level of the principal. */
340
- permissions?: WorkspacePermission[] | undefined;
341
- /** Error response associated with a workspace permission assignment, if any. */
342
- error?: string | undefined;
343
- }
344
- export declare const unmarshalAccessControlResponseSchema: z.ZodType<AccessControlResponse>;
345
- export declare const unmarshalCheckPolicyResponseSchema: z.ZodType<CheckPolicyResponse>;
346
- export declare const unmarshalConsistencyTokenSchema: z.ZodType<ConsistencyToken>;
347
- export declare const unmarshalDeleteWorkspacePermissionAssignmentResponseSchema: z.ZodType<DeleteWorkspacePermissionAssignmentResponse>;
348
- export declare const unmarshalGrantRuleSchema: z.ZodType<GrantRule>;
349
- export declare const unmarshalListAssignableRolesForResourceResponseSchema: z.ZodType<ListAssignableRolesForResourceResponse>;
350
- export declare const unmarshalListPermissionLevelsResponseSchema: z.ZodType<ListPermissionLevelsResponse>;
351
- export declare const unmarshalListWorkspacePermissionAssignmentsResponseSchema: z.ZodType<ListWorkspacePermissionAssignmentsResponse>;
352
- export declare const unmarshalListWorkspacePermissionsResponseSchema: z.ZodType<ListWorkspacePermissionsResponse>;
353
- export declare const unmarshalPermissionSchema: z.ZodType<Permission>;
354
- export declare const unmarshalPermissionOutputSchema: z.ZodType<PermissionOutput>;
355
- export declare const unmarshalPermissionsDescriptionSchema: z.ZodType<PermissionsDescription>;
356
- export declare const unmarshalPermissionsResponseSchema: z.ZodType<PermissionsResponse>;
357
- export declare const unmarshalPrincipalOutputSchema: z.ZodType<PrincipalOutput>;
358
- export declare const unmarshalRoleSchema: z.ZodType<Role>;
359
- export declare const unmarshalRuleSetSchema: z.ZodType<RuleSet>;
360
- export declare const unmarshalWorkspacePermissionAssignmentOutputSchema: z.ZodType<WorkspacePermissionAssignmentOutput>;
361
- export declare const marshalAccessControlRequestSchema: z.ZodType;
362
- export declare const marshalActorSchema: z.ZodType;
363
- export declare const marshalConsistencyTokenSchema: z.ZodType;
364
- export declare const marshalGrantRuleSchema: z.ZodType;
365
- export declare const marshalResourceInfoSchema: z.ZodType;
366
- export declare const marshalRuleSetUpdateRequestSchema: z.ZodType;
367
- export declare const marshalSetObjectPermissionsRequestSchema: z.ZodType;
368
- export declare const marshalUpdateObjectPermissionsRequestSchema: z.ZodType;
369
- export declare const marshalUpdateRuleSetRequestSchema: z.ZodType;
370
- export declare const marshalUpdateWorkspacePermissionAssignmentRequestSchema: z.ZodType;
327
+ interface WorkspacePermissionAssignmentOutput {
328
+ /** Information about the principal assigned to the workspace. */
329
+ principal?: PrincipalOutput | undefined;
330
+ /** The permissions level of the principal. */
331
+ permissions?: WorkspacePermission[] | undefined;
332
+ /** Error response associated with a workspace permission assignment, if any. */
333
+ error?: string | undefined;
334
+ }
335
+ declare const unmarshalAccessControlResponseSchema: z.ZodType<AccessControlResponse>;
336
+ declare const unmarshalCheckPolicyResponseSchema: z.ZodType<CheckPolicyResponse>;
337
+ declare const unmarshalConsistencyTokenSchema: z.ZodType<ConsistencyToken>;
338
+ declare const unmarshalDeleteWorkspacePermissionAssignmentResponseSchema: z.ZodType<DeleteWorkspacePermissionAssignmentResponse>;
339
+ declare const unmarshalGrantRuleSchema: z.ZodType<GrantRule>;
340
+ declare const unmarshalListAssignableRolesForResourceResponseSchema: z.ZodType<ListAssignableRolesForResourceResponse>;
341
+ declare const unmarshalListPermissionLevelsResponseSchema: z.ZodType<ListPermissionLevelsResponse>;
342
+ declare const unmarshalListWorkspacePermissionAssignmentsResponseSchema: z.ZodType<ListWorkspacePermissionAssignmentsResponse>;
343
+ declare const unmarshalListWorkspacePermissionsResponseSchema: z.ZodType<ListWorkspacePermissionsResponse>;
344
+ declare const unmarshalPermissionSchema: z.ZodType<Permission>;
345
+ declare const unmarshalPermissionOutputSchema: z.ZodType<PermissionOutput>;
346
+ declare const unmarshalPermissionsDescriptionSchema: z.ZodType<PermissionsDescription>;
347
+ declare const unmarshalPermissionsResponseSchema: z.ZodType<PermissionsResponse>;
348
+ declare const unmarshalPrincipalOutputSchema: z.ZodType<PrincipalOutput>;
349
+ declare const unmarshalRoleSchema: z.ZodType<Role>;
350
+ declare const unmarshalRuleSetSchema: z.ZodType<RuleSet>;
351
+ declare const unmarshalWorkspacePermissionAssignmentOutputSchema: z.ZodType<WorkspacePermissionAssignmentOutput>;
352
+ declare const marshalAccessControlRequestSchema: z.ZodType;
353
+ declare const marshalActorSchema: z.ZodType;
354
+ declare const marshalConsistencyTokenSchema: z.ZodType;
355
+ declare const marshalGrantRuleSchema: z.ZodType;
356
+ declare const marshalResourceInfoSchema: z.ZodType;
357
+ declare const marshalRuleSetUpdateRequestSchema: z.ZodType;
358
+ declare const marshalSetObjectPermissionsRequestSchema: z.ZodType;
359
+ declare const marshalUpdateObjectPermissionsRequestSchema: z.ZodType;
360
+ declare const marshalUpdateRuleSetRequestSchema: z.ZodType;
361
+ declare const marshalUpdateWorkspacePermissionAssignmentRequestSchema: z.ZodType;
362
+ //#endregion
363
+ export { AccessControlRequest, AccessControlResponse, Actor, CheckPolicyRequest, CheckPolicyResponse, ConsistencyToken, DeleteWorkspacePermissionAssignmentRequest, DeleteWorkspacePermissionAssignmentResponse, GetObjectPermissionsRequest, GetRuleSetRequest, GrantRule, ListAssignableRolesForResourceRequest, ListAssignableRolesForResourceResponse, ListPermissionLevelsRequest, ListPermissionLevelsResponse, ListWorkspacePermissionAssignmentsRequest, ListWorkspacePermissionAssignmentsResponse, ListWorkspacePermissionsRequest, ListWorkspacePermissionsResponse, Permission, PermissionLevel, PermissionOutput, PermissionsDescription, PermissionsResponse, PrincipalOutput, RequestAuthzIdentity, ResourceInfo, Role, RuleSet, RuleSetUpdateRequest, SetObjectPermissionsRequest, UpdateObjectPermissionsRequest, UpdateRuleSetRequest, UpdateWorkspacePermissionAssignmentRequest, WorkspacePermission, WorkspacePermissionAssignmentOutput, marshalAccessControlRequestSchema, marshalActorSchema, marshalConsistencyTokenSchema, marshalGrantRuleSchema, marshalResourceInfoSchema, marshalRuleSetUpdateRequestSchema, marshalSetObjectPermissionsRequestSchema, marshalUpdateObjectPermissionsRequestSchema, marshalUpdateRuleSetRequestSchema, marshalUpdateWorkspacePermissionAssignmentRequestSchema, unmarshalAccessControlResponseSchema, unmarshalCheckPolicyResponseSchema, unmarshalConsistencyTokenSchema, unmarshalDeleteWorkspacePermissionAssignmentResponseSchema, unmarshalGrantRuleSchema, unmarshalListAssignableRolesForResourceResponseSchema, unmarshalListPermissionLevelsResponseSchema, unmarshalListWorkspacePermissionAssignmentsResponseSchema, unmarshalListWorkspacePermissionsResponseSchema, unmarshalPermissionOutputSchema, unmarshalPermissionSchema, unmarshalPermissionsDescriptionSchema, unmarshalPermissionsResponseSchema, unmarshalPrincipalOutputSchema, unmarshalRoleSchema, unmarshalRuleSetSchema, unmarshalWorkspacePermissionAssignmentOutputSchema };
371
364
  //# sourceMappingURL=model.d.ts.map