pvw-cli 1.2.8__py3-none-any.whl
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.
Potentially problematic release.
This version of pvw-cli might be problematic. Click here for more details.
- purviewcli/__init__.py +27 -0
- purviewcli/__main__.py +15 -0
- purviewcli/cli/__init__.py +5 -0
- purviewcli/cli/account.py +199 -0
- purviewcli/cli/cli.py +170 -0
- purviewcli/cli/collections.py +502 -0
- purviewcli/cli/domain.py +361 -0
- purviewcli/cli/entity.py +2436 -0
- purviewcli/cli/glossary.py +533 -0
- purviewcli/cli/health.py +250 -0
- purviewcli/cli/insight.py +113 -0
- purviewcli/cli/lineage.py +1103 -0
- purviewcli/cli/management.py +141 -0
- purviewcli/cli/policystore.py +103 -0
- purviewcli/cli/relationship.py +75 -0
- purviewcli/cli/scan.py +357 -0
- purviewcli/cli/search.py +527 -0
- purviewcli/cli/share.py +478 -0
- purviewcli/cli/types.py +831 -0
- purviewcli/cli/unified_catalog.py +3540 -0
- purviewcli/cli/workflow.py +402 -0
- purviewcli/client/__init__.py +21 -0
- purviewcli/client/_account.py +1877 -0
- purviewcli/client/_collections.py +1761 -0
- purviewcli/client/_domain.py +414 -0
- purviewcli/client/_entity.py +3545 -0
- purviewcli/client/_glossary.py +3233 -0
- purviewcli/client/_health.py +501 -0
- purviewcli/client/_insight.py +2873 -0
- purviewcli/client/_lineage.py +2138 -0
- purviewcli/client/_management.py +2202 -0
- purviewcli/client/_policystore.py +2915 -0
- purviewcli/client/_relationship.py +1351 -0
- purviewcli/client/_scan.py +2607 -0
- purviewcli/client/_search.py +1472 -0
- purviewcli/client/_share.py +272 -0
- purviewcli/client/_types.py +2708 -0
- purviewcli/client/_unified_catalog.py +5112 -0
- purviewcli/client/_workflow.py +2734 -0
- purviewcli/client/api_client.py +1295 -0
- purviewcli/client/business_rules.py +675 -0
- purviewcli/client/config.py +231 -0
- purviewcli/client/data_quality.py +433 -0
- purviewcli/client/endpoint.py +123 -0
- purviewcli/client/endpoints.py +554 -0
- purviewcli/client/exceptions.py +38 -0
- purviewcli/client/lineage_visualization.py +797 -0
- purviewcli/client/monitoring_dashboard.py +712 -0
- purviewcli/client/rate_limiter.py +30 -0
- purviewcli/client/retry_handler.py +125 -0
- purviewcli/client/scanning_operations.py +523 -0
- purviewcli/client/settings.py +1 -0
- purviewcli/client/sync_client.py +250 -0
- purviewcli/plugins/__init__.py +1 -0
- purviewcli/plugins/plugin_system.py +709 -0
- pvw_cli-1.2.8.dist-info/METADATA +1618 -0
- pvw_cli-1.2.8.dist-info/RECORD +60 -0
- pvw_cli-1.2.8.dist-info/WHEEL +5 -0
- pvw_cli-1.2.8.dist-info/entry_points.txt +3 -0
- pvw_cli-1.2.8.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2873 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Microsoft Purview Insight Client - Complete API Coverage
|
|
3
|
+
Handles Analytics, Reports, Asset Distribution, and Business Intelligence operations
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from .endpoint import Endpoint, decorator, get_json
|
|
7
|
+
from .endpoints import ENDPOINTS, format_endpoint, get_api_version_params
|
|
8
|
+
from datetime import datetime, timedelta
|
|
9
|
+
|
|
10
|
+
class Insight(Endpoint):
|
|
11
|
+
def __init__(self):
|
|
12
|
+
Endpoint.__init__(self)
|
|
13
|
+
self.app = 'mapanddiscover'
|
|
14
|
+
|
|
15
|
+
# ========== Asset Distribution and Analytics ==========
|
|
16
|
+
|
|
17
|
+
@decorator
|
|
18
|
+
def insightAssetDistribution(self, args):
|
|
19
|
+
"""
|
|
20
|
+
Update an existing insight.
|
|
21
|
+
|
|
22
|
+
Updates an existing insight with new values.
|
|
23
|
+
Only specified fields are modified; others remain unchanged.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
args: Dictionary of operation arguments.
|
|
27
|
+
Contains operation-specific parameters.
|
|
28
|
+
See method implementation for details.
|
|
29
|
+
|
|
30
|
+
Returns:
|
|
31
|
+
Dictionary containing updated insight:
|
|
32
|
+
{
|
|
33
|
+
'guid': str, # Unique identifier
|
|
34
|
+
'attributes': dict, # Updated attributes
|
|
35
|
+
'updateTime': int # Update timestamp
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Raises:
|
|
39
|
+
ValueError: When required parameters are missing or invalid:
|
|
40
|
+
- Empty or None values for required fields
|
|
41
|
+
- Invalid GUID format
|
|
42
|
+
- Out-of-range values
|
|
43
|
+
|
|
44
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
45
|
+
- DefaultAzureCredential not configured
|
|
46
|
+
- Insufficient permissions
|
|
47
|
+
- Expired authentication token
|
|
48
|
+
|
|
49
|
+
HTTPError: When Purview API returns error:
|
|
50
|
+
- 400: Bad request (invalid parameters)
|
|
51
|
+
- 401: Unauthorized (authentication failed)
|
|
52
|
+
- 403: Forbidden (insufficient permissions)
|
|
53
|
+
- 404: Resource not found
|
|
54
|
+
- 429: Rate limit exceeded
|
|
55
|
+
- 500: Internal server error
|
|
56
|
+
|
|
57
|
+
NetworkError: When network connectivity fails
|
|
58
|
+
|
|
59
|
+
Example:
|
|
60
|
+
# Basic usage
|
|
61
|
+
client = Insight()
|
|
62
|
+
|
|
63
|
+
result = client.insightAssetDistribution(args=...)
|
|
64
|
+
print(f"Result: {result}")
|
|
65
|
+
|
|
66
|
+
# With detailed data
|
|
67
|
+
data = {
|
|
68
|
+
'name': 'My Resource',
|
|
69
|
+
'description': 'Resource description',
|
|
70
|
+
'attributes': {
|
|
71
|
+
'key1': 'value1',
|
|
72
|
+
'key2': 'value2'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
result = client.insightAssetDistribution(data)
|
|
77
|
+
print(f"Created/Updated: {result['guid']}")
|
|
78
|
+
|
|
79
|
+
Use Cases:
|
|
80
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
81
|
+
- Ownership Changes: Reassign data ownership
|
|
82
|
+
- Classification: Apply or modify data classifications
|
|
83
|
+
"""
|
|
84
|
+
self.method = 'GET'
|
|
85
|
+
self.endpoint = ENDPOINTS['insight']['asset_distribution_by_data_source']
|
|
86
|
+
self.params = get_api_version_params('datamap')
|
|
87
|
+
|
|
88
|
+
@decorator
|
|
89
|
+
def insightAssetDistributionByType(self, args):
|
|
90
|
+
"""
|
|
91
|
+
Update an existing insight.
|
|
92
|
+
|
|
93
|
+
Updates an existing insight with new values.
|
|
94
|
+
Only specified fields are modified; others remain unchanged.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
args: Dictionary of operation arguments.
|
|
98
|
+
Contains operation-specific parameters.
|
|
99
|
+
See method implementation for details.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
Dictionary containing updated insight:
|
|
103
|
+
{
|
|
104
|
+
'guid': str, # Unique identifier
|
|
105
|
+
'attributes': dict, # Updated attributes
|
|
106
|
+
'updateTime': int # Update timestamp
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Raises:
|
|
110
|
+
ValueError: When required parameters are missing or invalid:
|
|
111
|
+
- Empty or None values for required fields
|
|
112
|
+
- Invalid GUID format
|
|
113
|
+
- Out-of-range values
|
|
114
|
+
|
|
115
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
116
|
+
- DefaultAzureCredential not configured
|
|
117
|
+
- Insufficient permissions
|
|
118
|
+
- Expired authentication token
|
|
119
|
+
|
|
120
|
+
HTTPError: When Purview API returns error:
|
|
121
|
+
- 400: Bad request (invalid parameters)
|
|
122
|
+
- 401: Unauthorized (authentication failed)
|
|
123
|
+
- 403: Forbidden (insufficient permissions)
|
|
124
|
+
- 404: Resource not found
|
|
125
|
+
- 429: Rate limit exceeded
|
|
126
|
+
- 500: Internal server error
|
|
127
|
+
|
|
128
|
+
NetworkError: When network connectivity fails
|
|
129
|
+
|
|
130
|
+
Example:
|
|
131
|
+
# Basic usage
|
|
132
|
+
client = Insight()
|
|
133
|
+
|
|
134
|
+
result = client.insightAssetDistributionByType(args=...)
|
|
135
|
+
print(f"Result: {result}")
|
|
136
|
+
|
|
137
|
+
# With detailed data
|
|
138
|
+
data = {
|
|
139
|
+
'name': 'My Resource',
|
|
140
|
+
'description': 'Resource description',
|
|
141
|
+
'attributes': {
|
|
142
|
+
'key1': 'value1',
|
|
143
|
+
'key2': 'value2'
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
result = client.insightAssetDistributionByType(data)
|
|
148
|
+
print(f"Created/Updated: {result['guid']}")
|
|
149
|
+
|
|
150
|
+
Use Cases:
|
|
151
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
152
|
+
- Ownership Changes: Reassign data ownership
|
|
153
|
+
- Classification: Apply or modify data classifications
|
|
154
|
+
"""
|
|
155
|
+
self.method = 'GET'
|
|
156
|
+
self.endpoint = ENDPOINTS['insight']['asset_distribution_by_type']
|
|
157
|
+
self.params = get_api_version_params('datamap')
|
|
158
|
+
|
|
159
|
+
@decorator
|
|
160
|
+
def insightAssetDistributionByClassification(self, args):
|
|
161
|
+
"""
|
|
162
|
+
Update an existing insight.
|
|
163
|
+
|
|
164
|
+
Updates an existing insight with new values.
|
|
165
|
+
Only specified fields are modified; others remain unchanged.
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
args: Dictionary of operation arguments.
|
|
169
|
+
Contains operation-specific parameters.
|
|
170
|
+
See method implementation for details.
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
Dictionary containing updated insight:
|
|
174
|
+
{
|
|
175
|
+
'guid': str, # Unique identifier
|
|
176
|
+
'attributes': dict, # Updated attributes
|
|
177
|
+
'updateTime': int # Update timestamp
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
Raises:
|
|
181
|
+
ValueError: When required parameters are missing or invalid:
|
|
182
|
+
- Empty or None values for required fields
|
|
183
|
+
- Invalid GUID format
|
|
184
|
+
- Out-of-range values
|
|
185
|
+
|
|
186
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
187
|
+
- DefaultAzureCredential not configured
|
|
188
|
+
- Insufficient permissions
|
|
189
|
+
- Expired authentication token
|
|
190
|
+
|
|
191
|
+
HTTPError: When Purview API returns error:
|
|
192
|
+
- 400: Bad request (invalid parameters)
|
|
193
|
+
- 401: Unauthorized (authentication failed)
|
|
194
|
+
- 403: Forbidden (insufficient permissions)
|
|
195
|
+
- 404: Resource not found
|
|
196
|
+
- 429: Rate limit exceeded
|
|
197
|
+
- 500: Internal server error
|
|
198
|
+
|
|
199
|
+
NetworkError: When network connectivity fails
|
|
200
|
+
|
|
201
|
+
Example:
|
|
202
|
+
# Basic usage
|
|
203
|
+
client = Insight()
|
|
204
|
+
|
|
205
|
+
result = client.insightAssetDistributionByClassification(args=...)
|
|
206
|
+
print(f"Result: {result}")
|
|
207
|
+
|
|
208
|
+
# With detailed data
|
|
209
|
+
data = {
|
|
210
|
+
'name': 'My Resource',
|
|
211
|
+
'description': 'Resource description',
|
|
212
|
+
'attributes': {
|
|
213
|
+
'key1': 'value1',
|
|
214
|
+
'key2': 'value2'
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
result = client.insightAssetDistributionByClassification(data)
|
|
219
|
+
print(f"Created/Updated: {result['guid']}")
|
|
220
|
+
|
|
221
|
+
Use Cases:
|
|
222
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
223
|
+
- Ownership Changes: Reassign data ownership
|
|
224
|
+
- Classification: Apply or modify data classifications
|
|
225
|
+
"""
|
|
226
|
+
self.method = 'GET'
|
|
227
|
+
self.endpoint = ENDPOINTS['insight']['asset_distribution_by_classification']
|
|
228
|
+
self.params = get_api_version_params('datamap')
|
|
229
|
+
|
|
230
|
+
@decorator
|
|
231
|
+
def insightAssetDistributionByCollection(self, args):
|
|
232
|
+
"""
|
|
233
|
+
Update an existing insight.
|
|
234
|
+
|
|
235
|
+
Updates an existing insight with new values.
|
|
236
|
+
Only specified fields are modified; others remain unchanged.
|
|
237
|
+
|
|
238
|
+
Args:
|
|
239
|
+
args: Dictionary of operation arguments.
|
|
240
|
+
Contains operation-specific parameters.
|
|
241
|
+
See method implementation for details.
|
|
242
|
+
|
|
243
|
+
Returns:
|
|
244
|
+
Dictionary containing updated insight:
|
|
245
|
+
{
|
|
246
|
+
'guid': str, # Unique identifier
|
|
247
|
+
'attributes': dict, # Updated attributes
|
|
248
|
+
'updateTime': int # Update timestamp
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
Raises:
|
|
252
|
+
ValueError: When required parameters are missing or invalid:
|
|
253
|
+
- Empty or None values for required fields
|
|
254
|
+
- Invalid GUID format
|
|
255
|
+
- Out-of-range values
|
|
256
|
+
|
|
257
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
258
|
+
- DefaultAzureCredential not configured
|
|
259
|
+
- Insufficient permissions
|
|
260
|
+
- Expired authentication token
|
|
261
|
+
|
|
262
|
+
HTTPError: When Purview API returns error:
|
|
263
|
+
- 400: Bad request (invalid parameters)
|
|
264
|
+
- 401: Unauthorized (authentication failed)
|
|
265
|
+
- 403: Forbidden (insufficient permissions)
|
|
266
|
+
- 404: Resource not found
|
|
267
|
+
- 429: Rate limit exceeded
|
|
268
|
+
- 500: Internal server error
|
|
269
|
+
|
|
270
|
+
NetworkError: When network connectivity fails
|
|
271
|
+
|
|
272
|
+
Example:
|
|
273
|
+
# Basic usage
|
|
274
|
+
client = CollectionsInsight()
|
|
275
|
+
|
|
276
|
+
result = client.insightAssetDistributionByCollection(args=...)
|
|
277
|
+
print(f"Result: {result}")
|
|
278
|
+
|
|
279
|
+
# With detailed data
|
|
280
|
+
data = {
|
|
281
|
+
'name': 'My Resource',
|
|
282
|
+
'description': 'Resource description',
|
|
283
|
+
'attributes': {
|
|
284
|
+
'key1': 'value1',
|
|
285
|
+
'key2': 'value2'
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
result = client.insightAssetDistributionByCollection(data)
|
|
290
|
+
print(f"Created/Updated: {result['guid']}")
|
|
291
|
+
|
|
292
|
+
Use Cases:
|
|
293
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
294
|
+
- Ownership Changes: Reassign data ownership
|
|
295
|
+
- Classification: Apply or modify data classifications
|
|
296
|
+
"""
|
|
297
|
+
self.method = 'GET'
|
|
298
|
+
self.endpoint = ENDPOINTS['insight']['asset_distribution_by_collection']
|
|
299
|
+
self.params = get_api_version_params('datamap')
|
|
300
|
+
|
|
301
|
+
# ========== File and Resource Set Analytics ==========
|
|
302
|
+
|
|
303
|
+
@decorator
|
|
304
|
+
def insightFilesWithoutResourceSet(self, args):
|
|
305
|
+
"""
|
|
306
|
+
Update an existing insight.
|
|
307
|
+
|
|
308
|
+
Updates an existing insight with new values.
|
|
309
|
+
Only specified fields are modified; others remain unchanged.
|
|
310
|
+
|
|
311
|
+
Args:
|
|
312
|
+
args: Dictionary of operation arguments.
|
|
313
|
+
Contains operation-specific parameters.
|
|
314
|
+
See method implementation for details.
|
|
315
|
+
|
|
316
|
+
Returns:
|
|
317
|
+
Dictionary containing updated insight:
|
|
318
|
+
{
|
|
319
|
+
'guid': str, # Unique identifier
|
|
320
|
+
'attributes': dict, # Updated attributes
|
|
321
|
+
'updateTime': int # Update timestamp
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
Raises:
|
|
325
|
+
ValueError: When required parameters are missing or invalid:
|
|
326
|
+
- Empty or None values for required fields
|
|
327
|
+
- Invalid GUID format
|
|
328
|
+
- Out-of-range values
|
|
329
|
+
|
|
330
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
331
|
+
- DefaultAzureCredential not configured
|
|
332
|
+
- Insufficient permissions
|
|
333
|
+
- Expired authentication token
|
|
334
|
+
|
|
335
|
+
HTTPError: When Purview API returns error:
|
|
336
|
+
- 400: Bad request (invalid parameters)
|
|
337
|
+
- 401: Unauthorized (authentication failed)
|
|
338
|
+
- 403: Forbidden (insufficient permissions)
|
|
339
|
+
- 404: Resource not found
|
|
340
|
+
- 429: Rate limit exceeded
|
|
341
|
+
- 500: Internal server error
|
|
342
|
+
|
|
343
|
+
NetworkError: When network connectivity fails
|
|
344
|
+
|
|
345
|
+
Example:
|
|
346
|
+
# Basic usage
|
|
347
|
+
client = Insight()
|
|
348
|
+
|
|
349
|
+
result = client.insightFilesWithoutResourceSet(args=...)
|
|
350
|
+
print(f"Result: {result}")
|
|
351
|
+
|
|
352
|
+
# With detailed data
|
|
353
|
+
data = {
|
|
354
|
+
'name': 'My Resource',
|
|
355
|
+
'description': 'Resource description',
|
|
356
|
+
'attributes': {
|
|
357
|
+
'key1': 'value1',
|
|
358
|
+
'key2': 'value2'
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
result = client.insightFilesWithoutResourceSet(data)
|
|
363
|
+
print(f"Created/Updated: {result['guid']}")
|
|
364
|
+
|
|
365
|
+
Use Cases:
|
|
366
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
367
|
+
- Ownership Changes: Reassign data ownership
|
|
368
|
+
- Classification: Apply or modify data classifications
|
|
369
|
+
"""
|
|
370
|
+
self.method = 'GET'
|
|
371
|
+
self.endpoint = ENDPOINTS['insight']['files_without_resource_set']
|
|
372
|
+
self.params = get_api_version_params('datamap')
|
|
373
|
+
|
|
374
|
+
@decorator
|
|
375
|
+
def insightFilesAggregation(self, args):
|
|
376
|
+
"""
|
|
377
|
+
Perform operation on resource.
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
Args:
|
|
382
|
+
args: Dictionary of operation arguments.
|
|
383
|
+
Contains operation-specific parameters.
|
|
384
|
+
See method implementation for details.
|
|
385
|
+
|
|
386
|
+
Returns:
|
|
387
|
+
[TODO: Specify return type and structure]
|
|
388
|
+
[TODO: Document nested fields]
|
|
389
|
+
|
|
390
|
+
Raises:
|
|
391
|
+
ValueError: When required parameters are missing or invalid:
|
|
392
|
+
- Empty or None values for required fields
|
|
393
|
+
- Invalid GUID format
|
|
394
|
+
- Out-of-range values
|
|
395
|
+
|
|
396
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
397
|
+
- DefaultAzureCredential not configured
|
|
398
|
+
- Insufficient permissions
|
|
399
|
+
- Expired authentication token
|
|
400
|
+
|
|
401
|
+
HTTPError: When Purview API returns error:
|
|
402
|
+
- 400: Bad request (invalid parameters)
|
|
403
|
+
- 401: Unauthorized (authentication failed)
|
|
404
|
+
- 403: Forbidden (insufficient permissions)
|
|
405
|
+
- 404: Resource not found
|
|
406
|
+
- 429: Rate limit exceeded
|
|
407
|
+
- 500: Internal server error
|
|
408
|
+
|
|
409
|
+
NetworkError: When network connectivity fails
|
|
410
|
+
|
|
411
|
+
Example:
|
|
412
|
+
# Basic usage
|
|
413
|
+
client = Insight()
|
|
414
|
+
|
|
415
|
+
result = client.insightFilesAggregation(args=...)
|
|
416
|
+
print(f"Result: {result}")
|
|
417
|
+
|
|
418
|
+
Use Cases:
|
|
419
|
+
- [TODO: Add specific use cases for this operation]
|
|
420
|
+
- [TODO: Include business context]
|
|
421
|
+
- [TODO: Explain when to use this method]
|
|
422
|
+
"""
|
|
423
|
+
self.method = 'GET'
|
|
424
|
+
self.endpoint = ENDPOINTS['insight']['files_aggregation']
|
|
425
|
+
self.params = get_api_version_params('datamap')
|
|
426
|
+
|
|
427
|
+
@decorator
|
|
428
|
+
def insightResourceSetDetails(self, args):
|
|
429
|
+
"""
|
|
430
|
+
Update an existing insight.
|
|
431
|
+
|
|
432
|
+
Updates an existing insight with new values.
|
|
433
|
+
Only specified fields are modified; others remain unchanged.
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
args: Dictionary of operation arguments.
|
|
437
|
+
Contains operation-specific parameters.
|
|
438
|
+
See method implementation for details.
|
|
439
|
+
|
|
440
|
+
Returns:
|
|
441
|
+
Dictionary containing updated insight:
|
|
442
|
+
{
|
|
443
|
+
'guid': str, # Unique identifier
|
|
444
|
+
'attributes': dict, # Updated attributes
|
|
445
|
+
'updateTime': int # Update timestamp
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
Raises:
|
|
449
|
+
ValueError: When required parameters are missing or invalid:
|
|
450
|
+
- Empty or None values for required fields
|
|
451
|
+
- Invalid GUID format
|
|
452
|
+
- Out-of-range values
|
|
453
|
+
|
|
454
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
455
|
+
- DefaultAzureCredential not configured
|
|
456
|
+
- Insufficient permissions
|
|
457
|
+
- Expired authentication token
|
|
458
|
+
|
|
459
|
+
HTTPError: When Purview API returns error:
|
|
460
|
+
- 400: Bad request (invalid parameters)
|
|
461
|
+
- 401: Unauthorized (authentication failed)
|
|
462
|
+
- 403: Forbidden (insufficient permissions)
|
|
463
|
+
- 404: Resource not found
|
|
464
|
+
- 429: Rate limit exceeded
|
|
465
|
+
- 500: Internal server error
|
|
466
|
+
|
|
467
|
+
NetworkError: When network connectivity fails
|
|
468
|
+
|
|
469
|
+
Example:
|
|
470
|
+
# Basic usage
|
|
471
|
+
client = Insight()
|
|
472
|
+
|
|
473
|
+
result = client.insightResourceSetDetails(args=...)
|
|
474
|
+
print(f"Result: {result}")
|
|
475
|
+
|
|
476
|
+
# With detailed data
|
|
477
|
+
data = {
|
|
478
|
+
'name': 'My Resource',
|
|
479
|
+
'description': 'Resource description',
|
|
480
|
+
'attributes': {
|
|
481
|
+
'key1': 'value1',
|
|
482
|
+
'key2': 'value2'
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
result = client.insightResourceSetDetails(data)
|
|
487
|
+
print(f"Created/Updated: {result['guid']}")
|
|
488
|
+
|
|
489
|
+
Use Cases:
|
|
490
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
491
|
+
- Ownership Changes: Reassign data ownership
|
|
492
|
+
- Classification: Apply or modify data classifications
|
|
493
|
+
"""
|
|
494
|
+
self.method = 'GET'
|
|
495
|
+
self.endpoint = ENDPOINTS['insight']['resource_set_details']
|
|
496
|
+
self.params = get_api_version_params('datamap')
|
|
497
|
+
if args.get('--resourceSetName'):
|
|
498
|
+
self.params['resourceSetName'] = args['--resourceSetName']
|
|
499
|
+
|
|
500
|
+
@decorator
|
|
501
|
+
def insightResourceSetSummary(self, args):
|
|
502
|
+
"""
|
|
503
|
+
Update an existing insight.
|
|
504
|
+
|
|
505
|
+
Updates an existing insight with new values.
|
|
506
|
+
Only specified fields are modified; others remain unchanged.
|
|
507
|
+
|
|
508
|
+
Args:
|
|
509
|
+
args: Dictionary of operation arguments.
|
|
510
|
+
Contains operation-specific parameters.
|
|
511
|
+
See method implementation for details.
|
|
512
|
+
|
|
513
|
+
Returns:
|
|
514
|
+
Dictionary containing updated insight:
|
|
515
|
+
{
|
|
516
|
+
'guid': str, # Unique identifier
|
|
517
|
+
'attributes': dict, # Updated attributes
|
|
518
|
+
'updateTime': int # Update timestamp
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
Raises:
|
|
522
|
+
ValueError: When required parameters are missing or invalid:
|
|
523
|
+
- Empty or None values for required fields
|
|
524
|
+
- Invalid GUID format
|
|
525
|
+
- Out-of-range values
|
|
526
|
+
|
|
527
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
528
|
+
- DefaultAzureCredential not configured
|
|
529
|
+
- Insufficient permissions
|
|
530
|
+
- Expired authentication token
|
|
531
|
+
|
|
532
|
+
HTTPError: When Purview API returns error:
|
|
533
|
+
- 400: Bad request (invalid parameters)
|
|
534
|
+
- 401: Unauthorized (authentication failed)
|
|
535
|
+
- 403: Forbidden (insufficient permissions)
|
|
536
|
+
- 404: Resource not found
|
|
537
|
+
- 429: Rate limit exceeded
|
|
538
|
+
- 500: Internal server error
|
|
539
|
+
|
|
540
|
+
NetworkError: When network connectivity fails
|
|
541
|
+
|
|
542
|
+
Example:
|
|
543
|
+
# Basic usage
|
|
544
|
+
client = Insight()
|
|
545
|
+
|
|
546
|
+
result = client.insightResourceSetSummary(args=...)
|
|
547
|
+
print(f"Result: {result}")
|
|
548
|
+
|
|
549
|
+
# With detailed data
|
|
550
|
+
data = {
|
|
551
|
+
'name': 'My Resource',
|
|
552
|
+
'description': 'Resource description',
|
|
553
|
+
'attributes': {
|
|
554
|
+
'key1': 'value1',
|
|
555
|
+
'key2': 'value2'
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
result = client.insightResourceSetSummary(data)
|
|
560
|
+
print(f"Created/Updated: {result['guid']}")
|
|
561
|
+
|
|
562
|
+
Use Cases:
|
|
563
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
564
|
+
- Ownership Changes: Reassign data ownership
|
|
565
|
+
- Classification: Apply or modify data classifications
|
|
566
|
+
"""
|
|
567
|
+
self.method = 'GET'
|
|
568
|
+
self.endpoint = ENDPOINTS['insight']['resource_set_summary']
|
|
569
|
+
self.params = get_api_version_params('datamap')
|
|
570
|
+
|
|
571
|
+
# ========== Tag and Label Analytics ==========
|
|
572
|
+
|
|
573
|
+
@decorator
|
|
574
|
+
def insightTags(self, args):
|
|
575
|
+
"""
|
|
576
|
+
Perform operation on resource.
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
Args:
|
|
581
|
+
args: Dictionary of operation arguments.
|
|
582
|
+
Contains operation-specific parameters.
|
|
583
|
+
See method implementation for details.
|
|
584
|
+
|
|
585
|
+
Returns:
|
|
586
|
+
[TODO: Specify return type and structure]
|
|
587
|
+
[TODO: Document nested fields]
|
|
588
|
+
|
|
589
|
+
Raises:
|
|
590
|
+
ValueError: When required parameters are missing or invalid:
|
|
591
|
+
- Empty or None values for required fields
|
|
592
|
+
- Invalid GUID format
|
|
593
|
+
- Out-of-range values
|
|
594
|
+
|
|
595
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
596
|
+
- DefaultAzureCredential not configured
|
|
597
|
+
- Insufficient permissions
|
|
598
|
+
- Expired authentication token
|
|
599
|
+
|
|
600
|
+
HTTPError: When Purview API returns error:
|
|
601
|
+
- 400: Bad request (invalid parameters)
|
|
602
|
+
- 401: Unauthorized (authentication failed)
|
|
603
|
+
- 403: Forbidden (insufficient permissions)
|
|
604
|
+
- 404: Resource not found
|
|
605
|
+
- 429: Rate limit exceeded
|
|
606
|
+
- 500: Internal server error
|
|
607
|
+
|
|
608
|
+
NetworkError: When network connectivity fails
|
|
609
|
+
|
|
610
|
+
Example:
|
|
611
|
+
# Basic usage
|
|
612
|
+
client = Insight()
|
|
613
|
+
|
|
614
|
+
result = client.insightTags(args=...)
|
|
615
|
+
print(f"Result: {result}")
|
|
616
|
+
|
|
617
|
+
Use Cases:
|
|
618
|
+
- [TODO: Add specific use cases for this operation]
|
|
619
|
+
- [TODO: Include business context]
|
|
620
|
+
- [TODO: Explain when to use this method]
|
|
621
|
+
"""
|
|
622
|
+
self.method = 'GET'
|
|
623
|
+
self.endpoint = ENDPOINTS['insight']['label_insight']
|
|
624
|
+
self.params = get_api_version_params('datamap')
|
|
625
|
+
|
|
626
|
+
@decorator
|
|
627
|
+
def insightTagsTimeSeries(self, args):
|
|
628
|
+
"""
|
|
629
|
+
Perform operation on resource.
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
Args:
|
|
634
|
+
args: Dictionary of operation arguments.
|
|
635
|
+
Contains operation-specific parameters.
|
|
636
|
+
See method implementation for details.
|
|
637
|
+
|
|
638
|
+
Returns:
|
|
639
|
+
[TODO: Specify return type and structure]
|
|
640
|
+
[TODO: Document nested fields]
|
|
641
|
+
|
|
642
|
+
Raises:
|
|
643
|
+
ValueError: When required parameters are missing or invalid:
|
|
644
|
+
- Empty or None values for required fields
|
|
645
|
+
- Invalid GUID format
|
|
646
|
+
- Out-of-range values
|
|
647
|
+
|
|
648
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
649
|
+
- DefaultAzureCredential not configured
|
|
650
|
+
- Insufficient permissions
|
|
651
|
+
- Expired authentication token
|
|
652
|
+
|
|
653
|
+
HTTPError: When Purview API returns error:
|
|
654
|
+
- 400: Bad request (invalid parameters)
|
|
655
|
+
- 401: Unauthorized (authentication failed)
|
|
656
|
+
- 403: Forbidden (insufficient permissions)
|
|
657
|
+
- 404: Resource not found
|
|
658
|
+
- 429: Rate limit exceeded
|
|
659
|
+
- 500: Internal server error
|
|
660
|
+
|
|
661
|
+
NetworkError: When network connectivity fails
|
|
662
|
+
|
|
663
|
+
Example:
|
|
664
|
+
# Basic usage
|
|
665
|
+
client = Insight()
|
|
666
|
+
|
|
667
|
+
result = client.insightTagsTimeSeries(args=...)
|
|
668
|
+
print(f"Result: {result}")
|
|
669
|
+
|
|
670
|
+
Use Cases:
|
|
671
|
+
- [TODO: Add specific use cases for this operation]
|
|
672
|
+
- [TODO: Include business context]
|
|
673
|
+
- [TODO: Explain when to use this method]
|
|
674
|
+
"""
|
|
675
|
+
self.method = 'GET'
|
|
676
|
+
self.endpoint = ENDPOINTS['insight']['tags_time_series']
|
|
677
|
+
self.params = get_api_version_params('datamap')
|
|
678
|
+
if args.get('--window'):
|
|
679
|
+
self.params['window'] = args['--window']
|
|
680
|
+
|
|
681
|
+
@decorator
|
|
682
|
+
def insightClassificationDistribution(self, args):
|
|
683
|
+
"""
|
|
684
|
+
Perform operation on resource.
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
Args:
|
|
689
|
+
args: Dictionary of operation arguments.
|
|
690
|
+
Contains operation-specific parameters.
|
|
691
|
+
See method implementation for details.
|
|
692
|
+
|
|
693
|
+
Returns:
|
|
694
|
+
[TODO: Specify return type and structure]
|
|
695
|
+
[TODO: Document nested fields]
|
|
696
|
+
|
|
697
|
+
Raises:
|
|
698
|
+
ValueError: When required parameters are missing or invalid:
|
|
699
|
+
- Empty or None values for required fields
|
|
700
|
+
- Invalid GUID format
|
|
701
|
+
- Out-of-range values
|
|
702
|
+
|
|
703
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
704
|
+
- DefaultAzureCredential not configured
|
|
705
|
+
- Insufficient permissions
|
|
706
|
+
- Expired authentication token
|
|
707
|
+
|
|
708
|
+
HTTPError: When Purview API returns error:
|
|
709
|
+
- 400: Bad request (invalid parameters)
|
|
710
|
+
- 401: Unauthorized (authentication failed)
|
|
711
|
+
- 403: Forbidden (insufficient permissions)
|
|
712
|
+
- 404: Resource not found
|
|
713
|
+
- 429: Rate limit exceeded
|
|
714
|
+
- 500: Internal server error
|
|
715
|
+
|
|
716
|
+
NetworkError: When network connectivity fails
|
|
717
|
+
|
|
718
|
+
Example:
|
|
719
|
+
# Basic usage
|
|
720
|
+
client = Insight()
|
|
721
|
+
|
|
722
|
+
result = client.insightClassificationDistribution(args=...)
|
|
723
|
+
print(f"Result: {result}")
|
|
724
|
+
|
|
725
|
+
Use Cases:
|
|
726
|
+
- [TODO: Add specific use cases for this operation]
|
|
727
|
+
- [TODO: Include business context]
|
|
728
|
+
- [TODO: Explain when to use this method]
|
|
729
|
+
"""
|
|
730
|
+
self.method = 'GET'
|
|
731
|
+
self.endpoint = ENDPOINTS['insight']['classification_distribution']
|
|
732
|
+
self.params = get_api_version_params('datamap')
|
|
733
|
+
|
|
734
|
+
@decorator
|
|
735
|
+
def insightSensitivityLabels(self, args):
|
|
736
|
+
"""
|
|
737
|
+
Perform operation on resource.
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
Args:
|
|
742
|
+
args: Dictionary of operation arguments.
|
|
743
|
+
Contains operation-specific parameters.
|
|
744
|
+
See method implementation for details.
|
|
745
|
+
|
|
746
|
+
Returns:
|
|
747
|
+
[TODO: Specify return type and structure]
|
|
748
|
+
[TODO: Document nested fields]
|
|
749
|
+
|
|
750
|
+
Raises:
|
|
751
|
+
ValueError: When required parameters are missing or invalid:
|
|
752
|
+
- Empty or None values for required fields
|
|
753
|
+
- Invalid GUID format
|
|
754
|
+
- Out-of-range values
|
|
755
|
+
|
|
756
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
757
|
+
- DefaultAzureCredential not configured
|
|
758
|
+
- Insufficient permissions
|
|
759
|
+
- Expired authentication token
|
|
760
|
+
|
|
761
|
+
HTTPError: When Purview API returns error:
|
|
762
|
+
- 400: Bad request (invalid parameters)
|
|
763
|
+
- 401: Unauthorized (authentication failed)
|
|
764
|
+
- 403: Forbidden (insufficient permissions)
|
|
765
|
+
- 404: Resource not found
|
|
766
|
+
- 429: Rate limit exceeded
|
|
767
|
+
- 500: Internal server error
|
|
768
|
+
|
|
769
|
+
NetworkError: When network connectivity fails
|
|
770
|
+
|
|
771
|
+
Example:
|
|
772
|
+
# Basic usage
|
|
773
|
+
client = Insight()
|
|
774
|
+
|
|
775
|
+
result = client.insightSensitivityLabels(args=...)
|
|
776
|
+
print(f"Result: {result}")
|
|
777
|
+
|
|
778
|
+
Use Cases:
|
|
779
|
+
- [TODO: Add specific use cases for this operation]
|
|
780
|
+
- [TODO: Include business context]
|
|
781
|
+
- [TODO: Explain when to use this method]
|
|
782
|
+
"""
|
|
783
|
+
self.method = 'GET'
|
|
784
|
+
self.endpoint = ENDPOINTS['insight']['sensitivity_labels']
|
|
785
|
+
self.params = get_api_version_params('datamap')
|
|
786
|
+
|
|
787
|
+
# ========== Scan Status and Performance ==========
|
|
788
|
+
|
|
789
|
+
@decorator
|
|
790
|
+
def insightScanStatusSummary(self, args):
|
|
791
|
+
"""
|
|
792
|
+
Perform operation on resource.
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
Args:
|
|
797
|
+
args: Dictionary of operation arguments.
|
|
798
|
+
Contains operation-specific parameters.
|
|
799
|
+
See method implementation for details.
|
|
800
|
+
|
|
801
|
+
Returns:
|
|
802
|
+
[TODO: Specify return type and structure]
|
|
803
|
+
[TODO: Document nested fields]
|
|
804
|
+
|
|
805
|
+
Raises:
|
|
806
|
+
ValueError: When required parameters are missing or invalid:
|
|
807
|
+
- Empty or None values for required fields
|
|
808
|
+
- Invalid GUID format
|
|
809
|
+
- Out-of-range values
|
|
810
|
+
|
|
811
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
812
|
+
- DefaultAzureCredential not configured
|
|
813
|
+
- Insufficient permissions
|
|
814
|
+
- Expired authentication token
|
|
815
|
+
|
|
816
|
+
HTTPError: When Purview API returns error:
|
|
817
|
+
- 400: Bad request (invalid parameters)
|
|
818
|
+
- 401: Unauthorized (authentication failed)
|
|
819
|
+
- 403: Forbidden (insufficient permissions)
|
|
820
|
+
- 404: Resource not found
|
|
821
|
+
- 429: Rate limit exceeded
|
|
822
|
+
- 500: Internal server error
|
|
823
|
+
|
|
824
|
+
NetworkError: When network connectivity fails
|
|
825
|
+
|
|
826
|
+
Example:
|
|
827
|
+
# Basic usage
|
|
828
|
+
client = Insight()
|
|
829
|
+
|
|
830
|
+
result = client.insightScanStatusSummary(args=...)
|
|
831
|
+
print(f"Result: {result}")
|
|
832
|
+
|
|
833
|
+
Use Cases:
|
|
834
|
+
- [TODO: Add specific use cases for this operation]
|
|
835
|
+
- [TODO: Include business context]
|
|
836
|
+
- [TODO: Explain when to use this method]
|
|
837
|
+
"""
|
|
838
|
+
self.method = 'GET'
|
|
839
|
+
self.endpoint = ENDPOINTS['insight']['scan_status_summary']
|
|
840
|
+
self.params = get_api_version_params('datamap')
|
|
841
|
+
if args.get('--numberOfDays'):
|
|
842
|
+
self.params['window'] = args['--numberOfDays']
|
|
843
|
+
|
|
844
|
+
@decorator
|
|
845
|
+
def insightScanStatusSummaryByTs(self, args):
|
|
846
|
+
"""
|
|
847
|
+
Perform operation on resource.
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
Args:
|
|
852
|
+
args: Dictionary of operation arguments.
|
|
853
|
+
Contains operation-specific parameters.
|
|
854
|
+
See method implementation for details.
|
|
855
|
+
|
|
856
|
+
Returns:
|
|
857
|
+
[TODO: Specify return type and structure]
|
|
858
|
+
[TODO: Document nested fields]
|
|
859
|
+
|
|
860
|
+
Raises:
|
|
861
|
+
ValueError: When required parameters are missing or invalid:
|
|
862
|
+
- Empty or None values for required fields
|
|
863
|
+
- Invalid GUID format
|
|
864
|
+
- Out-of-range values
|
|
865
|
+
|
|
866
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
867
|
+
- DefaultAzureCredential not configured
|
|
868
|
+
- Insufficient permissions
|
|
869
|
+
- Expired authentication token
|
|
870
|
+
|
|
871
|
+
HTTPError: When Purview API returns error:
|
|
872
|
+
- 400: Bad request (invalid parameters)
|
|
873
|
+
- 401: Unauthorized (authentication failed)
|
|
874
|
+
- 403: Forbidden (insufficient permissions)
|
|
875
|
+
- 404: Resource not found
|
|
876
|
+
- 429: Rate limit exceeded
|
|
877
|
+
- 500: Internal server error
|
|
878
|
+
|
|
879
|
+
NetworkError: When network connectivity fails
|
|
880
|
+
|
|
881
|
+
Example:
|
|
882
|
+
# Basic usage
|
|
883
|
+
client = Insight()
|
|
884
|
+
|
|
885
|
+
result = client.insightScanStatusSummaryByTs(args=...)
|
|
886
|
+
print(f"Result: {result}")
|
|
887
|
+
|
|
888
|
+
Use Cases:
|
|
889
|
+
- [TODO: Add specific use cases for this operation]
|
|
890
|
+
- [TODO: Include business context]
|
|
891
|
+
- [TODO: Explain when to use this method]
|
|
892
|
+
"""
|
|
893
|
+
self.method = 'GET'
|
|
894
|
+
self.endpoint = ENDPOINTS['insight']['scan_status_summary_by_ts']
|
|
895
|
+
self.params = get_api_version_params('datamap')
|
|
896
|
+
if args.get('--numberOfDays'):
|
|
897
|
+
self.params['window'] = args['--numberOfDays']
|
|
898
|
+
|
|
899
|
+
@decorator
|
|
900
|
+
def insightScanPerformance(self, args):
|
|
901
|
+
"""
|
|
902
|
+
Perform operation on resource.
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
Args:
|
|
907
|
+
args: Dictionary of operation arguments.
|
|
908
|
+
Contains operation-specific parameters.
|
|
909
|
+
See method implementation for details.
|
|
910
|
+
|
|
911
|
+
Returns:
|
|
912
|
+
[TODO: Specify return type and structure]
|
|
913
|
+
[TODO: Document nested fields]
|
|
914
|
+
|
|
915
|
+
Raises:
|
|
916
|
+
ValueError: When required parameters are missing or invalid:
|
|
917
|
+
- Empty or None values for required fields
|
|
918
|
+
- Invalid GUID format
|
|
919
|
+
- Out-of-range values
|
|
920
|
+
|
|
921
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
922
|
+
- DefaultAzureCredential not configured
|
|
923
|
+
- Insufficient permissions
|
|
924
|
+
- Expired authentication token
|
|
925
|
+
|
|
926
|
+
HTTPError: When Purview API returns error:
|
|
927
|
+
- 400: Bad request (invalid parameters)
|
|
928
|
+
- 401: Unauthorized (authentication failed)
|
|
929
|
+
- 403: Forbidden (insufficient permissions)
|
|
930
|
+
- 404: Resource not found
|
|
931
|
+
- 429: Rate limit exceeded
|
|
932
|
+
- 500: Internal server error
|
|
933
|
+
|
|
934
|
+
NetworkError: When network connectivity fails
|
|
935
|
+
|
|
936
|
+
Example:
|
|
937
|
+
# Basic usage
|
|
938
|
+
client = Insight()
|
|
939
|
+
|
|
940
|
+
result = client.insightScanPerformance(args=...)
|
|
941
|
+
print(f"Result: {result}")
|
|
942
|
+
|
|
943
|
+
Use Cases:
|
|
944
|
+
- [TODO: Add specific use cases for this operation]
|
|
945
|
+
- [TODO: Include business context]
|
|
946
|
+
- [TODO: Explain when to use this method]
|
|
947
|
+
"""
|
|
948
|
+
self.method = 'GET'
|
|
949
|
+
self.endpoint = ENDPOINTS['insight']['scan_performance']
|
|
950
|
+
self.params = get_api_version_params('datamap')
|
|
951
|
+
if args.get('--scanName'):
|
|
952
|
+
self.params['scanName'] = args['--scanName']
|
|
953
|
+
|
|
954
|
+
@decorator
|
|
955
|
+
def insightScanHistory(self, args):
|
|
956
|
+
"""
|
|
957
|
+
Perform operation on resource.
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
Args:
|
|
962
|
+
args: Dictionary of operation arguments.
|
|
963
|
+
Contains operation-specific parameters.
|
|
964
|
+
See method implementation for details.
|
|
965
|
+
|
|
966
|
+
Returns:
|
|
967
|
+
[TODO: Specify return type and structure]
|
|
968
|
+
[TODO: Document nested fields]
|
|
969
|
+
|
|
970
|
+
Raises:
|
|
971
|
+
ValueError: When required parameters are missing or invalid:
|
|
972
|
+
- Empty or None values for required fields
|
|
973
|
+
- Invalid GUID format
|
|
974
|
+
- Out-of-range values
|
|
975
|
+
|
|
976
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
977
|
+
- DefaultAzureCredential not configured
|
|
978
|
+
- Insufficient permissions
|
|
979
|
+
- Expired authentication token
|
|
980
|
+
|
|
981
|
+
HTTPError: When Purview API returns error:
|
|
982
|
+
- 400: Bad request (invalid parameters)
|
|
983
|
+
- 401: Unauthorized (authentication failed)
|
|
984
|
+
- 403: Forbidden (insufficient permissions)
|
|
985
|
+
- 404: Resource not found
|
|
986
|
+
- 429: Rate limit exceeded
|
|
987
|
+
- 500: Internal server error
|
|
988
|
+
|
|
989
|
+
NetworkError: When network connectivity fails
|
|
990
|
+
|
|
991
|
+
Example:
|
|
992
|
+
# Basic usage
|
|
993
|
+
client = Insight()
|
|
994
|
+
|
|
995
|
+
result = client.insightScanHistory(args=...)
|
|
996
|
+
print(f"Result: {result}")
|
|
997
|
+
|
|
998
|
+
Use Cases:
|
|
999
|
+
- [TODO: Add specific use cases for this operation]
|
|
1000
|
+
- [TODO: Include business context]
|
|
1001
|
+
- [TODO: Explain when to use this method]
|
|
1002
|
+
"""
|
|
1003
|
+
self.method = 'GET'
|
|
1004
|
+
self.endpoint = ENDPOINTS['insight']['scan_history']
|
|
1005
|
+
self.params = get_api_version_params('datamap')
|
|
1006
|
+
if args.get('--startTime'):
|
|
1007
|
+
self.params['startTime'] = args['--startTime']
|
|
1008
|
+
if args.get('--endTime'):
|
|
1009
|
+
self.params['endTime'] = args['--endTime']
|
|
1010
|
+
|
|
1011
|
+
# ========== Data Quality Insights ==========
|
|
1012
|
+
|
|
1013
|
+
@decorator
|
|
1014
|
+
def insightDataQualityOverview(self, args):
|
|
1015
|
+
"""
|
|
1016
|
+
Perform operation on resource.
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
Args:
|
|
1021
|
+
args: Dictionary of operation arguments.
|
|
1022
|
+
Contains operation-specific parameters.
|
|
1023
|
+
See method implementation for details.
|
|
1024
|
+
|
|
1025
|
+
Returns:
|
|
1026
|
+
[TODO: Specify return type and structure]
|
|
1027
|
+
[TODO: Document nested fields]
|
|
1028
|
+
|
|
1029
|
+
Raises:
|
|
1030
|
+
ValueError: When required parameters are missing or invalid:
|
|
1031
|
+
- Empty or None values for required fields
|
|
1032
|
+
- Invalid GUID format
|
|
1033
|
+
- Out-of-range values
|
|
1034
|
+
|
|
1035
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1036
|
+
- DefaultAzureCredential not configured
|
|
1037
|
+
- Insufficient permissions
|
|
1038
|
+
- Expired authentication token
|
|
1039
|
+
|
|
1040
|
+
HTTPError: When Purview API returns error:
|
|
1041
|
+
- 400: Bad request (invalid parameters)
|
|
1042
|
+
- 401: Unauthorized (authentication failed)
|
|
1043
|
+
- 403: Forbidden (insufficient permissions)
|
|
1044
|
+
- 404: Resource not found
|
|
1045
|
+
- 429: Rate limit exceeded
|
|
1046
|
+
- 500: Internal server error
|
|
1047
|
+
|
|
1048
|
+
NetworkError: When network connectivity fails
|
|
1049
|
+
|
|
1050
|
+
Example:
|
|
1051
|
+
# Basic usage
|
|
1052
|
+
client = Insight()
|
|
1053
|
+
|
|
1054
|
+
result = client.insightDataQualityOverview(args=...)
|
|
1055
|
+
print(f"Result: {result}")
|
|
1056
|
+
|
|
1057
|
+
Use Cases:
|
|
1058
|
+
- [TODO: Add specific use cases for this operation]
|
|
1059
|
+
- [TODO: Include business context]
|
|
1060
|
+
- [TODO: Explain when to use this method]
|
|
1061
|
+
"""
|
|
1062
|
+
self.method = 'GET'
|
|
1063
|
+
self.endpoint = ENDPOINTS['insight']['data_quality_overview']
|
|
1064
|
+
self.params = get_api_version_params('datamap')
|
|
1065
|
+
|
|
1066
|
+
@decorator
|
|
1067
|
+
def insightDataQualityBySource(self, args):
|
|
1068
|
+
"""
|
|
1069
|
+
Perform operation on resource.
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
Args:
|
|
1074
|
+
args: Dictionary of operation arguments.
|
|
1075
|
+
Contains operation-specific parameters.
|
|
1076
|
+
See method implementation for details.
|
|
1077
|
+
|
|
1078
|
+
Returns:
|
|
1079
|
+
[TODO: Specify return type and structure]
|
|
1080
|
+
[TODO: Document nested fields]
|
|
1081
|
+
|
|
1082
|
+
Raises:
|
|
1083
|
+
ValueError: When required parameters are missing or invalid:
|
|
1084
|
+
- Empty or None values for required fields
|
|
1085
|
+
- Invalid GUID format
|
|
1086
|
+
- Out-of-range values
|
|
1087
|
+
|
|
1088
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1089
|
+
- DefaultAzureCredential not configured
|
|
1090
|
+
- Insufficient permissions
|
|
1091
|
+
- Expired authentication token
|
|
1092
|
+
|
|
1093
|
+
HTTPError: When Purview API returns error:
|
|
1094
|
+
- 400: Bad request (invalid parameters)
|
|
1095
|
+
- 401: Unauthorized (authentication failed)
|
|
1096
|
+
- 403: Forbidden (insufficient permissions)
|
|
1097
|
+
- 404: Resource not found
|
|
1098
|
+
- 429: Rate limit exceeded
|
|
1099
|
+
- 500: Internal server error
|
|
1100
|
+
|
|
1101
|
+
NetworkError: When network connectivity fails
|
|
1102
|
+
|
|
1103
|
+
Example:
|
|
1104
|
+
# Basic usage
|
|
1105
|
+
client = Insight()
|
|
1106
|
+
|
|
1107
|
+
result = client.insightDataQualityBySource(args=...)
|
|
1108
|
+
print(f"Result: {result}")
|
|
1109
|
+
|
|
1110
|
+
Use Cases:
|
|
1111
|
+
- [TODO: Add specific use cases for this operation]
|
|
1112
|
+
- [TODO: Include business context]
|
|
1113
|
+
- [TODO: Explain when to use this method]
|
|
1114
|
+
"""
|
|
1115
|
+
self.method = 'GET'
|
|
1116
|
+
self.endpoint = ENDPOINTS['insight']['data_quality_by_source']
|
|
1117
|
+
self.params = get_api_version_params('datamap')
|
|
1118
|
+
|
|
1119
|
+
@decorator
|
|
1120
|
+
def insightDataQualityTrends(self, args):
|
|
1121
|
+
"""
|
|
1122
|
+
Perform operation on resource.
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
Args:
|
|
1127
|
+
args: Dictionary of operation arguments.
|
|
1128
|
+
Contains operation-specific parameters.
|
|
1129
|
+
See method implementation for details.
|
|
1130
|
+
|
|
1131
|
+
Returns:
|
|
1132
|
+
[TODO: Specify return type and structure]
|
|
1133
|
+
[TODO: Document nested fields]
|
|
1134
|
+
|
|
1135
|
+
Raises:
|
|
1136
|
+
ValueError: When required parameters are missing or invalid:
|
|
1137
|
+
- Empty or None values for required fields
|
|
1138
|
+
- Invalid GUID format
|
|
1139
|
+
- Out-of-range values
|
|
1140
|
+
|
|
1141
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1142
|
+
- DefaultAzureCredential not configured
|
|
1143
|
+
- Insufficient permissions
|
|
1144
|
+
- Expired authentication token
|
|
1145
|
+
|
|
1146
|
+
HTTPError: When Purview API returns error:
|
|
1147
|
+
- 400: Bad request (invalid parameters)
|
|
1148
|
+
- 401: Unauthorized (authentication failed)
|
|
1149
|
+
- 403: Forbidden (insufficient permissions)
|
|
1150
|
+
- 404: Resource not found
|
|
1151
|
+
- 429: Rate limit exceeded
|
|
1152
|
+
- 500: Internal server error
|
|
1153
|
+
|
|
1154
|
+
NetworkError: When network connectivity fails
|
|
1155
|
+
|
|
1156
|
+
Example:
|
|
1157
|
+
# Basic usage
|
|
1158
|
+
client = Insight()
|
|
1159
|
+
|
|
1160
|
+
result = client.insightDataQualityTrends(args=...)
|
|
1161
|
+
print(f"Result: {result}")
|
|
1162
|
+
|
|
1163
|
+
Use Cases:
|
|
1164
|
+
- [TODO: Add specific use cases for this operation]
|
|
1165
|
+
- [TODO: Include business context]
|
|
1166
|
+
- [TODO: Explain when to use this method]
|
|
1167
|
+
"""
|
|
1168
|
+
self.method = 'GET'
|
|
1169
|
+
self.endpoint = ENDPOINTS['insight']['data_quality_trends']
|
|
1170
|
+
self.params = get_api_version_params('datamap')
|
|
1171
|
+
if args.get('--timeRange'):
|
|
1172
|
+
self.params['timeRange'] = args['--timeRange']
|
|
1173
|
+
|
|
1174
|
+
@decorator
|
|
1175
|
+
def insightDataProfileSummary(self, args):
|
|
1176
|
+
"""
|
|
1177
|
+
Perform operation on resource.
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
Args:
|
|
1182
|
+
args: Dictionary of operation arguments.
|
|
1183
|
+
Contains operation-specific parameters.
|
|
1184
|
+
See method implementation for details.
|
|
1185
|
+
|
|
1186
|
+
Returns:
|
|
1187
|
+
[TODO: Specify return type and structure]
|
|
1188
|
+
[TODO: Document nested fields]
|
|
1189
|
+
|
|
1190
|
+
Raises:
|
|
1191
|
+
ValueError: When required parameters are missing or invalid:
|
|
1192
|
+
- Empty or None values for required fields
|
|
1193
|
+
- Invalid GUID format
|
|
1194
|
+
- Out-of-range values
|
|
1195
|
+
|
|
1196
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1197
|
+
- DefaultAzureCredential not configured
|
|
1198
|
+
- Insufficient permissions
|
|
1199
|
+
- Expired authentication token
|
|
1200
|
+
|
|
1201
|
+
HTTPError: When Purview API returns error:
|
|
1202
|
+
- 400: Bad request (invalid parameters)
|
|
1203
|
+
- 401: Unauthorized (authentication failed)
|
|
1204
|
+
- 403: Forbidden (insufficient permissions)
|
|
1205
|
+
- 404: Resource not found
|
|
1206
|
+
- 429: Rate limit exceeded
|
|
1207
|
+
- 500: Internal server error
|
|
1208
|
+
|
|
1209
|
+
NetworkError: When network connectivity fails
|
|
1210
|
+
|
|
1211
|
+
Example:
|
|
1212
|
+
# Basic usage
|
|
1213
|
+
client = Insight()
|
|
1214
|
+
|
|
1215
|
+
result = client.insightDataProfileSummary(args=...)
|
|
1216
|
+
print(f"Result: {result}")
|
|
1217
|
+
|
|
1218
|
+
Use Cases:
|
|
1219
|
+
- [TODO: Add specific use cases for this operation]
|
|
1220
|
+
- [TODO: Include business context]
|
|
1221
|
+
- [TODO: Explain when to use this method]
|
|
1222
|
+
"""
|
|
1223
|
+
self.method = 'GET'
|
|
1224
|
+
self.endpoint = ENDPOINTS['insight']['data_profile_summary']
|
|
1225
|
+
self.params = get_api_version_params('datamap')
|
|
1226
|
+
|
|
1227
|
+
# ========== Glossary and Business Analytics ==========
|
|
1228
|
+
|
|
1229
|
+
@decorator
|
|
1230
|
+
def insightGlossaryUsage(self, args):
|
|
1231
|
+
"""
|
|
1232
|
+
Perform operation on resource.
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
Args:
|
|
1237
|
+
args: Dictionary of operation arguments.
|
|
1238
|
+
Contains operation-specific parameters.
|
|
1239
|
+
See method implementation for details.
|
|
1240
|
+
|
|
1241
|
+
Returns:
|
|
1242
|
+
[TODO: Specify return type and structure]
|
|
1243
|
+
[TODO: Document nested fields]
|
|
1244
|
+
|
|
1245
|
+
Raises:
|
|
1246
|
+
ValueError: When required parameters are missing or invalid:
|
|
1247
|
+
- Empty or None values for required fields
|
|
1248
|
+
- Invalid GUID format
|
|
1249
|
+
- Out-of-range values
|
|
1250
|
+
|
|
1251
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1252
|
+
- DefaultAzureCredential not configured
|
|
1253
|
+
- Insufficient permissions
|
|
1254
|
+
- Expired authentication token
|
|
1255
|
+
|
|
1256
|
+
HTTPError: When Purview API returns error:
|
|
1257
|
+
- 400: Bad request (invalid parameters)
|
|
1258
|
+
- 401: Unauthorized (authentication failed)
|
|
1259
|
+
- 403: Forbidden (insufficient permissions)
|
|
1260
|
+
- 404: Resource not found
|
|
1261
|
+
- 429: Rate limit exceeded
|
|
1262
|
+
- 500: Internal server error
|
|
1263
|
+
|
|
1264
|
+
NetworkError: When network connectivity fails
|
|
1265
|
+
|
|
1266
|
+
Example:
|
|
1267
|
+
# Basic usage
|
|
1268
|
+
client = GlossaryInsight()
|
|
1269
|
+
|
|
1270
|
+
result = client.insightGlossaryUsage(args=...)
|
|
1271
|
+
print(f"Result: {result}")
|
|
1272
|
+
|
|
1273
|
+
Use Cases:
|
|
1274
|
+
- [TODO: Add specific use cases for this operation]
|
|
1275
|
+
- [TODO: Include business context]
|
|
1276
|
+
- [TODO: Explain when to use this method]
|
|
1277
|
+
"""
|
|
1278
|
+
self.method = 'GET'
|
|
1279
|
+
self.endpoint = ENDPOINTS['insight']['glossary_usage']
|
|
1280
|
+
self.params = get_api_version_params('datamap')
|
|
1281
|
+
|
|
1282
|
+
@decorator
|
|
1283
|
+
def insightBusinessGlossaryHealth(self, args):
|
|
1284
|
+
"""
|
|
1285
|
+
Perform operation on resource.
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
Args:
|
|
1290
|
+
args: Dictionary of operation arguments.
|
|
1291
|
+
Contains operation-specific parameters.
|
|
1292
|
+
See method implementation for details.
|
|
1293
|
+
|
|
1294
|
+
Returns:
|
|
1295
|
+
[TODO: Specify return type and structure]
|
|
1296
|
+
[TODO: Document nested fields]
|
|
1297
|
+
|
|
1298
|
+
Raises:
|
|
1299
|
+
ValueError: When required parameters are missing or invalid:
|
|
1300
|
+
- Empty or None values for required fields
|
|
1301
|
+
- Invalid GUID format
|
|
1302
|
+
- Out-of-range values
|
|
1303
|
+
|
|
1304
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1305
|
+
- DefaultAzureCredential not configured
|
|
1306
|
+
- Insufficient permissions
|
|
1307
|
+
- Expired authentication token
|
|
1308
|
+
|
|
1309
|
+
HTTPError: When Purview API returns error:
|
|
1310
|
+
- 400: Bad request (invalid parameters)
|
|
1311
|
+
- 401: Unauthorized (authentication failed)
|
|
1312
|
+
- 403: Forbidden (insufficient permissions)
|
|
1313
|
+
- 404: Resource not found
|
|
1314
|
+
- 429: Rate limit exceeded
|
|
1315
|
+
- 500: Internal server error
|
|
1316
|
+
|
|
1317
|
+
NetworkError: When network connectivity fails
|
|
1318
|
+
|
|
1319
|
+
Example:
|
|
1320
|
+
# Basic usage
|
|
1321
|
+
client = GlossaryInsight()
|
|
1322
|
+
|
|
1323
|
+
result = client.insightBusinessGlossaryHealth(args=...)
|
|
1324
|
+
print(f"Result: {result}")
|
|
1325
|
+
|
|
1326
|
+
Use Cases:
|
|
1327
|
+
- [TODO: Add specific use cases for this operation]
|
|
1328
|
+
- [TODO: Include business context]
|
|
1329
|
+
- [TODO: Explain when to use this method]
|
|
1330
|
+
"""
|
|
1331
|
+
self.method = 'GET'
|
|
1332
|
+
self.endpoint = ENDPOINTS['insight']['business_glossary_health']
|
|
1333
|
+
self.params = get_api_version_params('datamap')
|
|
1334
|
+
|
|
1335
|
+
@decorator
|
|
1336
|
+
def insightTermAssignmentCoverage(self, args):
|
|
1337
|
+
"""
|
|
1338
|
+
Perform operation on resource.
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
Args:
|
|
1343
|
+
args: Dictionary of operation arguments.
|
|
1344
|
+
Contains operation-specific parameters.
|
|
1345
|
+
See method implementation for details.
|
|
1346
|
+
|
|
1347
|
+
Returns:
|
|
1348
|
+
[TODO: Specify return type and structure]
|
|
1349
|
+
[TODO: Document nested fields]
|
|
1350
|
+
|
|
1351
|
+
Raises:
|
|
1352
|
+
ValueError: When required parameters are missing or invalid:
|
|
1353
|
+
- Empty or None values for required fields
|
|
1354
|
+
- Invalid GUID format
|
|
1355
|
+
- Out-of-range values
|
|
1356
|
+
|
|
1357
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1358
|
+
- DefaultAzureCredential not configured
|
|
1359
|
+
- Insufficient permissions
|
|
1360
|
+
- Expired authentication token
|
|
1361
|
+
|
|
1362
|
+
HTTPError: When Purview API returns error:
|
|
1363
|
+
- 400: Bad request (invalid parameters)
|
|
1364
|
+
- 401: Unauthorized (authentication failed)
|
|
1365
|
+
- 403: Forbidden (insufficient permissions)
|
|
1366
|
+
- 404: Resource not found
|
|
1367
|
+
- 429: Rate limit exceeded
|
|
1368
|
+
- 500: Internal server error
|
|
1369
|
+
|
|
1370
|
+
NetworkError: When network connectivity fails
|
|
1371
|
+
|
|
1372
|
+
Example:
|
|
1373
|
+
# Basic usage
|
|
1374
|
+
client = Insight()
|
|
1375
|
+
|
|
1376
|
+
result = client.insightTermAssignmentCoverage(args=...)
|
|
1377
|
+
print(f"Result: {result}")
|
|
1378
|
+
|
|
1379
|
+
Use Cases:
|
|
1380
|
+
- [TODO: Add specific use cases for this operation]
|
|
1381
|
+
- [TODO: Include business context]
|
|
1382
|
+
- [TODO: Explain when to use this method]
|
|
1383
|
+
"""
|
|
1384
|
+
self.method = 'GET'
|
|
1385
|
+
self.endpoint = ENDPOINTS['insight']['term_assignment_coverage']
|
|
1386
|
+
self.params = get_api_version_params('datamap')
|
|
1387
|
+
|
|
1388
|
+
# ========== Lineage Analytics ==========
|
|
1389
|
+
|
|
1390
|
+
@decorator
|
|
1391
|
+
def insightLineageCoverage(self, args):
|
|
1392
|
+
"""
|
|
1393
|
+
Perform operation on resource.
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
Args:
|
|
1398
|
+
args: Dictionary of operation arguments.
|
|
1399
|
+
Contains operation-specific parameters.
|
|
1400
|
+
See method implementation for details.
|
|
1401
|
+
|
|
1402
|
+
Returns:
|
|
1403
|
+
[TODO: Specify return type and structure]
|
|
1404
|
+
[TODO: Document nested fields]
|
|
1405
|
+
|
|
1406
|
+
Raises:
|
|
1407
|
+
ValueError: When required parameters are missing or invalid:
|
|
1408
|
+
- Empty or None values for required fields
|
|
1409
|
+
- Invalid GUID format
|
|
1410
|
+
- Out-of-range values
|
|
1411
|
+
|
|
1412
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1413
|
+
- DefaultAzureCredential not configured
|
|
1414
|
+
- Insufficient permissions
|
|
1415
|
+
- Expired authentication token
|
|
1416
|
+
|
|
1417
|
+
HTTPError: When Purview API returns error:
|
|
1418
|
+
- 400: Bad request (invalid parameters)
|
|
1419
|
+
- 401: Unauthorized (authentication failed)
|
|
1420
|
+
- 403: Forbidden (insufficient permissions)
|
|
1421
|
+
- 404: Resource not found
|
|
1422
|
+
- 429: Rate limit exceeded
|
|
1423
|
+
- 500: Internal server error
|
|
1424
|
+
|
|
1425
|
+
NetworkError: When network connectivity fails
|
|
1426
|
+
|
|
1427
|
+
Example:
|
|
1428
|
+
# Basic usage
|
|
1429
|
+
client = LineageInsight()
|
|
1430
|
+
|
|
1431
|
+
result = client.insightLineageCoverage(args=...)
|
|
1432
|
+
print(f"Result: {result}")
|
|
1433
|
+
|
|
1434
|
+
Use Cases:
|
|
1435
|
+
- [TODO: Add specific use cases for this operation]
|
|
1436
|
+
- [TODO: Include business context]
|
|
1437
|
+
- [TODO: Explain when to use this method]
|
|
1438
|
+
"""
|
|
1439
|
+
self.method = 'GET'
|
|
1440
|
+
self.endpoint = ENDPOINTS['insight']['lineage_coverage']
|
|
1441
|
+
self.params = get_api_version_params('datamap')
|
|
1442
|
+
|
|
1443
|
+
@decorator
|
|
1444
|
+
def insightLineageComplexity(self, args):
|
|
1445
|
+
"""
|
|
1446
|
+
Perform operation on resource.
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
Args:
|
|
1451
|
+
args: Dictionary of operation arguments.
|
|
1452
|
+
Contains operation-specific parameters.
|
|
1453
|
+
See method implementation for details.
|
|
1454
|
+
|
|
1455
|
+
Returns:
|
|
1456
|
+
[TODO: Specify return type and structure]
|
|
1457
|
+
[TODO: Document nested fields]
|
|
1458
|
+
|
|
1459
|
+
Raises:
|
|
1460
|
+
ValueError: When required parameters are missing or invalid:
|
|
1461
|
+
- Empty or None values for required fields
|
|
1462
|
+
- Invalid GUID format
|
|
1463
|
+
- Out-of-range values
|
|
1464
|
+
|
|
1465
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1466
|
+
- DefaultAzureCredential not configured
|
|
1467
|
+
- Insufficient permissions
|
|
1468
|
+
- Expired authentication token
|
|
1469
|
+
|
|
1470
|
+
HTTPError: When Purview API returns error:
|
|
1471
|
+
- 400: Bad request (invalid parameters)
|
|
1472
|
+
- 401: Unauthorized (authentication failed)
|
|
1473
|
+
- 403: Forbidden (insufficient permissions)
|
|
1474
|
+
- 404: Resource not found
|
|
1475
|
+
- 429: Rate limit exceeded
|
|
1476
|
+
- 500: Internal server error
|
|
1477
|
+
|
|
1478
|
+
NetworkError: When network connectivity fails
|
|
1479
|
+
|
|
1480
|
+
Example:
|
|
1481
|
+
# Basic usage
|
|
1482
|
+
client = LineageInsight()
|
|
1483
|
+
|
|
1484
|
+
result = client.insightLineageComplexity(args=...)
|
|
1485
|
+
print(f"Result: {result}")
|
|
1486
|
+
|
|
1487
|
+
Use Cases:
|
|
1488
|
+
- [TODO: Add specific use cases for this operation]
|
|
1489
|
+
- [TODO: Include business context]
|
|
1490
|
+
- [TODO: Explain when to use this method]
|
|
1491
|
+
"""
|
|
1492
|
+
self.method = 'GET'
|
|
1493
|
+
self.endpoint = ENDPOINTS['insight']['lineage_complexity']
|
|
1494
|
+
self.params = get_api_version_params('datamap')
|
|
1495
|
+
|
|
1496
|
+
@decorator
|
|
1497
|
+
def insightDataMovementPatterns(self, args):
|
|
1498
|
+
"""
|
|
1499
|
+
Perform operation on resource.
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
Args:
|
|
1504
|
+
args: Dictionary of operation arguments.
|
|
1505
|
+
Contains operation-specific parameters.
|
|
1506
|
+
See method implementation for details.
|
|
1507
|
+
|
|
1508
|
+
Returns:
|
|
1509
|
+
[TODO: Specify return type and structure]
|
|
1510
|
+
[TODO: Document nested fields]
|
|
1511
|
+
|
|
1512
|
+
Raises:
|
|
1513
|
+
ValueError: When required parameters are missing or invalid:
|
|
1514
|
+
- Empty or None values for required fields
|
|
1515
|
+
- Invalid GUID format
|
|
1516
|
+
- Out-of-range values
|
|
1517
|
+
|
|
1518
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1519
|
+
- DefaultAzureCredential not configured
|
|
1520
|
+
- Insufficient permissions
|
|
1521
|
+
- Expired authentication token
|
|
1522
|
+
|
|
1523
|
+
HTTPError: When Purview API returns error:
|
|
1524
|
+
- 400: Bad request (invalid parameters)
|
|
1525
|
+
- 401: Unauthorized (authentication failed)
|
|
1526
|
+
- 403: Forbidden (insufficient permissions)
|
|
1527
|
+
- 404: Resource not found
|
|
1528
|
+
- 429: Rate limit exceeded
|
|
1529
|
+
- 500: Internal server error
|
|
1530
|
+
|
|
1531
|
+
NetworkError: When network connectivity fails
|
|
1532
|
+
|
|
1533
|
+
Example:
|
|
1534
|
+
# Basic usage
|
|
1535
|
+
client = Insight()
|
|
1536
|
+
|
|
1537
|
+
result = client.insightDataMovementPatterns(args=...)
|
|
1538
|
+
print(f"Result: {result}")
|
|
1539
|
+
|
|
1540
|
+
Use Cases:
|
|
1541
|
+
- [TODO: Add specific use cases for this operation]
|
|
1542
|
+
- [TODO: Include business context]
|
|
1543
|
+
- [TODO: Explain when to use this method]
|
|
1544
|
+
"""
|
|
1545
|
+
self.method = 'GET'
|
|
1546
|
+
self.endpoint = ENDPOINTS['insight']['data_movement_patterns']
|
|
1547
|
+
self.params = get_api_version_params('datamap')
|
|
1548
|
+
|
|
1549
|
+
# ========== User Activity and Engagement ==========
|
|
1550
|
+
|
|
1551
|
+
@decorator
|
|
1552
|
+
def insightUserActivity(self, args):
|
|
1553
|
+
"""
|
|
1554
|
+
Perform operation on resource.
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
Args:
|
|
1559
|
+
args: Dictionary of operation arguments.
|
|
1560
|
+
Contains operation-specific parameters.
|
|
1561
|
+
See method implementation for details.
|
|
1562
|
+
|
|
1563
|
+
Returns:
|
|
1564
|
+
[TODO: Specify return type and structure]
|
|
1565
|
+
[TODO: Document nested fields]
|
|
1566
|
+
|
|
1567
|
+
Raises:
|
|
1568
|
+
ValueError: When required parameters are missing or invalid:
|
|
1569
|
+
- Empty or None values for required fields
|
|
1570
|
+
- Invalid GUID format
|
|
1571
|
+
- Out-of-range values
|
|
1572
|
+
|
|
1573
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1574
|
+
- DefaultAzureCredential not configured
|
|
1575
|
+
- Insufficient permissions
|
|
1576
|
+
- Expired authentication token
|
|
1577
|
+
|
|
1578
|
+
HTTPError: When Purview API returns error:
|
|
1579
|
+
- 400: Bad request (invalid parameters)
|
|
1580
|
+
- 401: Unauthorized (authentication failed)
|
|
1581
|
+
- 403: Forbidden (insufficient permissions)
|
|
1582
|
+
- 404: Resource not found
|
|
1583
|
+
- 429: Rate limit exceeded
|
|
1584
|
+
- 500: Internal server error
|
|
1585
|
+
|
|
1586
|
+
NetworkError: When network connectivity fails
|
|
1587
|
+
|
|
1588
|
+
Example:
|
|
1589
|
+
# Basic usage
|
|
1590
|
+
client = Insight()
|
|
1591
|
+
|
|
1592
|
+
result = client.insightUserActivity(args=...)
|
|
1593
|
+
print(f"Result: {result}")
|
|
1594
|
+
|
|
1595
|
+
Use Cases:
|
|
1596
|
+
- [TODO: Add specific use cases for this operation]
|
|
1597
|
+
- [TODO: Include business context]
|
|
1598
|
+
- [TODO: Explain when to use this method]
|
|
1599
|
+
"""
|
|
1600
|
+
self.method = 'GET'
|
|
1601
|
+
self.endpoint = ENDPOINTS['insight']['user_activity']
|
|
1602
|
+
self.params = get_api_version_params('datamap')
|
|
1603
|
+
if args.get('--timeRange'):
|
|
1604
|
+
self.params['timeRange'] = args['--timeRange']
|
|
1605
|
+
|
|
1606
|
+
@decorator
|
|
1607
|
+
def insightSearchPatterns(self, args):
|
|
1608
|
+
"""
|
|
1609
|
+
Search for insights.
|
|
1610
|
+
|
|
1611
|
+
Searches for resources matching the specified criteria.
|
|
1612
|
+
Supports filtering, pagination, and sorting.
|
|
1613
|
+
|
|
1614
|
+
Args:
|
|
1615
|
+
args: Dictionary of operation arguments.
|
|
1616
|
+
Contains operation-specific parameters.
|
|
1617
|
+
See method implementation for details.
|
|
1618
|
+
|
|
1619
|
+
Returns:
|
|
1620
|
+
Dictionary containing search results:
|
|
1621
|
+
{
|
|
1622
|
+
'value': [...] # List of matching resources
|
|
1623
|
+
'count': int, # Total results count
|
|
1624
|
+
'nextLink': str # Pagination link (if applicable)
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
Raises:
|
|
1628
|
+
ValueError: When required parameters are missing or invalid:
|
|
1629
|
+
- Empty or None values for required fields
|
|
1630
|
+
- Invalid GUID format
|
|
1631
|
+
- Out-of-range values
|
|
1632
|
+
|
|
1633
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1634
|
+
- DefaultAzureCredential not configured
|
|
1635
|
+
- Insufficient permissions
|
|
1636
|
+
- Expired authentication token
|
|
1637
|
+
|
|
1638
|
+
HTTPError: When Purview API returns error:
|
|
1639
|
+
- 400: Bad request (invalid parameters)
|
|
1640
|
+
- 401: Unauthorized (authentication failed)
|
|
1641
|
+
- 403: Forbidden (insufficient permissions)
|
|
1642
|
+
- 404: Resource not found
|
|
1643
|
+
- 429: Rate limit exceeded
|
|
1644
|
+
- 500: Internal server error
|
|
1645
|
+
|
|
1646
|
+
NetworkError: When network connectivity fails
|
|
1647
|
+
|
|
1648
|
+
Example:
|
|
1649
|
+
# Basic usage
|
|
1650
|
+
client = Insight()
|
|
1651
|
+
|
|
1652
|
+
result = client.insightSearchPatterns(args=...)
|
|
1653
|
+
print(f"Result: {result}")
|
|
1654
|
+
|
|
1655
|
+
Use Cases:
|
|
1656
|
+
- Data Discovery: Locate datasets by name or properties
|
|
1657
|
+
- Impact Analysis: Find all assets related to a term
|
|
1658
|
+
- Compliance: Identify sensitive data across catalog
|
|
1659
|
+
"""
|
|
1660
|
+
self.method = 'GET'
|
|
1661
|
+
self.endpoint = ENDPOINTS['insight']['search_patterns']
|
|
1662
|
+
self.params = get_api_version_params('datamap')
|
|
1663
|
+
|
|
1664
|
+
@decorator
|
|
1665
|
+
def insightAssetPopularity(self, args):
|
|
1666
|
+
"""
|
|
1667
|
+
Update an existing insight.
|
|
1668
|
+
|
|
1669
|
+
Updates an existing insight with new values.
|
|
1670
|
+
Only specified fields are modified; others remain unchanged.
|
|
1671
|
+
|
|
1672
|
+
Args:
|
|
1673
|
+
args: Dictionary of operation arguments.
|
|
1674
|
+
Contains operation-specific parameters.
|
|
1675
|
+
See method implementation for details.
|
|
1676
|
+
|
|
1677
|
+
Returns:
|
|
1678
|
+
Dictionary containing updated insight:
|
|
1679
|
+
{
|
|
1680
|
+
'guid': str, # Unique identifier
|
|
1681
|
+
'attributes': dict, # Updated attributes
|
|
1682
|
+
'updateTime': int # Update timestamp
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
Raises:
|
|
1686
|
+
ValueError: When required parameters are missing or invalid:
|
|
1687
|
+
- Empty or None values for required fields
|
|
1688
|
+
- Invalid GUID format
|
|
1689
|
+
- Out-of-range values
|
|
1690
|
+
|
|
1691
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1692
|
+
- DefaultAzureCredential not configured
|
|
1693
|
+
- Insufficient permissions
|
|
1694
|
+
- Expired authentication token
|
|
1695
|
+
|
|
1696
|
+
HTTPError: When Purview API returns error:
|
|
1697
|
+
- 400: Bad request (invalid parameters)
|
|
1698
|
+
- 401: Unauthorized (authentication failed)
|
|
1699
|
+
- 403: Forbidden (insufficient permissions)
|
|
1700
|
+
- 404: Resource not found
|
|
1701
|
+
- 429: Rate limit exceeded
|
|
1702
|
+
- 500: Internal server error
|
|
1703
|
+
|
|
1704
|
+
NetworkError: When network connectivity fails
|
|
1705
|
+
|
|
1706
|
+
Example:
|
|
1707
|
+
# Basic usage
|
|
1708
|
+
client = Insight()
|
|
1709
|
+
|
|
1710
|
+
result = client.insightAssetPopularity(args=...)
|
|
1711
|
+
print(f"Result: {result}")
|
|
1712
|
+
|
|
1713
|
+
# With detailed data
|
|
1714
|
+
data = {
|
|
1715
|
+
'name': 'My Resource',
|
|
1716
|
+
'description': 'Resource description',
|
|
1717
|
+
'attributes': {
|
|
1718
|
+
'key1': 'value1',
|
|
1719
|
+
'key2': 'value2'
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
result = client.insightAssetPopularity(data)
|
|
1724
|
+
print(f"Created/Updated: {result['guid']}")
|
|
1725
|
+
|
|
1726
|
+
Use Cases:
|
|
1727
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
1728
|
+
- Ownership Changes: Reassign data ownership
|
|
1729
|
+
- Classification: Apply or modify data classifications
|
|
1730
|
+
"""
|
|
1731
|
+
self.method = 'GET'
|
|
1732
|
+
self.endpoint = ENDPOINTS['insight']['asset_popularity']
|
|
1733
|
+
self.params = get_api_version_params('datamap')
|
|
1734
|
+
|
|
1735
|
+
# ========== Collection and Access Analytics ==========
|
|
1736
|
+
|
|
1737
|
+
@decorator
|
|
1738
|
+
def insightCollectionActivity(self, args):
|
|
1739
|
+
"""
|
|
1740
|
+
Perform operation on resource.
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
Args:
|
|
1745
|
+
args: Dictionary of operation arguments.
|
|
1746
|
+
Contains operation-specific parameters.
|
|
1747
|
+
See method implementation for details.
|
|
1748
|
+
|
|
1749
|
+
Returns:
|
|
1750
|
+
[TODO: Specify return type and structure]
|
|
1751
|
+
[TODO: Document nested fields]
|
|
1752
|
+
|
|
1753
|
+
Raises:
|
|
1754
|
+
ValueError: When required parameters are missing or invalid:
|
|
1755
|
+
- Empty or None values for required fields
|
|
1756
|
+
- Invalid GUID format
|
|
1757
|
+
- Out-of-range values
|
|
1758
|
+
|
|
1759
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1760
|
+
- DefaultAzureCredential not configured
|
|
1761
|
+
- Insufficient permissions
|
|
1762
|
+
- Expired authentication token
|
|
1763
|
+
|
|
1764
|
+
HTTPError: When Purview API returns error:
|
|
1765
|
+
- 400: Bad request (invalid parameters)
|
|
1766
|
+
- 401: Unauthorized (authentication failed)
|
|
1767
|
+
- 403: Forbidden (insufficient permissions)
|
|
1768
|
+
- 404: Resource not found
|
|
1769
|
+
- 429: Rate limit exceeded
|
|
1770
|
+
- 500: Internal server error
|
|
1771
|
+
|
|
1772
|
+
NetworkError: When network connectivity fails
|
|
1773
|
+
|
|
1774
|
+
Example:
|
|
1775
|
+
# Basic usage
|
|
1776
|
+
client = CollectionsInsight()
|
|
1777
|
+
|
|
1778
|
+
result = client.insightCollectionActivity(args=...)
|
|
1779
|
+
print(f"Result: {result}")
|
|
1780
|
+
|
|
1781
|
+
Use Cases:
|
|
1782
|
+
- [TODO: Add specific use cases for this operation]
|
|
1783
|
+
- [TODO: Include business context]
|
|
1784
|
+
- [TODO: Explain when to use this method]
|
|
1785
|
+
"""
|
|
1786
|
+
self.method = 'GET'
|
|
1787
|
+
self.endpoint = ENDPOINTS['insight']['collection_activity']
|
|
1788
|
+
self.params = get_api_version_params('datamap')
|
|
1789
|
+
if args.get('--collectionName'):
|
|
1790
|
+
self.params['collectionName'] = args['--collectionName']
|
|
1791
|
+
|
|
1792
|
+
@decorator
|
|
1793
|
+
def insightAccessPatterns(self, args):
|
|
1794
|
+
"""
|
|
1795
|
+
Perform operation on resource.
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
Args:
|
|
1800
|
+
args: Dictionary of operation arguments.
|
|
1801
|
+
Contains operation-specific parameters.
|
|
1802
|
+
See method implementation for details.
|
|
1803
|
+
|
|
1804
|
+
Returns:
|
|
1805
|
+
[TODO: Specify return type and structure]
|
|
1806
|
+
[TODO: Document nested fields]
|
|
1807
|
+
|
|
1808
|
+
Raises:
|
|
1809
|
+
ValueError: When required parameters are missing or invalid:
|
|
1810
|
+
- Empty or None values for required fields
|
|
1811
|
+
- Invalid GUID format
|
|
1812
|
+
- Out-of-range values
|
|
1813
|
+
|
|
1814
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1815
|
+
- DefaultAzureCredential not configured
|
|
1816
|
+
- Insufficient permissions
|
|
1817
|
+
- Expired authentication token
|
|
1818
|
+
|
|
1819
|
+
HTTPError: When Purview API returns error:
|
|
1820
|
+
- 400: Bad request (invalid parameters)
|
|
1821
|
+
- 401: Unauthorized (authentication failed)
|
|
1822
|
+
- 403: Forbidden (insufficient permissions)
|
|
1823
|
+
- 404: Resource not found
|
|
1824
|
+
- 429: Rate limit exceeded
|
|
1825
|
+
- 500: Internal server error
|
|
1826
|
+
|
|
1827
|
+
NetworkError: When network connectivity fails
|
|
1828
|
+
|
|
1829
|
+
Example:
|
|
1830
|
+
# Basic usage
|
|
1831
|
+
client = Insight()
|
|
1832
|
+
|
|
1833
|
+
result = client.insightAccessPatterns(args=...)
|
|
1834
|
+
print(f"Result: {result}")
|
|
1835
|
+
|
|
1836
|
+
Use Cases:
|
|
1837
|
+
- [TODO: Add specific use cases for this operation]
|
|
1838
|
+
- [TODO: Include business context]
|
|
1839
|
+
- [TODO: Explain when to use this method]
|
|
1840
|
+
"""
|
|
1841
|
+
self.method = 'GET'
|
|
1842
|
+
self.endpoint = ENDPOINTS['insight']['access_patterns']
|
|
1843
|
+
self.params = get_api_version_params('datamap')
|
|
1844
|
+
|
|
1845
|
+
@decorator
|
|
1846
|
+
def insightPermissionUsage(self, args):
|
|
1847
|
+
"""
|
|
1848
|
+
Perform operation on resource.
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
Args:
|
|
1853
|
+
args: Dictionary of operation arguments.
|
|
1854
|
+
Contains operation-specific parameters.
|
|
1855
|
+
See method implementation for details.
|
|
1856
|
+
|
|
1857
|
+
Returns:
|
|
1858
|
+
[TODO: Specify return type and structure]
|
|
1859
|
+
[TODO: Document nested fields]
|
|
1860
|
+
|
|
1861
|
+
Raises:
|
|
1862
|
+
ValueError: When required parameters are missing or invalid:
|
|
1863
|
+
- Empty or None values for required fields
|
|
1864
|
+
- Invalid GUID format
|
|
1865
|
+
- Out-of-range values
|
|
1866
|
+
|
|
1867
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1868
|
+
- DefaultAzureCredential not configured
|
|
1869
|
+
- Insufficient permissions
|
|
1870
|
+
- Expired authentication token
|
|
1871
|
+
|
|
1872
|
+
HTTPError: When Purview API returns error:
|
|
1873
|
+
- 400: Bad request (invalid parameters)
|
|
1874
|
+
- 401: Unauthorized (authentication failed)
|
|
1875
|
+
- 403: Forbidden (insufficient permissions)
|
|
1876
|
+
- 404: Resource not found
|
|
1877
|
+
- 429: Rate limit exceeded
|
|
1878
|
+
- 500: Internal server error
|
|
1879
|
+
|
|
1880
|
+
NetworkError: When network connectivity fails
|
|
1881
|
+
|
|
1882
|
+
Example:
|
|
1883
|
+
# Basic usage
|
|
1884
|
+
client = Insight()
|
|
1885
|
+
|
|
1886
|
+
result = client.insightPermissionUsage(args=...)
|
|
1887
|
+
print(f"Result: {result}")
|
|
1888
|
+
|
|
1889
|
+
Use Cases:
|
|
1890
|
+
- [TODO: Add specific use cases for this operation]
|
|
1891
|
+
- [TODO: Include business context]
|
|
1892
|
+
- [TODO: Explain when to use this method]
|
|
1893
|
+
"""
|
|
1894
|
+
self.method = 'GET'
|
|
1895
|
+
self.endpoint = ENDPOINTS['insight']['permission_usage']
|
|
1896
|
+
self.params = get_api_version_params('datamap')
|
|
1897
|
+
|
|
1898
|
+
# ========== Custom Analytics and Reporting ==========
|
|
1899
|
+
|
|
1900
|
+
@decorator
|
|
1901
|
+
def insightCustomReport(self, args):
|
|
1902
|
+
"""
|
|
1903
|
+
Perform operation on resource.
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
Args:
|
|
1908
|
+
args: Dictionary of operation arguments.
|
|
1909
|
+
Contains operation-specific parameters.
|
|
1910
|
+
See method implementation for details.
|
|
1911
|
+
|
|
1912
|
+
Returns:
|
|
1913
|
+
[TODO: Specify return type and structure]
|
|
1914
|
+
[TODO: Document nested fields]
|
|
1915
|
+
|
|
1916
|
+
Raises:
|
|
1917
|
+
ValueError: When required parameters are missing or invalid:
|
|
1918
|
+
- Empty or None values for required fields
|
|
1919
|
+
- Invalid GUID format
|
|
1920
|
+
- Out-of-range values
|
|
1921
|
+
|
|
1922
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1923
|
+
- DefaultAzureCredential not configured
|
|
1924
|
+
- Insufficient permissions
|
|
1925
|
+
- Expired authentication token
|
|
1926
|
+
|
|
1927
|
+
HTTPError: When Purview API returns error:
|
|
1928
|
+
- 400: Bad request (invalid parameters)
|
|
1929
|
+
- 401: Unauthorized (authentication failed)
|
|
1930
|
+
- 403: Forbidden (insufficient permissions)
|
|
1931
|
+
- 404: Resource not found
|
|
1932
|
+
- 429: Rate limit exceeded
|
|
1933
|
+
- 500: Internal server error
|
|
1934
|
+
|
|
1935
|
+
NetworkError: When network connectivity fails
|
|
1936
|
+
|
|
1937
|
+
Example:
|
|
1938
|
+
# Basic usage
|
|
1939
|
+
client = Insight()
|
|
1940
|
+
|
|
1941
|
+
result = client.insightCustomReport(args=...)
|
|
1942
|
+
print(f"Result: {result}")
|
|
1943
|
+
|
|
1944
|
+
Use Cases:
|
|
1945
|
+
- [TODO: Add specific use cases for this operation]
|
|
1946
|
+
- [TODO: Include business context]
|
|
1947
|
+
- [TODO: Explain when to use this method]
|
|
1948
|
+
"""
|
|
1949
|
+
self.method = 'POST'
|
|
1950
|
+
self.endpoint = ENDPOINTS['insight']['custom_report']
|
|
1951
|
+
self.params = get_api_version_params('datamap')
|
|
1952
|
+
self.payload = get_json(args, '--payloadFile')
|
|
1953
|
+
|
|
1954
|
+
@decorator
|
|
1955
|
+
def insightScheduledReports(self, args):
|
|
1956
|
+
"""
|
|
1957
|
+
Perform operation on resource.
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
Args:
|
|
1962
|
+
args: Dictionary of operation arguments.
|
|
1963
|
+
Contains operation-specific parameters.
|
|
1964
|
+
See method implementation for details.
|
|
1965
|
+
|
|
1966
|
+
Returns:
|
|
1967
|
+
[TODO: Specify return type and structure]
|
|
1968
|
+
[TODO: Document nested fields]
|
|
1969
|
+
|
|
1970
|
+
Raises:
|
|
1971
|
+
ValueError: When required parameters are missing or invalid:
|
|
1972
|
+
- Empty or None values for required fields
|
|
1973
|
+
- Invalid GUID format
|
|
1974
|
+
- Out-of-range values
|
|
1975
|
+
|
|
1976
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
1977
|
+
- DefaultAzureCredential not configured
|
|
1978
|
+
- Insufficient permissions
|
|
1979
|
+
- Expired authentication token
|
|
1980
|
+
|
|
1981
|
+
HTTPError: When Purview API returns error:
|
|
1982
|
+
- 400: Bad request (invalid parameters)
|
|
1983
|
+
- 401: Unauthorized (authentication failed)
|
|
1984
|
+
- 403: Forbidden (insufficient permissions)
|
|
1985
|
+
- 404: Resource not found
|
|
1986
|
+
- 429: Rate limit exceeded
|
|
1987
|
+
- 500: Internal server error
|
|
1988
|
+
|
|
1989
|
+
NetworkError: When network connectivity fails
|
|
1990
|
+
|
|
1991
|
+
Example:
|
|
1992
|
+
# Basic usage
|
|
1993
|
+
client = Insight()
|
|
1994
|
+
|
|
1995
|
+
result = client.insightScheduledReports(args=...)
|
|
1996
|
+
print(f"Result: {result}")
|
|
1997
|
+
|
|
1998
|
+
Use Cases:
|
|
1999
|
+
- [TODO: Add specific use cases for this operation]
|
|
2000
|
+
- [TODO: Include business context]
|
|
2001
|
+
- [TODO: Explain when to use this method]
|
|
2002
|
+
"""
|
|
2003
|
+
self.method = 'GET'
|
|
2004
|
+
self.endpoint = ENDPOINTS['insight']['scheduled_reports']
|
|
2005
|
+
self.params = get_api_version_params('datamap')
|
|
2006
|
+
|
|
2007
|
+
@decorator
|
|
2008
|
+
def insightCreateScheduledReport(self, args):
|
|
2009
|
+
"""
|
|
2010
|
+
Create a new insight.
|
|
2011
|
+
|
|
2012
|
+
Creates a new insight in Microsoft Purview.
|
|
2013
|
+
Requires appropriate permissions and valid insight definition.
|
|
2014
|
+
|
|
2015
|
+
Args:
|
|
2016
|
+
args: Dictionary of operation arguments.
|
|
2017
|
+
Contains operation-specific parameters.
|
|
2018
|
+
See method implementation for details.
|
|
2019
|
+
|
|
2020
|
+
Returns:
|
|
2021
|
+
Dictionary containing created insight:
|
|
2022
|
+
{
|
|
2023
|
+
'guid': str, # Unique identifier
|
|
2024
|
+
'name': str, # Resource name
|
|
2025
|
+
'status': str, # Creation status
|
|
2026
|
+
'attributes': dict, # Resource attributes
|
|
2027
|
+
'createTime': int # Creation timestamp
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
Raises:
|
|
2031
|
+
ValueError: When required parameters are missing or invalid:
|
|
2032
|
+
- Empty or None values for required fields
|
|
2033
|
+
- Invalid GUID format
|
|
2034
|
+
- Out-of-range values
|
|
2035
|
+
|
|
2036
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2037
|
+
- DefaultAzureCredential not configured
|
|
2038
|
+
- Insufficient permissions
|
|
2039
|
+
- Expired authentication token
|
|
2040
|
+
|
|
2041
|
+
HTTPError: When Purview API returns error:
|
|
2042
|
+
- 400: Bad request (invalid parameters)
|
|
2043
|
+
- 401: Unauthorized (authentication failed)
|
|
2044
|
+
- 403: Forbidden (insufficient permissions)
|
|
2045
|
+
- 404: Resource not found
|
|
2046
|
+
- 409: Conflict (resource already exists)
|
|
2047
|
+
- 429: Rate limit exceeded
|
|
2048
|
+
- 500: Internal server error
|
|
2049
|
+
|
|
2050
|
+
NetworkError: When network connectivity fails
|
|
2051
|
+
|
|
2052
|
+
Example:
|
|
2053
|
+
# Basic usage
|
|
2054
|
+
client = Insight()
|
|
2055
|
+
|
|
2056
|
+
result = client.insightCreateScheduledReport(args=...)
|
|
2057
|
+
print(f"Result: {result}")
|
|
2058
|
+
|
|
2059
|
+
# With detailed data
|
|
2060
|
+
data = {
|
|
2061
|
+
'name': 'My Resource',
|
|
2062
|
+
'description': 'Resource description',
|
|
2063
|
+
'attributes': {
|
|
2064
|
+
'key1': 'value1',
|
|
2065
|
+
'key2': 'value2'
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
result = client.insightCreateScheduledReport(data)
|
|
2070
|
+
print(f"Created/Updated: {result['guid']}")
|
|
2071
|
+
|
|
2072
|
+
Use Cases:
|
|
2073
|
+
- Data Onboarding: Register new data sources in catalog
|
|
2074
|
+
- Metadata Management: Add descriptive metadata to assets
|
|
2075
|
+
- Automation: Programmatically populate catalog
|
|
2076
|
+
"""
|
|
2077
|
+
self.method = 'POST'
|
|
2078
|
+
self.endpoint = ENDPOINTS['insight']['create_scheduled_report']
|
|
2079
|
+
self.params = get_api_version_params('datamap')
|
|
2080
|
+
self.payload = get_json(args, '--payloadFile')
|
|
2081
|
+
|
|
2082
|
+
@decorator
|
|
2083
|
+
def insightExportData(self, args):
|
|
2084
|
+
"""
|
|
2085
|
+
Perform batch operation on resources.
|
|
2086
|
+
|
|
2087
|
+
Processes multiple resources in a single operation.
|
|
2088
|
+
More efficient than individual operations for bulk data.
|
|
2089
|
+
|
|
2090
|
+
Args:
|
|
2091
|
+
args: Dictionary of operation arguments.
|
|
2092
|
+
Contains operation-specific parameters.
|
|
2093
|
+
See method implementation for details.
|
|
2094
|
+
|
|
2095
|
+
Returns:
|
|
2096
|
+
Dictionary with batch operation results:
|
|
2097
|
+
{
|
|
2098
|
+
'succeeded': int, # Success count
|
|
2099
|
+
'failed': int, # Failure count
|
|
2100
|
+
'results': [...], # Per-item results
|
|
2101
|
+
'errors': [...] # Error details
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
Raises:
|
|
2105
|
+
ValueError: When required parameters are missing or invalid:
|
|
2106
|
+
- Empty or None values for required fields
|
|
2107
|
+
- Invalid GUID format
|
|
2108
|
+
- Out-of-range values
|
|
2109
|
+
|
|
2110
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2111
|
+
- DefaultAzureCredential not configured
|
|
2112
|
+
- Insufficient permissions
|
|
2113
|
+
- Expired authentication token
|
|
2114
|
+
|
|
2115
|
+
HTTPError: When Purview API returns error:
|
|
2116
|
+
- 400: Bad request (invalid parameters)
|
|
2117
|
+
- 401: Unauthorized (authentication failed)
|
|
2118
|
+
- 403: Forbidden (insufficient permissions)
|
|
2119
|
+
- 404: Resource not found
|
|
2120
|
+
- 429: Rate limit exceeded
|
|
2121
|
+
- 500: Internal server error
|
|
2122
|
+
|
|
2123
|
+
NetworkError: When network connectivity fails
|
|
2124
|
+
|
|
2125
|
+
Example:
|
|
2126
|
+
# Basic usage
|
|
2127
|
+
client = Insight()
|
|
2128
|
+
|
|
2129
|
+
result = client.insightExportData(args=...)
|
|
2130
|
+
print(f"Result: {result}")
|
|
2131
|
+
|
|
2132
|
+
Use Cases:
|
|
2133
|
+
- Bulk Import: Load large volumes of metadata
|
|
2134
|
+
- Migration: Transfer catalog from other systems
|
|
2135
|
+
- Mass Updates: Apply changes to many resources
|
|
2136
|
+
"""
|
|
2137
|
+
self.method = 'POST'
|
|
2138
|
+
self.endpoint = ENDPOINTS['insight']['export_data']
|
|
2139
|
+
self.params = get_api_version_params('datamap')
|
|
2140
|
+
self.payload = {
|
|
2141
|
+
'reportType': args.get('--reportType'),
|
|
2142
|
+
'format': args.get('--format', 'csv'),
|
|
2143
|
+
'filters': get_json(args, '--filtersFile') if args.get('--filtersFile') else {}
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
# ========== Advanced Analytics ==========
|
|
2147
|
+
|
|
2148
|
+
@decorator
|
|
2149
|
+
def insightDataGrowthTrends(self, args):
|
|
2150
|
+
"""
|
|
2151
|
+
Perform operation on resource.
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
Args:
|
|
2156
|
+
args: Dictionary of operation arguments.
|
|
2157
|
+
Contains operation-specific parameters.
|
|
2158
|
+
See method implementation for details.
|
|
2159
|
+
|
|
2160
|
+
Returns:
|
|
2161
|
+
[TODO: Specify return type and structure]
|
|
2162
|
+
[TODO: Document nested fields]
|
|
2163
|
+
|
|
2164
|
+
Raises:
|
|
2165
|
+
ValueError: When required parameters are missing or invalid:
|
|
2166
|
+
- Empty or None values for required fields
|
|
2167
|
+
- Invalid GUID format
|
|
2168
|
+
- Out-of-range values
|
|
2169
|
+
|
|
2170
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2171
|
+
- DefaultAzureCredential not configured
|
|
2172
|
+
- Insufficient permissions
|
|
2173
|
+
- Expired authentication token
|
|
2174
|
+
|
|
2175
|
+
HTTPError: When Purview API returns error:
|
|
2176
|
+
- 400: Bad request (invalid parameters)
|
|
2177
|
+
- 401: Unauthorized (authentication failed)
|
|
2178
|
+
- 403: Forbidden (insufficient permissions)
|
|
2179
|
+
- 404: Resource not found
|
|
2180
|
+
- 429: Rate limit exceeded
|
|
2181
|
+
- 500: Internal server error
|
|
2182
|
+
|
|
2183
|
+
NetworkError: When network connectivity fails
|
|
2184
|
+
|
|
2185
|
+
Example:
|
|
2186
|
+
# Basic usage
|
|
2187
|
+
client = Insight()
|
|
2188
|
+
|
|
2189
|
+
result = client.insightDataGrowthTrends(args=...)
|
|
2190
|
+
print(f"Result: {result}")
|
|
2191
|
+
|
|
2192
|
+
Use Cases:
|
|
2193
|
+
- [TODO: Add specific use cases for this operation]
|
|
2194
|
+
- [TODO: Include business context]
|
|
2195
|
+
- [TODO: Explain when to use this method]
|
|
2196
|
+
"""
|
|
2197
|
+
self.method = 'GET'
|
|
2198
|
+
self.endpoint = ENDPOINTS['insight']['data_growth_trends']
|
|
2199
|
+
self.params = get_api_version_params('datamap')
|
|
2200
|
+
if args.get('--timeRange'):
|
|
2201
|
+
self.params['timeRange'] = args['--timeRange']
|
|
2202
|
+
|
|
2203
|
+
@decorator
|
|
2204
|
+
def insightComplianceMetrics(self, args):
|
|
2205
|
+
"""
|
|
2206
|
+
Perform operation on resource.
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
Args:
|
|
2211
|
+
args: Dictionary of operation arguments.
|
|
2212
|
+
Contains operation-specific parameters.
|
|
2213
|
+
See method implementation for details.
|
|
2214
|
+
|
|
2215
|
+
Returns:
|
|
2216
|
+
[TODO: Specify return type and structure]
|
|
2217
|
+
[TODO: Document nested fields]
|
|
2218
|
+
|
|
2219
|
+
Raises:
|
|
2220
|
+
ValueError: When required parameters are missing or invalid:
|
|
2221
|
+
- Empty or None values for required fields
|
|
2222
|
+
- Invalid GUID format
|
|
2223
|
+
- Out-of-range values
|
|
2224
|
+
|
|
2225
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2226
|
+
- DefaultAzureCredential not configured
|
|
2227
|
+
- Insufficient permissions
|
|
2228
|
+
- Expired authentication token
|
|
2229
|
+
|
|
2230
|
+
HTTPError: When Purview API returns error:
|
|
2231
|
+
- 400: Bad request (invalid parameters)
|
|
2232
|
+
- 401: Unauthorized (authentication failed)
|
|
2233
|
+
- 403: Forbidden (insufficient permissions)
|
|
2234
|
+
- 404: Resource not found
|
|
2235
|
+
- 429: Rate limit exceeded
|
|
2236
|
+
- 500: Internal server error
|
|
2237
|
+
|
|
2238
|
+
NetworkError: When network connectivity fails
|
|
2239
|
+
|
|
2240
|
+
Example:
|
|
2241
|
+
# Basic usage
|
|
2242
|
+
client = Insight()
|
|
2243
|
+
|
|
2244
|
+
result = client.insightComplianceMetrics(args=...)
|
|
2245
|
+
print(f"Result: {result}")
|
|
2246
|
+
|
|
2247
|
+
Use Cases:
|
|
2248
|
+
- [TODO: Add specific use cases for this operation]
|
|
2249
|
+
- [TODO: Include business context]
|
|
2250
|
+
- [TODO: Explain when to use this method]
|
|
2251
|
+
"""
|
|
2252
|
+
self.method = 'GET'
|
|
2253
|
+
self.endpoint = ENDPOINTS['insight']['compliance_metrics']
|
|
2254
|
+
self.params = get_api_version_params('datamap')
|
|
2255
|
+
|
|
2256
|
+
@decorator
|
|
2257
|
+
def insightDataStewardshipHealth(self, args):
|
|
2258
|
+
"""
|
|
2259
|
+
Perform operation on resource.
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
Args:
|
|
2264
|
+
args: Dictionary of operation arguments.
|
|
2265
|
+
Contains operation-specific parameters.
|
|
2266
|
+
See method implementation for details.
|
|
2267
|
+
|
|
2268
|
+
Returns:
|
|
2269
|
+
[TODO: Specify return type and structure]
|
|
2270
|
+
[TODO: Document nested fields]
|
|
2271
|
+
|
|
2272
|
+
Raises:
|
|
2273
|
+
ValueError: When required parameters are missing or invalid:
|
|
2274
|
+
- Empty or None values for required fields
|
|
2275
|
+
- Invalid GUID format
|
|
2276
|
+
- Out-of-range values
|
|
2277
|
+
|
|
2278
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2279
|
+
- DefaultAzureCredential not configured
|
|
2280
|
+
- Insufficient permissions
|
|
2281
|
+
- Expired authentication token
|
|
2282
|
+
|
|
2283
|
+
HTTPError: When Purview API returns error:
|
|
2284
|
+
- 400: Bad request (invalid parameters)
|
|
2285
|
+
- 401: Unauthorized (authentication failed)
|
|
2286
|
+
- 403: Forbidden (insufficient permissions)
|
|
2287
|
+
- 404: Resource not found
|
|
2288
|
+
- 429: Rate limit exceeded
|
|
2289
|
+
- 500: Internal server error
|
|
2290
|
+
|
|
2291
|
+
NetworkError: When network connectivity fails
|
|
2292
|
+
|
|
2293
|
+
Example:
|
|
2294
|
+
# Basic usage
|
|
2295
|
+
client = Insight()
|
|
2296
|
+
|
|
2297
|
+
result = client.insightDataStewardshipHealth(args=...)
|
|
2298
|
+
print(f"Result: {result}")
|
|
2299
|
+
|
|
2300
|
+
Use Cases:
|
|
2301
|
+
- [TODO: Add specific use cases for this operation]
|
|
2302
|
+
- [TODO: Include business context]
|
|
2303
|
+
- [TODO: Explain when to use this method]
|
|
2304
|
+
"""
|
|
2305
|
+
self.method = 'GET'
|
|
2306
|
+
self.endpoint = ENDPOINTS['insight']['data_stewardship_health']
|
|
2307
|
+
self.params = get_api_version_params('datamap')
|
|
2308
|
+
|
|
2309
|
+
@decorator
|
|
2310
|
+
def insightAssetHealthScore(self, args):
|
|
2311
|
+
"""
|
|
2312
|
+
Update an existing insight.
|
|
2313
|
+
|
|
2314
|
+
Updates an existing insight with new values.
|
|
2315
|
+
Only specified fields are modified; others remain unchanged.
|
|
2316
|
+
|
|
2317
|
+
Args:
|
|
2318
|
+
args: Dictionary of operation arguments.
|
|
2319
|
+
Contains operation-specific parameters.
|
|
2320
|
+
See method implementation for details.
|
|
2321
|
+
|
|
2322
|
+
Returns:
|
|
2323
|
+
Dictionary containing updated insight:
|
|
2324
|
+
{
|
|
2325
|
+
'guid': str, # Unique identifier
|
|
2326
|
+
'attributes': dict, # Updated attributes
|
|
2327
|
+
'updateTime': int # Update timestamp
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
Raises:
|
|
2331
|
+
ValueError: When required parameters are missing or invalid:
|
|
2332
|
+
- Empty or None values for required fields
|
|
2333
|
+
- Invalid GUID format
|
|
2334
|
+
- Out-of-range values
|
|
2335
|
+
|
|
2336
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2337
|
+
- DefaultAzureCredential not configured
|
|
2338
|
+
- Insufficient permissions
|
|
2339
|
+
- Expired authentication token
|
|
2340
|
+
|
|
2341
|
+
HTTPError: When Purview API returns error:
|
|
2342
|
+
- 400: Bad request (invalid parameters)
|
|
2343
|
+
- 401: Unauthorized (authentication failed)
|
|
2344
|
+
- 403: Forbidden (insufficient permissions)
|
|
2345
|
+
- 404: Resource not found
|
|
2346
|
+
- 429: Rate limit exceeded
|
|
2347
|
+
- 500: Internal server error
|
|
2348
|
+
|
|
2349
|
+
NetworkError: When network connectivity fails
|
|
2350
|
+
|
|
2351
|
+
Example:
|
|
2352
|
+
# Basic usage
|
|
2353
|
+
client = Insight()
|
|
2354
|
+
|
|
2355
|
+
result = client.insightAssetHealthScore(args=...)
|
|
2356
|
+
print(f"Result: {result}")
|
|
2357
|
+
|
|
2358
|
+
# With detailed data
|
|
2359
|
+
data = {
|
|
2360
|
+
'name': 'My Resource',
|
|
2361
|
+
'description': 'Resource description',
|
|
2362
|
+
'attributes': {
|
|
2363
|
+
'key1': 'value1',
|
|
2364
|
+
'key2': 'value2'
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
result = client.insightAssetHealthScore(data)
|
|
2369
|
+
print(f"Created/Updated: {result['guid']}")
|
|
2370
|
+
|
|
2371
|
+
Use Cases:
|
|
2372
|
+
- Metadata Enrichment: Update descriptions and tags
|
|
2373
|
+
- Ownership Changes: Reassign data ownership
|
|
2374
|
+
- Classification: Apply or modify data classifications
|
|
2375
|
+
"""
|
|
2376
|
+
self.method = 'GET'
|
|
2377
|
+
self.endpoint = ENDPOINTS['insight']['asset_health_score']
|
|
2378
|
+
self.params = get_api_version_params('datamap')
|
|
2379
|
+
if args.get('--assetType'):
|
|
2380
|
+
self.params['assetType'] = args['--assetType']
|
|
2381
|
+
|
|
2382
|
+
# ========== Performance and Optimization ==========
|
|
2383
|
+
|
|
2384
|
+
@decorator
|
|
2385
|
+
def insightSystemPerformance(self, args):
|
|
2386
|
+
"""
|
|
2387
|
+
Perform operation on resource.
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
Args:
|
|
2392
|
+
args: Dictionary of operation arguments.
|
|
2393
|
+
Contains operation-specific parameters.
|
|
2394
|
+
See method implementation for details.
|
|
2395
|
+
|
|
2396
|
+
Returns:
|
|
2397
|
+
[TODO: Specify return type and structure]
|
|
2398
|
+
[TODO: Document nested fields]
|
|
2399
|
+
|
|
2400
|
+
Raises:
|
|
2401
|
+
ValueError: When required parameters are missing or invalid:
|
|
2402
|
+
- Empty or None values for required fields
|
|
2403
|
+
- Invalid GUID format
|
|
2404
|
+
- Out-of-range values
|
|
2405
|
+
|
|
2406
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2407
|
+
- DefaultAzureCredential not configured
|
|
2408
|
+
- Insufficient permissions
|
|
2409
|
+
- Expired authentication token
|
|
2410
|
+
|
|
2411
|
+
HTTPError: When Purview API returns error:
|
|
2412
|
+
- 400: Bad request (invalid parameters)
|
|
2413
|
+
- 401: Unauthorized (authentication failed)
|
|
2414
|
+
- 403: Forbidden (insufficient permissions)
|
|
2415
|
+
- 404: Resource not found
|
|
2416
|
+
- 429: Rate limit exceeded
|
|
2417
|
+
- 500: Internal server error
|
|
2418
|
+
|
|
2419
|
+
NetworkError: When network connectivity fails
|
|
2420
|
+
|
|
2421
|
+
Example:
|
|
2422
|
+
# Basic usage
|
|
2423
|
+
client = Insight()
|
|
2424
|
+
|
|
2425
|
+
result = client.insightSystemPerformance(args=...)
|
|
2426
|
+
print(f"Result: {result}")
|
|
2427
|
+
|
|
2428
|
+
Use Cases:
|
|
2429
|
+
- [TODO: Add specific use cases for this operation]
|
|
2430
|
+
- [TODO: Include business context]
|
|
2431
|
+
- [TODO: Explain when to use this method]
|
|
2432
|
+
"""
|
|
2433
|
+
self.method = 'GET'
|
|
2434
|
+
self.endpoint = ENDPOINTS['insight']['system_performance']
|
|
2435
|
+
self.params = get_api_version_params('datamap')
|
|
2436
|
+
|
|
2437
|
+
@decorator
|
|
2438
|
+
def insightResourceUtilization(self, args):
|
|
2439
|
+
"""
|
|
2440
|
+
Perform operation on resource.
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
|
|
2444
|
+
Args:
|
|
2445
|
+
args: Dictionary of operation arguments.
|
|
2446
|
+
Contains operation-specific parameters.
|
|
2447
|
+
See method implementation for details.
|
|
2448
|
+
|
|
2449
|
+
Returns:
|
|
2450
|
+
[TODO: Specify return type and structure]
|
|
2451
|
+
[TODO: Document nested fields]
|
|
2452
|
+
|
|
2453
|
+
Raises:
|
|
2454
|
+
ValueError: When required parameters are missing or invalid:
|
|
2455
|
+
- Empty or None values for required fields
|
|
2456
|
+
- Invalid GUID format
|
|
2457
|
+
- Out-of-range values
|
|
2458
|
+
|
|
2459
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2460
|
+
- DefaultAzureCredential not configured
|
|
2461
|
+
- Insufficient permissions
|
|
2462
|
+
- Expired authentication token
|
|
2463
|
+
|
|
2464
|
+
HTTPError: When Purview API returns error:
|
|
2465
|
+
- 400: Bad request (invalid parameters)
|
|
2466
|
+
- 401: Unauthorized (authentication failed)
|
|
2467
|
+
- 403: Forbidden (insufficient permissions)
|
|
2468
|
+
- 404: Resource not found
|
|
2469
|
+
- 429: Rate limit exceeded
|
|
2470
|
+
- 500: Internal server error
|
|
2471
|
+
|
|
2472
|
+
NetworkError: When network connectivity fails
|
|
2473
|
+
|
|
2474
|
+
Example:
|
|
2475
|
+
# Basic usage
|
|
2476
|
+
client = Insight()
|
|
2477
|
+
|
|
2478
|
+
result = client.insightResourceUtilization(args=...)
|
|
2479
|
+
print(f"Result: {result}")
|
|
2480
|
+
|
|
2481
|
+
Use Cases:
|
|
2482
|
+
- [TODO: Add specific use cases for this operation]
|
|
2483
|
+
- [TODO: Include business context]
|
|
2484
|
+
- [TODO: Explain when to use this method]
|
|
2485
|
+
"""
|
|
2486
|
+
self.method = 'GET'
|
|
2487
|
+
self.endpoint = ENDPOINTS['insight']['resource_utilization']
|
|
2488
|
+
self.params = get_api_version_params('datamap')
|
|
2489
|
+
|
|
2490
|
+
@decorator
|
|
2491
|
+
def insightOptimizationRecommendations(self, args):
|
|
2492
|
+
"""
|
|
2493
|
+
Perform operation on resource.
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
Args:
|
|
2498
|
+
args: Dictionary of operation arguments.
|
|
2499
|
+
Contains operation-specific parameters.
|
|
2500
|
+
See method implementation for details.
|
|
2501
|
+
|
|
2502
|
+
Returns:
|
|
2503
|
+
[TODO: Specify return type and structure]
|
|
2504
|
+
[TODO: Document nested fields]
|
|
2505
|
+
|
|
2506
|
+
Raises:
|
|
2507
|
+
ValueError: When required parameters are missing or invalid:
|
|
2508
|
+
- Empty or None values for required fields
|
|
2509
|
+
- Invalid GUID format
|
|
2510
|
+
- Out-of-range values
|
|
2511
|
+
|
|
2512
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2513
|
+
- DefaultAzureCredential not configured
|
|
2514
|
+
- Insufficient permissions
|
|
2515
|
+
- Expired authentication token
|
|
2516
|
+
|
|
2517
|
+
HTTPError: When Purview API returns error:
|
|
2518
|
+
- 400: Bad request (invalid parameters)
|
|
2519
|
+
- 401: Unauthorized (authentication failed)
|
|
2520
|
+
- 403: Forbidden (insufficient permissions)
|
|
2521
|
+
- 404: Resource not found
|
|
2522
|
+
- 429: Rate limit exceeded
|
|
2523
|
+
- 500: Internal server error
|
|
2524
|
+
|
|
2525
|
+
NetworkError: When network connectivity fails
|
|
2526
|
+
|
|
2527
|
+
Example:
|
|
2528
|
+
# Basic usage
|
|
2529
|
+
client = Insight()
|
|
2530
|
+
|
|
2531
|
+
result = client.insightOptimizationRecommendations(args=...)
|
|
2532
|
+
print(f"Result: {result}")
|
|
2533
|
+
|
|
2534
|
+
Use Cases:
|
|
2535
|
+
- [TODO: Add specific use cases for this operation]
|
|
2536
|
+
- [TODO: Include business context]
|
|
2537
|
+
- [TODO: Explain when to use this method]
|
|
2538
|
+
"""
|
|
2539
|
+
self.method = 'GET'
|
|
2540
|
+
self.endpoint = ENDPOINTS['insight']['optimization_recommendations']
|
|
2541
|
+
self.params = get_api_version_params('datamap')
|
|
2542
|
+
|
|
2543
|
+
# ========== Real-time Analytics ==========
|
|
2544
|
+
|
|
2545
|
+
@decorator
|
|
2546
|
+
def insightRealTimeMetrics(self, args):
|
|
2547
|
+
"""
|
|
2548
|
+
Perform operation on resource.
|
|
2549
|
+
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
Args:
|
|
2553
|
+
args: Dictionary of operation arguments.
|
|
2554
|
+
Contains operation-specific parameters.
|
|
2555
|
+
See method implementation for details.
|
|
2556
|
+
|
|
2557
|
+
Returns:
|
|
2558
|
+
[TODO: Specify return type and structure]
|
|
2559
|
+
[TODO: Document nested fields]
|
|
2560
|
+
|
|
2561
|
+
Raises:
|
|
2562
|
+
ValueError: When required parameters are missing or invalid:
|
|
2563
|
+
- Empty or None values for required fields
|
|
2564
|
+
- Invalid GUID format
|
|
2565
|
+
- Out-of-range values
|
|
2566
|
+
|
|
2567
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2568
|
+
- DefaultAzureCredential not configured
|
|
2569
|
+
- Insufficient permissions
|
|
2570
|
+
- Expired authentication token
|
|
2571
|
+
|
|
2572
|
+
HTTPError: When Purview API returns error:
|
|
2573
|
+
- 400: Bad request (invalid parameters)
|
|
2574
|
+
- 401: Unauthorized (authentication failed)
|
|
2575
|
+
- 403: Forbidden (insufficient permissions)
|
|
2576
|
+
- 404: Resource not found
|
|
2577
|
+
- 429: Rate limit exceeded
|
|
2578
|
+
- 500: Internal server error
|
|
2579
|
+
|
|
2580
|
+
NetworkError: When network connectivity fails
|
|
2581
|
+
|
|
2582
|
+
Example:
|
|
2583
|
+
# Basic usage
|
|
2584
|
+
client = Insight()
|
|
2585
|
+
|
|
2586
|
+
result = client.insightRealTimeMetrics(args=...)
|
|
2587
|
+
print(f"Result: {result}")
|
|
2588
|
+
|
|
2589
|
+
Use Cases:
|
|
2590
|
+
- [TODO: Add specific use cases for this operation]
|
|
2591
|
+
- [TODO: Include business context]
|
|
2592
|
+
- [TODO: Explain when to use this method]
|
|
2593
|
+
"""
|
|
2594
|
+
self.method = 'GET'
|
|
2595
|
+
self.endpoint = ENDPOINTS['insight']['real_time_metrics']
|
|
2596
|
+
self.params = get_api_version_params('datamap')
|
|
2597
|
+
|
|
2598
|
+
@decorator
|
|
2599
|
+
def insightLiveActivityFeed(self, args):
|
|
2600
|
+
"""
|
|
2601
|
+
Perform operation on resource.
|
|
2602
|
+
|
|
2603
|
+
|
|
2604
|
+
|
|
2605
|
+
Args:
|
|
2606
|
+
args: Dictionary of operation arguments.
|
|
2607
|
+
Contains operation-specific parameters.
|
|
2608
|
+
See method implementation for details.
|
|
2609
|
+
|
|
2610
|
+
Returns:
|
|
2611
|
+
[TODO: Specify return type and structure]
|
|
2612
|
+
[TODO: Document nested fields]
|
|
2613
|
+
|
|
2614
|
+
Raises:
|
|
2615
|
+
ValueError: When required parameters are missing or invalid:
|
|
2616
|
+
- Empty or None values for required fields
|
|
2617
|
+
- Invalid GUID format
|
|
2618
|
+
- Out-of-range values
|
|
2619
|
+
|
|
2620
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2621
|
+
- DefaultAzureCredential not configured
|
|
2622
|
+
- Insufficient permissions
|
|
2623
|
+
- Expired authentication token
|
|
2624
|
+
|
|
2625
|
+
HTTPError: When Purview API returns error:
|
|
2626
|
+
- 400: Bad request (invalid parameters)
|
|
2627
|
+
- 401: Unauthorized (authentication failed)
|
|
2628
|
+
- 403: Forbidden (insufficient permissions)
|
|
2629
|
+
- 404: Resource not found
|
|
2630
|
+
- 429: Rate limit exceeded
|
|
2631
|
+
- 500: Internal server error
|
|
2632
|
+
|
|
2633
|
+
NetworkError: When network connectivity fails
|
|
2634
|
+
|
|
2635
|
+
Example:
|
|
2636
|
+
# Basic usage
|
|
2637
|
+
client = Insight()
|
|
2638
|
+
|
|
2639
|
+
result = client.insightLiveActivityFeed(args=...)
|
|
2640
|
+
print(f"Result: {result}")
|
|
2641
|
+
|
|
2642
|
+
Use Cases:
|
|
2643
|
+
- [TODO: Add specific use cases for this operation]
|
|
2644
|
+
- [TODO: Include business context]
|
|
2645
|
+
- [TODO: Explain when to use this method]
|
|
2646
|
+
"""
|
|
2647
|
+
self.method = 'GET'
|
|
2648
|
+
self.endpoint = ENDPOINTS['insight']['live_activity_feed']
|
|
2649
|
+
self.params = get_api_version_params('datamap')
|
|
2650
|
+
if args.get('--limit'):
|
|
2651
|
+
self.params['limit'] = args['--limit']
|
|
2652
|
+
|
|
2653
|
+
@decorator
|
|
2654
|
+
def insightActiveScans(self, args):
|
|
2655
|
+
"""
|
|
2656
|
+
Perform operation on resource.
|
|
2657
|
+
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
Args:
|
|
2661
|
+
args: Dictionary of operation arguments.
|
|
2662
|
+
Contains operation-specific parameters.
|
|
2663
|
+
See method implementation for details.
|
|
2664
|
+
|
|
2665
|
+
Returns:
|
|
2666
|
+
[TODO: Specify return type and structure]
|
|
2667
|
+
[TODO: Document nested fields]
|
|
2668
|
+
|
|
2669
|
+
Raises:
|
|
2670
|
+
ValueError: When required parameters are missing or invalid:
|
|
2671
|
+
- Empty or None values for required fields
|
|
2672
|
+
- Invalid GUID format
|
|
2673
|
+
- Out-of-range values
|
|
2674
|
+
|
|
2675
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2676
|
+
- DefaultAzureCredential not configured
|
|
2677
|
+
- Insufficient permissions
|
|
2678
|
+
- Expired authentication token
|
|
2679
|
+
|
|
2680
|
+
HTTPError: When Purview API returns error:
|
|
2681
|
+
- 400: Bad request (invalid parameters)
|
|
2682
|
+
- 401: Unauthorized (authentication failed)
|
|
2683
|
+
- 403: Forbidden (insufficient permissions)
|
|
2684
|
+
- 404: Resource not found
|
|
2685
|
+
- 429: Rate limit exceeded
|
|
2686
|
+
- 500: Internal server error
|
|
2687
|
+
|
|
2688
|
+
NetworkError: When network connectivity fails
|
|
2689
|
+
|
|
2690
|
+
Example:
|
|
2691
|
+
# Basic usage
|
|
2692
|
+
client = Insight()
|
|
2693
|
+
|
|
2694
|
+
result = client.insightActiveScans(args=...)
|
|
2695
|
+
print(f"Result: {result}")
|
|
2696
|
+
|
|
2697
|
+
Use Cases:
|
|
2698
|
+
- [TODO: Add specific use cases for this operation]
|
|
2699
|
+
- [TODO: Include business context]
|
|
2700
|
+
- [TODO: Explain when to use this method]
|
|
2701
|
+
"""
|
|
2702
|
+
self.method = 'GET'
|
|
2703
|
+
self.endpoint = ENDPOINTS['insight']['active_scans']
|
|
2704
|
+
self.params = get_api_version_params('datamap')
|
|
2705
|
+
|
|
2706
|
+
# ========== Historical Analysis ==========
|
|
2707
|
+
|
|
2708
|
+
@decorator
|
|
2709
|
+
def insightHistoricalTrends(self, args):
|
|
2710
|
+
"""
|
|
2711
|
+
Perform operation on resource.
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
Args:
|
|
2716
|
+
args: Dictionary of operation arguments.
|
|
2717
|
+
Contains operation-specific parameters.
|
|
2718
|
+
See method implementation for details.
|
|
2719
|
+
|
|
2720
|
+
Returns:
|
|
2721
|
+
[TODO: Specify return type and structure]
|
|
2722
|
+
[TODO: Document nested fields]
|
|
2723
|
+
|
|
2724
|
+
Raises:
|
|
2725
|
+
ValueError: When required parameters are missing or invalid:
|
|
2726
|
+
- Empty or None values for required fields
|
|
2727
|
+
- Invalid GUID format
|
|
2728
|
+
- Out-of-range values
|
|
2729
|
+
|
|
2730
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2731
|
+
- DefaultAzureCredential not configured
|
|
2732
|
+
- Insufficient permissions
|
|
2733
|
+
- Expired authentication token
|
|
2734
|
+
|
|
2735
|
+
HTTPError: When Purview API returns error:
|
|
2736
|
+
- 400: Bad request (invalid parameters)
|
|
2737
|
+
- 401: Unauthorized (authentication failed)
|
|
2738
|
+
- 403: Forbidden (insufficient permissions)
|
|
2739
|
+
- 404: Resource not found
|
|
2740
|
+
- 429: Rate limit exceeded
|
|
2741
|
+
- 500: Internal server error
|
|
2742
|
+
|
|
2743
|
+
NetworkError: When network connectivity fails
|
|
2744
|
+
|
|
2745
|
+
Example:
|
|
2746
|
+
# Basic usage
|
|
2747
|
+
client = Insight()
|
|
2748
|
+
|
|
2749
|
+
result = client.insightHistoricalTrends(args=...)
|
|
2750
|
+
print(f"Result: {result}")
|
|
2751
|
+
|
|
2752
|
+
Use Cases:
|
|
2753
|
+
- [TODO: Add specific use cases for this operation]
|
|
2754
|
+
- [TODO: Include business context]
|
|
2755
|
+
- [TODO: Explain when to use this method]
|
|
2756
|
+
"""
|
|
2757
|
+
self.method = 'GET'
|
|
2758
|
+
self.endpoint = ENDPOINTS['insight']['historical_trends']
|
|
2759
|
+
self.params = get_api_version_params('datamap')
|
|
2760
|
+
if args.get('--startDate'):
|
|
2761
|
+
self.params['startDate'] = args['--startDate']
|
|
2762
|
+
if args.get('--endDate'):
|
|
2763
|
+
self.params['endDate'] = args['--endDate']
|
|
2764
|
+
if args.get('--granularity'):
|
|
2765
|
+
self.params['granularity'] = args['--granularity']
|
|
2766
|
+
|
|
2767
|
+
@decorator
|
|
2768
|
+
def insightDataArchival(self, args):
|
|
2769
|
+
"""
|
|
2770
|
+
Perform operation on resource.
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
Args:
|
|
2775
|
+
args: Dictionary of operation arguments.
|
|
2776
|
+
Contains operation-specific parameters.
|
|
2777
|
+
See method implementation for details.
|
|
2778
|
+
|
|
2779
|
+
Returns:
|
|
2780
|
+
[TODO: Specify return type and structure]
|
|
2781
|
+
[TODO: Document nested fields]
|
|
2782
|
+
|
|
2783
|
+
Raises:
|
|
2784
|
+
ValueError: When required parameters are missing or invalid:
|
|
2785
|
+
- Empty or None values for required fields
|
|
2786
|
+
- Invalid GUID format
|
|
2787
|
+
- Out-of-range values
|
|
2788
|
+
|
|
2789
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2790
|
+
- DefaultAzureCredential not configured
|
|
2791
|
+
- Insufficient permissions
|
|
2792
|
+
- Expired authentication token
|
|
2793
|
+
|
|
2794
|
+
HTTPError: When Purview API returns error:
|
|
2795
|
+
- 400: Bad request (invalid parameters)
|
|
2796
|
+
- 401: Unauthorized (authentication failed)
|
|
2797
|
+
- 403: Forbidden (insufficient permissions)
|
|
2798
|
+
- 404: Resource not found
|
|
2799
|
+
- 429: Rate limit exceeded
|
|
2800
|
+
- 500: Internal server error
|
|
2801
|
+
|
|
2802
|
+
NetworkError: When network connectivity fails
|
|
2803
|
+
|
|
2804
|
+
Example:
|
|
2805
|
+
# Basic usage
|
|
2806
|
+
client = Insight()
|
|
2807
|
+
|
|
2808
|
+
result = client.insightDataArchival(args=...)
|
|
2809
|
+
print(f"Result: {result}")
|
|
2810
|
+
|
|
2811
|
+
Use Cases:
|
|
2812
|
+
- [TODO: Add specific use cases for this operation]
|
|
2813
|
+
- [TODO: Include business context]
|
|
2814
|
+
- [TODO: Explain when to use this method]
|
|
2815
|
+
"""
|
|
2816
|
+
self.method = 'GET'
|
|
2817
|
+
self.endpoint = ENDPOINTS['insight']['data_archival']
|
|
2818
|
+
self.params = get_api_version_params('datamap')
|
|
2819
|
+
|
|
2820
|
+
@decorator
|
|
2821
|
+
def insightVersionHistory(self, args):
|
|
2822
|
+
"""
|
|
2823
|
+
Perform operation on resource.
|
|
2824
|
+
|
|
2825
|
+
|
|
2826
|
+
|
|
2827
|
+
Args:
|
|
2828
|
+
args: Dictionary of operation arguments.
|
|
2829
|
+
Contains operation-specific parameters.
|
|
2830
|
+
See method implementation for details.
|
|
2831
|
+
|
|
2832
|
+
Returns:
|
|
2833
|
+
[TODO: Specify return type and structure]
|
|
2834
|
+
[TODO: Document nested fields]
|
|
2835
|
+
|
|
2836
|
+
Raises:
|
|
2837
|
+
ValueError: When required parameters are missing or invalid:
|
|
2838
|
+
- Empty or None values for required fields
|
|
2839
|
+
- Invalid GUID format
|
|
2840
|
+
- Out-of-range values
|
|
2841
|
+
|
|
2842
|
+
AuthenticationError: When Azure credentials are invalid:
|
|
2843
|
+
- DefaultAzureCredential not configured
|
|
2844
|
+
- Insufficient permissions
|
|
2845
|
+
- Expired authentication token
|
|
2846
|
+
|
|
2847
|
+
HTTPError: When Purview API returns error:
|
|
2848
|
+
- 400: Bad request (invalid parameters)
|
|
2849
|
+
- 401: Unauthorized (authentication failed)
|
|
2850
|
+
- 403: Forbidden (insufficient permissions)
|
|
2851
|
+
- 404: Resource not found
|
|
2852
|
+
- 429: Rate limit exceeded
|
|
2853
|
+
- 500: Internal server error
|
|
2854
|
+
|
|
2855
|
+
NetworkError: When network connectivity fails
|
|
2856
|
+
|
|
2857
|
+
Example:
|
|
2858
|
+
# Basic usage
|
|
2859
|
+
client = Insight()
|
|
2860
|
+
|
|
2861
|
+
result = client.insightVersionHistory(args=...)
|
|
2862
|
+
print(f"Result: {result}")
|
|
2863
|
+
|
|
2864
|
+
Use Cases:
|
|
2865
|
+
- [TODO: Add specific use cases for this operation]
|
|
2866
|
+
- [TODO: Include business context]
|
|
2867
|
+
- [TODO: Explain when to use this method]
|
|
2868
|
+
"""
|
|
2869
|
+
self.method = 'GET'
|
|
2870
|
+
self.endpoint = ENDPOINTS['insight']['version_history']
|
|
2871
|
+
self.params = get_api_version_params('datamap')
|
|
2872
|
+
if args.get('--assetId'):
|
|
2873
|
+
self.params['assetId'] = args['--assetId']
|