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.

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