@databricks/sdk-uc-rfa 0.0.0-dev → 0.1.0-dev.1
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 +203 -0
- package/dist/v1/client.d.ts +42 -0
- package/dist/v1/client.d.ts.map +1 -0
- package/dist/v1/client.js +145 -0
- package/dist/v1/client.js.map +1 -0
- package/dist/v1/index.d.ts +5 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +5 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/model.d.ts +184 -0
- package/dist/v1/model.d.ts.map +1 -0
- package/dist/v1/model.js +223 -0
- package/dist/v1/model.js.map +1 -0
- package/dist/v1/transport.d.ts +5 -0
- package/dist/v1/transport.d.ts.map +1 -0
- package/dist/v1/transport.js +57 -0
- package/dist/v1/transport.js.map +1 -0
- package/dist/v1/utils.d.ts +22 -0
- package/dist/v1/utils.d.ts.map +1 -0
- package/dist/v1/utils.js +113 -0
- package/dist/v1/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v1/client.ts +198 -0
- package/src/v1/index.ts +26 -0
- package/src/v1/model.ts +384 -0
- package/src/v1/transport.ts +73 -0
- package/src/v1/utils.ts +156 -0
- package/README.md +0 -1
- package/index.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Copyright 2026 Databricks, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CallOptions } from '@databricks/sdk-options/call';
|
|
2
|
+
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
+
import type { AccessRequestDestinations, BatchCreateAccessRequestsRequest, BatchCreateAccessRequestsResponse, GetAccessRequestDestinationsRequest, UpdateAccessRequestDestinationsRequest } from './model';
|
|
4
|
+
export declare class RfaClient {
|
|
5
|
+
private readonly host;
|
|
6
|
+
private readonly workspaceId;
|
|
7
|
+
private readonly httpClient;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
private readonly userAgent;
|
|
10
|
+
constructor(options: ClientOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Creates access requests for Unity Catalog permissions for a specified principal on a securable object.
|
|
13
|
+
* This Batch API can take in multiple principals, securable objects,
|
|
14
|
+
* and permissions as the input and returns the access request destinations for each.
|
|
15
|
+
* Principals must be unique across the API call.
|
|
16
|
+
*
|
|
17
|
+
* The supported securable types are: "metastore", "catalog", "schema", "table",
|
|
18
|
+
* "external_location", "connection", "credential", "function", "registered_model", and "volume".
|
|
19
|
+
*/
|
|
20
|
+
batchCreateAccessRequests(req: BatchCreateAccessRequestsRequest, options?: CallOptions): Promise<BatchCreateAccessRequestsResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Gets an array of access request destinations for the specified securable.
|
|
23
|
+
* Any caller can see URL destinations or the destinations on the metastore.
|
|
24
|
+
* Otherwise, only those with **BROWSE** permissions on the securable can see destinations.
|
|
25
|
+
*
|
|
26
|
+
* The supported securable types are: "metastore", "catalog", "schema", "table",
|
|
27
|
+
* "external_location", "connection", "credential", "function", "registered_model", and "volume".
|
|
28
|
+
*/
|
|
29
|
+
getAccessRequestDestinations(req: GetAccessRequestDestinationsRequest, options?: CallOptions): Promise<AccessRequestDestinations>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates the access request destinations for the given securable.
|
|
32
|
+
* The caller must be a metastore admin, the owner of the securable, or a user that has the **MANAGE** privilege on the securable in order to assign destinations.
|
|
33
|
+
* Destinations cannot be updated for securables underneath schemas (tables, volumes, functions, and models). For these securable types, destinations are inherited from the parent securable.
|
|
34
|
+
* A maximum of 5 emails and 5 external notification destinations (Slack, Microsoft Teams, and Generic Webhook destinations) can be assigned to a securable.
|
|
35
|
+
* If a URL destination is assigned, no other destinations can be set.
|
|
36
|
+
*
|
|
37
|
+
* The supported securable types are: "metastore", "catalog", "schema", "table",
|
|
38
|
+
* "external_location", "connection", "credential", "function", "registered_model", and "volume".
|
|
39
|
+
*/
|
|
40
|
+
updateAccessRequestDestinations(req: UpdateAccessRequestDestinationsRequest, options?: CallOptions): Promise<AccessRequestDestinations>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAWlE,OAAO,KAAK,EACV,yBAAyB,EACzB,gCAAgC,EAChC,iCAAiC,EACjC,mCAAmC,EACnC,sCAAsC,EACvC,MAAM,SAAS,CAAC;AAcjB,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAI9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,aAAa;IAelC;;;;;;;;OAQG;IACG,yBAAyB,CAC7B,GAAG,EAAE,gCAAgC,EACrC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,iCAAiC,CAAC;IA+B7C;;;;;;;OAOG;IACG,4BAA4B,CAChC,GAAG,EAAE,mCAAmC,EACxC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,yBAAyB,CAAC;IAwBrC;;;;;;;;;OASG;IACG,+BAA+B,CACnC,GAAG,EAAE,sCAAsC,EAC3C,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,yBAAyB,CAAC;CAuCtC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { VERSION as AUTH_VERSION } from '@databricks/sdk-auth';
|
|
3
|
+
import { createDefault } from '@databricks/sdk-core/clientinfo';
|
|
4
|
+
import { NoOpLogger } from '@databricks/sdk-core/logger';
|
|
5
|
+
import { newHttpClient } from './transport';
|
|
6
|
+
import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse, } from './utils';
|
|
7
|
+
import pkgJson from '../../package.json' with { type: 'json' };
|
|
8
|
+
import { marshalAccessRequestDestinationsSchema, marshalBatchCreateAccessRequestsRequestSchema, unmarshalAccessRequestDestinationsSchema, unmarshalBatchCreateAccessRequestsResponseSchema, } from './model';
|
|
9
|
+
// Package identity segment for this client to be used in the User-Agent header.
|
|
10
|
+
const PACKAGE_SEGMENT = {
|
|
11
|
+
key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
|
|
12
|
+
value: pkgJson.version,
|
|
13
|
+
};
|
|
14
|
+
export class RfaClient {
|
|
15
|
+
host;
|
|
16
|
+
// Workspace ID used to route workspace-level calls on unified hosts (SPOG).
|
|
17
|
+
// When set, workspace-level methods send X-Databricks-Org-Id on every
|
|
18
|
+
// request.
|
|
19
|
+
workspaceId;
|
|
20
|
+
httpClient;
|
|
21
|
+
logger;
|
|
22
|
+
// User-Agent header value. Composed once at construction from
|
|
23
|
+
// createDefault() merged with this package's identity and the active
|
|
24
|
+
// credential's name.
|
|
25
|
+
userAgent;
|
|
26
|
+
constructor(options) {
|
|
27
|
+
if (options.host === undefined) {
|
|
28
|
+
throw new Error('Host is required.');
|
|
29
|
+
}
|
|
30
|
+
this.host = options.host.replace(/\/$/, '');
|
|
31
|
+
this.workspaceId = options.workspaceId;
|
|
32
|
+
this.logger = options.logger ?? new NoOpLogger();
|
|
33
|
+
const info = createDefault()
|
|
34
|
+
.with(PACKAGE_SEGMENT)
|
|
35
|
+
.with({ key: 'sdk-js-auth', value: AUTH_VERSION })
|
|
36
|
+
.with({ key: 'auth', value: options.credentials?.name() ?? 'default' });
|
|
37
|
+
this.userAgent = info.toString();
|
|
38
|
+
this.httpClient = newHttpClient(options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates access requests for Unity Catalog permissions for a specified principal on a securable object.
|
|
42
|
+
* This Batch API can take in multiple principals, securable objects,
|
|
43
|
+
* and permissions as the input and returns the access request destinations for each.
|
|
44
|
+
* Principals must be unique across the API call.
|
|
45
|
+
*
|
|
46
|
+
* The supported securable types are: "metastore", "catalog", "schema", "table",
|
|
47
|
+
* "external_location", "connection", "credential", "function", "registered_model", and "volume".
|
|
48
|
+
*/
|
|
49
|
+
async batchCreateAccessRequests(req, options) {
|
|
50
|
+
const url = `${this.host}/api/3.0/rfa/requests`;
|
|
51
|
+
const body = marshalRequest(req, marshalBatchCreateAccessRequestsRequestSchema);
|
|
52
|
+
let resp;
|
|
53
|
+
const call = async (callSignal) => {
|
|
54
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
55
|
+
if (this.workspaceId !== undefined) {
|
|
56
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
57
|
+
}
|
|
58
|
+
headers.set('User-Agent', this.userAgent);
|
|
59
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
60
|
+
const respBody = await executeHttpCall({
|
|
61
|
+
request: httpReq,
|
|
62
|
+
httpClient: this.httpClient,
|
|
63
|
+
logger: this.logger,
|
|
64
|
+
});
|
|
65
|
+
resp = parseResponse(respBody, unmarshalBatchCreateAccessRequestsResponseSchema);
|
|
66
|
+
};
|
|
67
|
+
await executeCall(call, options);
|
|
68
|
+
if (resp === undefined) {
|
|
69
|
+
throw new Error('API call completed without a result.');
|
|
70
|
+
}
|
|
71
|
+
return resp;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets an array of access request destinations for the specified securable.
|
|
75
|
+
* Any caller can see URL destinations or the destinations on the metastore.
|
|
76
|
+
* Otherwise, only those with **BROWSE** permissions on the securable can see destinations.
|
|
77
|
+
*
|
|
78
|
+
* The supported securable types are: "metastore", "catalog", "schema", "table",
|
|
79
|
+
* "external_location", "connection", "credential", "function", "registered_model", and "volume".
|
|
80
|
+
*/
|
|
81
|
+
async getAccessRequestDestinations(req, options) {
|
|
82
|
+
const url = `${this.host}/api/3.0/rfa/destinations/${req.securableType ?? ''}/${req.fullName ?? ''}`;
|
|
83
|
+
let resp;
|
|
84
|
+
const call = async (callSignal) => {
|
|
85
|
+
const headers = new Headers();
|
|
86
|
+
if (this.workspaceId !== undefined) {
|
|
87
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
88
|
+
}
|
|
89
|
+
headers.set('User-Agent', this.userAgent);
|
|
90
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
91
|
+
const respBody = await executeHttpCall({
|
|
92
|
+
request: httpReq,
|
|
93
|
+
httpClient: this.httpClient,
|
|
94
|
+
logger: this.logger,
|
|
95
|
+
});
|
|
96
|
+
resp = parseResponse(respBody, unmarshalAccessRequestDestinationsSchema);
|
|
97
|
+
};
|
|
98
|
+
await executeCall(call, options);
|
|
99
|
+
if (resp === undefined) {
|
|
100
|
+
throw new Error('API call completed without a result.');
|
|
101
|
+
}
|
|
102
|
+
return resp;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Updates the access request destinations for the given securable.
|
|
106
|
+
* The caller must be a metastore admin, the owner of the securable, or a user that has the **MANAGE** privilege on the securable in order to assign destinations.
|
|
107
|
+
* Destinations cannot be updated for securables underneath schemas (tables, volumes, functions, and models). For these securable types, destinations are inherited from the parent securable.
|
|
108
|
+
* A maximum of 5 emails and 5 external notification destinations (Slack, Microsoft Teams, and Generic Webhook destinations) can be assigned to a securable.
|
|
109
|
+
* If a URL destination is assigned, no other destinations can be set.
|
|
110
|
+
*
|
|
111
|
+
* The supported securable types are: "metastore", "catalog", "schema", "table",
|
|
112
|
+
* "external_location", "connection", "credential", "function", "registered_model", and "volume".
|
|
113
|
+
*/
|
|
114
|
+
async updateAccessRequestDestinations(req, options) {
|
|
115
|
+
const url = `${this.host}/api/3.0/rfa/destinations`;
|
|
116
|
+
const params = new URLSearchParams();
|
|
117
|
+
if (req.updateMask !== undefined) {
|
|
118
|
+
params.append('update_mask', req.updateMask.toString());
|
|
119
|
+
}
|
|
120
|
+
const query = params.toString();
|
|
121
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
122
|
+
const body = marshalRequest(req.accessRequestDestinations, marshalAccessRequestDestinationsSchema);
|
|
123
|
+
let resp;
|
|
124
|
+
const call = async (callSignal) => {
|
|
125
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
126
|
+
if (this.workspaceId !== undefined) {
|
|
127
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
128
|
+
}
|
|
129
|
+
headers.set('User-Agent', this.userAgent);
|
|
130
|
+
const httpReq = buildHttpRequest('PATCH', fullUrl, headers, callSignal, body);
|
|
131
|
+
const respBody = await executeHttpCall({
|
|
132
|
+
request: httpReq,
|
|
133
|
+
httpClient: this.httpClient,
|
|
134
|
+
logger: this.logger,
|
|
135
|
+
});
|
|
136
|
+
resp = parseResponse(respBody, unmarshalAccessRequestDestinationsSchema);
|
|
137
|
+
};
|
|
138
|
+
await executeCall(call, options);
|
|
139
|
+
if (resp === undefined) {
|
|
140
|
+
throw new Error('API call completed without a result.');
|
|
141
|
+
}
|
|
142
|
+
return resp;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"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ACP,OAAO,EACP,UAAU,EACV,IAAI,CACL,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC;gBACrC,OAAO,EAAE,OAAO;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YACH,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE,wCAAwC,CAAC,CAAC;QAC3E,CAAC,CAAC;QACF,MAAM,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { RfaClient } from './client';
|
|
2
|
+
export { DestinationType, PrincipalType, SecurableType, SpecialDestination, } from './model';
|
|
3
|
+
export type { AccessRequestDestinations, BatchCreateAccessRequestsRequest, BatchCreateAccessRequestsResponse, CreateAccessRequest, CreateAccessRequestResponse, GetAccessRequestDestinationsRequest, NotificationDestination, Principal, Securable, SecurablePermissions, UpdateAccessRequestDestinationsRequest, } from './model';
|
|
4
|
+
export { accessRequestDestinationsFieldMask } from './model';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,yBAAyB,EACzB,gCAAgC,EAChC,iCAAiC,EACjC,mBAAmB,EACnB,2BAA2B,EAC3B,mCAAmC,EACnC,uBAAuB,EACvB,SAAS,EACT,SAAS,EACT,oBAAoB,EACpB,sCAAsC,GACvC,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,kCAAkC,EAAC,MAAM,SAAS,CAAC"}
|
package/dist/v1/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
export { RfaClient } from './client';
|
|
3
|
+
export { DestinationType, PrincipalType, SecurableType, SpecialDestination, } from './model';
|
|
4
|
+
export { accessRequestDestinationsFieldMask } from './model';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAgBjB,OAAO,EAAC,kCAAkC,EAAC,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { FieldMask } from '@databricks/sdk-core/wkt';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare enum DestinationType {
|
|
4
|
+
DESTINATION_TYPE_UNSPECIFIED = "DESTINATION_TYPE_UNSPECIFIED",
|
|
5
|
+
EMAIL = "EMAIL",
|
|
6
|
+
SLACK = "SLACK",
|
|
7
|
+
GENERIC_WEBHOOK = "GENERIC_WEBHOOK",
|
|
8
|
+
MICROSOFT_TEAMS = "MICROSOFT_TEAMS",
|
|
9
|
+
URL = "URL"
|
|
10
|
+
}
|
|
11
|
+
export declare enum PrincipalType {
|
|
12
|
+
PRINCIPAL_TYPE_UNSPECIFIED = "PRINCIPAL_TYPE_UNSPECIFIED",
|
|
13
|
+
USER_PRINCIPAL = "USER_PRINCIPAL",
|
|
14
|
+
GROUP_PRINCIPAL = "GROUP_PRINCIPAL",
|
|
15
|
+
SERVICE_PRINCIPAL = "SERVICE_PRINCIPAL"
|
|
16
|
+
}
|
|
17
|
+
/** The type of Unity Catalog securable. */
|
|
18
|
+
export declare enum SecurableType {
|
|
19
|
+
CATALOG = "CATALOG",
|
|
20
|
+
SCHEMA = "SCHEMA",
|
|
21
|
+
TABLE = "TABLE",
|
|
22
|
+
STORAGE_CREDENTIAL = "STORAGE_CREDENTIAL",
|
|
23
|
+
EXTERNAL_LOCATION = "EXTERNAL_LOCATION",
|
|
24
|
+
FUNCTION = "FUNCTION",
|
|
25
|
+
SHARE = "SHARE",
|
|
26
|
+
PROVIDER = "PROVIDER",
|
|
27
|
+
RECIPIENT = "RECIPIENT",
|
|
28
|
+
CLEAN_ROOM = "CLEAN_ROOM",
|
|
29
|
+
METASTORE = "METASTORE",
|
|
30
|
+
PIPELINE = "PIPELINE",
|
|
31
|
+
VOLUME = "VOLUME",
|
|
32
|
+
CONNECTION = "CONNECTION",
|
|
33
|
+
CREDENTIAL = "CREDENTIAL",
|
|
34
|
+
EXTERNAL_METADATA = "EXTERNAL_METADATA",
|
|
35
|
+
/** TODO: [UC-2980] Staging tables aren't full-fleged securables yet. */
|
|
36
|
+
STAGING_TABLE = "STAGING_TABLE"
|
|
37
|
+
}
|
|
38
|
+
export declare enum SpecialDestination {
|
|
39
|
+
SPECIAL_DESTINATION_UNSPECIFIED = "SPECIAL_DESTINATION_UNSPECIFIED",
|
|
40
|
+
SPECIAL_DESTINATION_CATALOG_OWNER = "SPECIAL_DESTINATION_CATALOG_OWNER",
|
|
41
|
+
SPECIAL_DESTINATION_EXTERNAL_LOCATION_OWNER = "SPECIAL_DESTINATION_EXTERNAL_LOCATION_OWNER",
|
|
42
|
+
SPECIAL_DESTINATION_CONNECTION_OWNER = "SPECIAL_DESTINATION_CONNECTION_OWNER",
|
|
43
|
+
SPECIAL_DESTINATION_CREDENTIAL_OWNER = "SPECIAL_DESTINATION_CREDENTIAL_OWNER",
|
|
44
|
+
SPECIAL_DESTINATION_METASTORE_OWNER = "SPECIAL_DESTINATION_METASTORE_OWNER"
|
|
45
|
+
}
|
|
46
|
+
export interface AccessRequestDestinations {
|
|
47
|
+
/** The access request destinations for the securable. */
|
|
48
|
+
destinations?: NotificationDestination[] | undefined;
|
|
49
|
+
/** The securable for which the access request destinations are being modified or read. */
|
|
50
|
+
securable?: Securable | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Indicates whether any destinations are hidden from the caller due to a lack of permissions.
|
|
53
|
+
* This value is true if the caller does not have permission to see all destinations.
|
|
54
|
+
*/
|
|
55
|
+
areAnyDestinationsHidden?: boolean | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The source securable from which the destinations are inherited. Either the same value as securable (if destination
|
|
58
|
+
* is set directly on the securable) or the nearest parent securable with destinations set.
|
|
59
|
+
*/
|
|
60
|
+
destinationSourceSecurable?: Securable | undefined;
|
|
61
|
+
/** The type of the securable. Redundant with the type in the securable object, but necessary for Terraform integration */
|
|
62
|
+
securableType?: string | undefined;
|
|
63
|
+
/** The full name of the securable. Redundant with the name in the securable object, but necessary for Terraform integration */
|
|
64
|
+
fullName?: string | undefined;
|
|
65
|
+
}
|
|
66
|
+
export interface BatchCreateAccessRequestsRequest {
|
|
67
|
+
/**
|
|
68
|
+
* A list of individual access requests, where each request corresponds to
|
|
69
|
+
* a set of permissions being requested on a list of securables for a specified principal.
|
|
70
|
+
*
|
|
71
|
+
* At most 30 requests per API call.
|
|
72
|
+
*/
|
|
73
|
+
requests?: CreateAccessRequest[] | undefined;
|
|
74
|
+
}
|
|
75
|
+
export interface BatchCreateAccessRequestsResponse {
|
|
76
|
+
/** The access request destinations for each securable object the principal requested. */
|
|
77
|
+
responses?: CreateAccessRequestResponse[] | undefined;
|
|
78
|
+
}
|
|
79
|
+
export interface CreateAccessRequest {
|
|
80
|
+
/**
|
|
81
|
+
* Optional. The principal this request is for.
|
|
82
|
+
* Empty `behalf_of` defaults to the requester's identity.
|
|
83
|
+
*
|
|
84
|
+
* Principals must be unique across the API call.
|
|
85
|
+
*/
|
|
86
|
+
behalfOf?: Principal | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Optional. Comment associated with the request.
|
|
89
|
+
*
|
|
90
|
+
* At most 200 characters, can only contain lowercase/uppercase
|
|
91
|
+
* letters (a-z, A-Z), numbers (0-9), punctuation, and spaces.
|
|
92
|
+
*/
|
|
93
|
+
comment?: string | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* List of securables and their corresponding requested UC privileges.
|
|
96
|
+
*
|
|
97
|
+
* At most 30 securables can be requested for a principal per batched call.
|
|
98
|
+
* Each securable can only be requested once per principal.
|
|
99
|
+
*/
|
|
100
|
+
securablePermissions?: SecurablePermissions[] | undefined;
|
|
101
|
+
}
|
|
102
|
+
export interface CreateAccessRequestResponse {
|
|
103
|
+
/** The principal the request was made on behalf of. */
|
|
104
|
+
behalfOf?: Principal | undefined;
|
|
105
|
+
/** The access request destinations for all the securables the principal requested. */
|
|
106
|
+
requestDestinations?: AccessRequestDestinations[] | undefined;
|
|
107
|
+
}
|
|
108
|
+
export interface GetAccessRequestDestinationsRequest {
|
|
109
|
+
/** The type of the securable. */
|
|
110
|
+
securableType?: string | undefined;
|
|
111
|
+
/** The full name of the securable. */
|
|
112
|
+
fullName?: string | undefined;
|
|
113
|
+
}
|
|
114
|
+
export interface NotificationDestination {
|
|
115
|
+
/**
|
|
116
|
+
* The identifier for the destination. This is the email address for EMAIL destinations, the URL for URL destinations,
|
|
117
|
+
* or the unique <Databricks> notification destination ID for all other external destinations.
|
|
118
|
+
*/
|
|
119
|
+
destinationId?: string | undefined;
|
|
120
|
+
/** The type of the destination. */
|
|
121
|
+
destinationType?: DestinationType | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* This field is used to denote whether the destination is the email of the owner of the securable object.
|
|
124
|
+
* The special destination cannot be assigned to a securable and only represents the default destination of the securable.
|
|
125
|
+
* The securable types that support default special destinations are: "catalog", "external_location", "connection", "credential", and "metastore".
|
|
126
|
+
* The **destination_type** of a **special_destination** is always EMAIL.
|
|
127
|
+
*/
|
|
128
|
+
specialDestination?: SpecialDestination | undefined;
|
|
129
|
+
}
|
|
130
|
+
export interface Principal {
|
|
131
|
+
/** <Databricks> user, group or service principal ID. */
|
|
132
|
+
id?: string | undefined;
|
|
133
|
+
principalType?: PrincipalType | undefined;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Generic definition of a securable, which is uniquely defined in a metastore
|
|
137
|
+
* by its type and full name.
|
|
138
|
+
*/
|
|
139
|
+
export interface Securable {
|
|
140
|
+
/**
|
|
141
|
+
* Required. The type of securable (catalog/schema/table).
|
|
142
|
+
* Optional if resource_name is present.
|
|
143
|
+
*/
|
|
144
|
+
type?: SecurableType | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Required. The full name of the catalog/schema/table.
|
|
147
|
+
* Optional if resource_name is present.
|
|
148
|
+
*/
|
|
149
|
+
fullName?: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Optional. The name of the Share object that contains the securable when the securable is
|
|
152
|
+
* getting shared in D2D Delta Sharing.
|
|
153
|
+
*/
|
|
154
|
+
providerShare?: string | undefined;
|
|
155
|
+
}
|
|
156
|
+
export interface SecurablePermissions {
|
|
157
|
+
/** The securable for which the access request destinations are being requested. */
|
|
158
|
+
securable?: Securable | undefined;
|
|
159
|
+
/** List of requested Unity Catalog permissions. */
|
|
160
|
+
permissions?: string[] | undefined;
|
|
161
|
+
}
|
|
162
|
+
export interface UpdateAccessRequestDestinationsRequest {
|
|
163
|
+
/**
|
|
164
|
+
* The access request destinations to assign to the securable.
|
|
165
|
+
* For each destination, a **destination_id** and **destination_type** must be defined.
|
|
166
|
+
*/
|
|
167
|
+
accessRequestDestinations?: AccessRequestDestinations | undefined;
|
|
168
|
+
updateMask?: FieldMask<AccessRequestDestinations> | undefined;
|
|
169
|
+
}
|
|
170
|
+
export declare const unmarshalAccessRequestDestinationsSchema: z.ZodType<AccessRequestDestinations>;
|
|
171
|
+
export declare const unmarshalBatchCreateAccessRequestsResponseSchema: z.ZodType<BatchCreateAccessRequestsResponse>;
|
|
172
|
+
export declare const unmarshalCreateAccessRequestResponseSchema: z.ZodType<CreateAccessRequestResponse>;
|
|
173
|
+
export declare const unmarshalNotificationDestinationSchema: z.ZodType<NotificationDestination>;
|
|
174
|
+
export declare const unmarshalPrincipalSchema: z.ZodType<Principal>;
|
|
175
|
+
export declare const unmarshalSecurableSchema: z.ZodType<Securable>;
|
|
176
|
+
export declare const marshalAccessRequestDestinationsSchema: z.ZodType;
|
|
177
|
+
export declare const marshalBatchCreateAccessRequestsRequestSchema: z.ZodType;
|
|
178
|
+
export declare const marshalCreateAccessRequestSchema: z.ZodType;
|
|
179
|
+
export declare const marshalNotificationDestinationSchema: z.ZodType;
|
|
180
|
+
export declare const marshalPrincipalSchema: z.ZodType;
|
|
181
|
+
export declare const marshalSecurableSchema: z.ZodType;
|
|
182
|
+
export declare const marshalSecurablePermissionsSchema: z.ZodType;
|
|
183
|
+
export declare function accessRequestDestinationsFieldMask(...paths: string[]): FieldMask<AccessRequestDestinations>;
|
|
184
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/v1/model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,oBAAY,eAAe;IACzB,4BAA4B,iCAAiC;IAC7D,KAAK,UAAU;IACf,KAAK,UAAU;IACf,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,GAAG,QAAQ;CACZ;AAED,oBAAY,aAAa;IACvB,0BAA0B,+BAA+B;IACzD,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CACxC;AAED,2CAA2C;AAC3C,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;I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