@databricks/sdk-uc-entitytagassignments 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 +55 -0
- package/dist/v1/client.d.ts.map +1 -0
- package/dist/v1/client.js +217 -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 +76 -0
- package/dist/v1/model.d.ts.map +1 -0
- package/dist/v1/model.js +80 -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 +283 -0
- package/src/v1/index.ts +17 -0
- package/src/v1/model.ts +161 -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,55 @@
|
|
|
1
|
+
import type { CallOptions } from '@databricks/sdk-options/call';
|
|
2
|
+
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
+
import type { CreateEntityTagAssignmentRequest, DeleteEntityTagAssignmentRequest, EntityTagAssignment, GetEntityTagAssignmentRequest, ListEntityTagAssignmentsRequest, ListEntityTagAssignmentsResponse, UpdateEntityTagAssignmentRequest } from './model';
|
|
4
|
+
export declare class EntitytagassignmentsClient {
|
|
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 a tag assignment for an Unity Catalog entity.
|
|
13
|
+
*
|
|
14
|
+
* To add tags to Unity Catalog entities, you must own the entity or have the following privileges:
|
|
15
|
+
* - **APPLY TAG** on the entity
|
|
16
|
+
* - **USE SCHEMA** on the entity's parent schema
|
|
17
|
+
* - **USE CATALOG** on the entity's parent catalog
|
|
18
|
+
*
|
|
19
|
+
* To add a governed tag to Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy permissions](https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions).
|
|
20
|
+
*/
|
|
21
|
+
createEntityTagAssignment(req: CreateEntityTagAssignmentRequest, options?: CallOptions): Promise<EntityTagAssignment>;
|
|
22
|
+
/**
|
|
23
|
+
* Deletes a tag assignment for an Unity Catalog entity by its key.
|
|
24
|
+
*
|
|
25
|
+
* To delete tags from Unity Catalog entities, you must own the entity or have the following privileges:
|
|
26
|
+
* - **APPLY TAG** on the entity
|
|
27
|
+
* - **USE_SCHEMA** on the entity's parent schema
|
|
28
|
+
* - **USE_CATALOG** on the entity's parent catalog
|
|
29
|
+
*
|
|
30
|
+
* To delete a governed tag from Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy permissions](https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions).
|
|
31
|
+
*/
|
|
32
|
+
deleteEntityTagAssignment(req: DeleteEntityTagAssignmentRequest, options?: CallOptions): Promise<void>;
|
|
33
|
+
/** Gets a tag assignment for an Unity Catalog entity by tag key. */
|
|
34
|
+
getEntityTagAssignment(req: GetEntityTagAssignmentRequest, options?: CallOptions): Promise<EntityTagAssignment>;
|
|
35
|
+
/**
|
|
36
|
+
* List tag assignments for an Unity Catalog entity
|
|
37
|
+
*
|
|
38
|
+
* PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token.
|
|
39
|
+
* Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
|
|
40
|
+
*/
|
|
41
|
+
listEntityTagAssignments(req: ListEntityTagAssignmentsRequest, options?: CallOptions): Promise<ListEntityTagAssignmentsResponse>;
|
|
42
|
+
listEntityTagAssignmentsIter(req: ListEntityTagAssignmentsRequest, options?: CallOptions): AsyncGenerator<EntityTagAssignment>;
|
|
43
|
+
/**
|
|
44
|
+
* Updates an existing tag assignment for an Unity Catalog entity.
|
|
45
|
+
*
|
|
46
|
+
* To update tags to Unity Catalog entities, you must own the entity or have the following privileges:
|
|
47
|
+
* - **APPLY TAG** on the entity
|
|
48
|
+
* - **USE SCHEMA** on the entity's parent schema
|
|
49
|
+
* - **USE CATALOG** on the entity's parent catalog
|
|
50
|
+
*
|
|
51
|
+
* To update a governed tag to Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy permissions](https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions).
|
|
52
|
+
*/
|
|
53
|
+
updateEntityTagAssignment(req: UpdateEntityTagAssignmentRequest, options?: CallOptions): Promise<EntityTagAssignment>;
|
|
54
|
+
}
|
|
55
|
+
//# 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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
|
@@ -0,0 +1,217 @@
|
|
|
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 { marshalEntityTagAssignmentSchema, unmarshalEntityTagAssignmentSchema, unmarshalListEntityTagAssignmentsResponseSchema, } 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 EntitytagassignmentsClient {
|
|
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 a tag assignment for an Unity Catalog entity.
|
|
42
|
+
*
|
|
43
|
+
* To add tags to Unity Catalog entities, you must own the entity or have the following privileges:
|
|
44
|
+
* - **APPLY TAG** on the entity
|
|
45
|
+
* - **USE SCHEMA** on the entity's parent schema
|
|
46
|
+
* - **USE CATALOG** on the entity's parent catalog
|
|
47
|
+
*
|
|
48
|
+
* To add a governed tag to Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy permissions](https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions).
|
|
49
|
+
*/
|
|
50
|
+
async createEntityTagAssignment(req, options) {
|
|
51
|
+
const url = `${this.host}/api/2.1/unity-catalog/entity-tag-assignments`;
|
|
52
|
+
const body = marshalRequest(req.tagAssignment, marshalEntityTagAssignmentSchema);
|
|
53
|
+
let resp;
|
|
54
|
+
const call = async (callSignal) => {
|
|
55
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
56
|
+
if (this.workspaceId !== undefined) {
|
|
57
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
58
|
+
}
|
|
59
|
+
headers.set('User-Agent', this.userAgent);
|
|
60
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
61
|
+
const respBody = await executeHttpCall({
|
|
62
|
+
request: httpReq,
|
|
63
|
+
httpClient: this.httpClient,
|
|
64
|
+
logger: this.logger,
|
|
65
|
+
});
|
|
66
|
+
resp = parseResponse(respBody, unmarshalEntityTagAssignmentSchema);
|
|
67
|
+
};
|
|
68
|
+
await executeCall(call, options);
|
|
69
|
+
if (resp === undefined) {
|
|
70
|
+
throw new Error('API call completed without a result.');
|
|
71
|
+
}
|
|
72
|
+
return resp;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Deletes a tag assignment for an Unity Catalog entity by its key.
|
|
76
|
+
*
|
|
77
|
+
* To delete tags from Unity Catalog entities, you must own the entity or have the following privileges:
|
|
78
|
+
* - **APPLY TAG** on the entity
|
|
79
|
+
* - **USE_SCHEMA** on the entity's parent schema
|
|
80
|
+
* - **USE_CATALOG** on the entity's parent catalog
|
|
81
|
+
*
|
|
82
|
+
* To delete a governed tag from Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy permissions](https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions).
|
|
83
|
+
*/
|
|
84
|
+
async deleteEntityTagAssignment(req, options) {
|
|
85
|
+
const url = `${this.host}/api/2.1/unity-catalog/entity-tag-assignments/${req.entityType ?? ''}/${req.entityName ?? ''}/tags/${req.tagKey ?? ''}`;
|
|
86
|
+
const call = async (callSignal) => {
|
|
87
|
+
const headers = new Headers();
|
|
88
|
+
if (this.workspaceId !== undefined) {
|
|
89
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
90
|
+
}
|
|
91
|
+
headers.set('User-Agent', this.userAgent);
|
|
92
|
+
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
93
|
+
await executeHttpCall({
|
|
94
|
+
request: httpReq,
|
|
95
|
+
httpClient: this.httpClient,
|
|
96
|
+
logger: this.logger,
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
await executeCall(call, options);
|
|
100
|
+
}
|
|
101
|
+
/** Gets a tag assignment for an Unity Catalog entity by tag key. */
|
|
102
|
+
async getEntityTagAssignment(req, options) {
|
|
103
|
+
const url = `${this.host}/api/2.1/unity-catalog/entity-tag-assignments/${req.entityType ?? ''}/${req.entityName ?? ''}/tags/${req.tagKey ?? ''}`;
|
|
104
|
+
let resp;
|
|
105
|
+
const call = async (callSignal) => {
|
|
106
|
+
const headers = new Headers();
|
|
107
|
+
if (this.workspaceId !== undefined) {
|
|
108
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
109
|
+
}
|
|
110
|
+
headers.set('User-Agent', this.userAgent);
|
|
111
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
112
|
+
const respBody = await executeHttpCall({
|
|
113
|
+
request: httpReq,
|
|
114
|
+
httpClient: this.httpClient,
|
|
115
|
+
logger: this.logger,
|
|
116
|
+
});
|
|
117
|
+
resp = parseResponse(respBody, unmarshalEntityTagAssignmentSchema);
|
|
118
|
+
};
|
|
119
|
+
await executeCall(call, options);
|
|
120
|
+
if (resp === undefined) {
|
|
121
|
+
throw new Error('API call completed without a result.');
|
|
122
|
+
}
|
|
123
|
+
return resp;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* List tag assignments for an Unity Catalog entity
|
|
127
|
+
*
|
|
128
|
+
* PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token.
|
|
129
|
+
* Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.
|
|
130
|
+
*/
|
|
131
|
+
async listEntityTagAssignments(req, options) {
|
|
132
|
+
const url = `${this.host}/api/2.1/unity-catalog/entity-tag-assignments/${req.entityType ?? ''}/${req.entityName ?? ''}/tags`;
|
|
133
|
+
const params = new URLSearchParams();
|
|
134
|
+
if (req.maxResults !== undefined) {
|
|
135
|
+
params.append('max_results', String(req.maxResults));
|
|
136
|
+
}
|
|
137
|
+
if (req.pageToken !== undefined) {
|
|
138
|
+
params.append('page_token', req.pageToken);
|
|
139
|
+
}
|
|
140
|
+
const query = params.toString();
|
|
141
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
142
|
+
let resp;
|
|
143
|
+
const call = async (callSignal) => {
|
|
144
|
+
const headers = new Headers();
|
|
145
|
+
if (this.workspaceId !== undefined) {
|
|
146
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
147
|
+
}
|
|
148
|
+
headers.set('User-Agent', this.userAgent);
|
|
149
|
+
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
150
|
+
const respBody = await executeHttpCall({
|
|
151
|
+
request: httpReq,
|
|
152
|
+
httpClient: this.httpClient,
|
|
153
|
+
logger: this.logger,
|
|
154
|
+
});
|
|
155
|
+
resp = parseResponse(respBody, unmarshalListEntityTagAssignmentsResponseSchema);
|
|
156
|
+
};
|
|
157
|
+
await executeCall(call, options);
|
|
158
|
+
if (resp === undefined) {
|
|
159
|
+
throw new Error('API call completed without a result.');
|
|
160
|
+
}
|
|
161
|
+
return resp;
|
|
162
|
+
}
|
|
163
|
+
async *listEntityTagAssignmentsIter(req, options) {
|
|
164
|
+
const pageReq = { ...req };
|
|
165
|
+
for (;;) {
|
|
166
|
+
const resp = await this.listEntityTagAssignments(pageReq, options);
|
|
167
|
+
for (const item of resp.tagAssignments ?? []) {
|
|
168
|
+
yield item;
|
|
169
|
+
}
|
|
170
|
+
if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
pageReq.pageToken = resp.nextPageToken;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Updates an existing tag assignment for an Unity Catalog entity.
|
|
178
|
+
*
|
|
179
|
+
* To update tags to Unity Catalog entities, you must own the entity or have the following privileges:
|
|
180
|
+
* - **APPLY TAG** on the entity
|
|
181
|
+
* - **USE SCHEMA** on the entity's parent schema
|
|
182
|
+
* - **USE CATALOG** on the entity's parent catalog
|
|
183
|
+
*
|
|
184
|
+
* To update a governed tag to Unity Catalog entities, you must also have the **ASSIGN** or **MANAGE** permission on the tag policy. See [Manage tag policy permissions](https://docs.databricks.com/aws/en/admin/tag-policies/manage-permissions).
|
|
185
|
+
*/
|
|
186
|
+
async updateEntityTagAssignment(req, options) {
|
|
187
|
+
const url = `${this.host}/api/2.1/unity-catalog/entity-tag-assignments/${req.tagAssignment?.entityType ?? ''}/${req.tagAssignment?.entityName ?? ''}/tags/${req.tagAssignment?.tagKey ?? ''}`;
|
|
188
|
+
const params = new URLSearchParams();
|
|
189
|
+
if (req.updateMask !== undefined) {
|
|
190
|
+
params.append('update_mask', req.updateMask.toString());
|
|
191
|
+
}
|
|
192
|
+
const query = params.toString();
|
|
193
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
194
|
+
const body = marshalRequest(req.tagAssignment, marshalEntityTagAssignmentSchema);
|
|
195
|
+
let resp;
|
|
196
|
+
const call = async (callSignal) => {
|
|
197
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
198
|
+
if (this.workspaceId !== undefined) {
|
|
199
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
200
|
+
}
|
|
201
|
+
headers.set('User-Agent', this.userAgent);
|
|
202
|
+
const httpReq = buildHttpRequest('PATCH', fullUrl, headers, callSignal, body);
|
|
203
|
+
const respBody = await executeHttpCall({
|
|
204
|
+
request: httpReq,
|
|
205
|
+
httpClient: this.httpClient,
|
|
206
|
+
logger: this.logger,
|
|
207
|
+
});
|
|
208
|
+
resp = parseResponse(respBody, unmarshalEntityTagAssignmentSchema);
|
|
209
|
+
};
|
|
210
|
+
await executeCall(call, options);
|
|
211
|
+
if (resp === undefined) {
|
|
212
|
+
throw new Error('API call completed without a result.');
|
|
213
|
+
}
|
|
214
|
+
return resp;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAIvD,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAC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qC,CAAC;QAC1C,MAAM,IAAI,GAAS,KAAK,EAAE,UAAwB,EAAiB,EAAE;YACnE,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,CAAC,CAAC;YAClE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;gBACnC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACvD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,gBAAgB,CAC9B,OAAO,EACP,OAAO,EACP,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,kCAAkC,CAAC,CAAC;QACrE,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 { EntitytagassignmentsClient } from './client';
|
|
2
|
+
export { TagAssignmentSourceType } from './model';
|
|
3
|
+
export type { CreateEntityTagAssignmentRequest, DeleteEntityTagAssignmentRequest, EntityTagAssignment, GetEntityTagAssignmentRequest, ListEntityTagAssignmentsRequest, ListEntityTagAssignmentsResponse, UpdateEntityTagAssignmentRequest, } from './model';
|
|
4
|
+
export { entityTagAssignmentFieldMask } 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,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAEhD,YAAY,EACV,gCAAgC,EAChC,gCAAgC,EAChC,mBAAmB,EACnB,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,4BAA4B,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 { EntitytagassignmentsClient } from './client';
|
|
3
|
+
export { TagAssignmentSourceType } from './model';
|
|
4
|
+
export { entityTagAssignmentFieldMask } 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,0BAA0B,EAAC,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAYhD,OAAO,EAAC,4BAA4B,EAAC,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
import { FieldMask } from '@databricks/sdk-core/wkt';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/** Enum representing the source type of a tag assignment */
|
|
5
|
+
export declare enum TagAssignmentSourceType {
|
|
6
|
+
/** Includes (but not limited to) tags manually assigned by users */
|
|
7
|
+
TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED = "TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED",
|
|
8
|
+
/** Automatically assigned by Data Classification */
|
|
9
|
+
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION = "TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION"
|
|
10
|
+
}
|
|
11
|
+
/** Request to create a new entity tag assignment */
|
|
12
|
+
export interface CreateEntityTagAssignmentRequest {
|
|
13
|
+
tagAssignment?: EntityTagAssignment | undefined;
|
|
14
|
+
}
|
|
15
|
+
/** Request to delete an entity tag assignment */
|
|
16
|
+
export interface DeleteEntityTagAssignmentRequest {
|
|
17
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
18
|
+
entityName?: string | undefined;
|
|
19
|
+
/** Required. The key of the tag to delete */
|
|
20
|
+
tagKey?: string | undefined;
|
|
21
|
+
/** The type of the entity to which the tag is assigned. */
|
|
22
|
+
entityType?: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
/** Represents a tag assignment to an entity */
|
|
25
|
+
export interface EntityTagAssignment {
|
|
26
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
27
|
+
entityName?: string | undefined;
|
|
28
|
+
/** The key of the tag */
|
|
29
|
+
tagKey?: string | undefined;
|
|
30
|
+
/** The value of the tag */
|
|
31
|
+
tagValue?: string | undefined;
|
|
32
|
+
/** The type of the entity to which the tag is assigned. */
|
|
33
|
+
entityType?: string | undefined;
|
|
34
|
+
/** The timestamp when the tag assignment was last updated */
|
|
35
|
+
updateTime?: Temporal.Instant | undefined;
|
|
36
|
+
/** The user or principal who updated the tag assignment */
|
|
37
|
+
updatedBy?: string | undefined;
|
|
38
|
+
/** The source type of the tag assignment, e.g., user-assigned or system-assigned */
|
|
39
|
+
sourceType?: TagAssignmentSourceType | undefined;
|
|
40
|
+
}
|
|
41
|
+
/** Request to get an entity tag assignment */
|
|
42
|
+
export interface GetEntityTagAssignmentRequest {
|
|
43
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
44
|
+
entityName?: string | undefined;
|
|
45
|
+
/** Required. The key of the tag */
|
|
46
|
+
tagKey?: string | undefined;
|
|
47
|
+
/** The type of the entity to which the tag is assigned. */
|
|
48
|
+
entityType?: string | undefined;
|
|
49
|
+
}
|
|
50
|
+
/** Request to list entity tag assignments */
|
|
51
|
+
export interface ListEntityTagAssignmentsRequest {
|
|
52
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
53
|
+
entityName?: string | undefined;
|
|
54
|
+
/** Optional. Maximum number of tag assignments to return in a single page */
|
|
55
|
+
maxResults?: number | undefined;
|
|
56
|
+
/** Optional. Pagination token to retrieve the next page of results */
|
|
57
|
+
pageToken?: string | undefined;
|
|
58
|
+
/** The type of the entity to which the tag is assigned. */
|
|
59
|
+
entityType?: string | undefined;
|
|
60
|
+
}
|
|
61
|
+
export interface ListEntityTagAssignmentsResponse {
|
|
62
|
+
/** The list of tag assignments */
|
|
63
|
+
tagAssignments?: EntityTagAssignment[] | undefined;
|
|
64
|
+
/** Optional. Pagination token for retrieving the next page of results */
|
|
65
|
+
nextPageToken?: string | undefined;
|
|
66
|
+
}
|
|
67
|
+
/** Request to update an entity tag assignment */
|
|
68
|
+
export interface UpdateEntityTagAssignmentRequest {
|
|
69
|
+
tagAssignment?: EntityTagAssignment | undefined;
|
|
70
|
+
updateMask?: FieldMask<EntityTagAssignment> | undefined;
|
|
71
|
+
}
|
|
72
|
+
export declare const unmarshalEntityTagAssignmentSchema: z.ZodType<EntityTagAssignment>;
|
|
73
|
+
export declare const unmarshalListEntityTagAssignmentsResponseSchema: z.ZodType<ListEntityTagAssignmentsResponse>;
|
|
74
|
+
export declare const marshalEntityTagAssignmentSchema: z.ZodType;
|
|
75
|
+
export declare function entityTagAssignmentFieldMask(...paths: string[]): FieldMask<EntityTagAssignment>;
|
|
76
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../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