msfabricpysdkcore 0.1.7__tar.gz → 0.2.1__tar.gz

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.
Files changed (34) hide show
  1. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/PKG-INFO +243 -9
  2. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/README.md +242 -8
  3. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/adminapi.py +36 -10
  4. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/coreapi.py +1027 -88
  5. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/item.py +41 -2
  6. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/job_instance.py +2 -1
  7. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/otheritems.py +66 -10
  8. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/workspace.py +148 -11
  9. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore.egg-info/PKG-INFO +243 -9
  10. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/pyproject.toml +1 -1
  11. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/setup.py +1 -1
  12. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/LICENSE +0 -0
  13. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/__init__.py +0 -0
  14. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/admin_item.py +0 -0
  15. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/admin_workspace.py +0 -0
  16. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/auth.py +0 -0
  17. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/capacity.py +0 -0
  18. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/client.py +0 -0
  19. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/deployment_pipeline.py +0 -0
  20. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/domain.py +0 -0
  21. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/environment.py +0 -0
  22. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
  23. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/fabric_azure_client.py +0 -0
  24. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/lakehouse.py +0 -0
  25. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/long_running_operation.py +0 -0
  26. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/onelakeshortcut.py +0 -0
  27. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/spark_custom_pool.py +0 -0
  28. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/util/__init__.py +0 -0
  29. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore/util/logger.py +0 -0
  30. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore.egg-info/SOURCES.txt +0 -0
  31. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
  32. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore.egg-info/requires.txt +0 -0
  33. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
  34. {msfabricpysdkcore-0.1.7 → msfabricpysdkcore-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: msfabricpysdkcore
3
- Version: 0.1.7
3
+ Version: 0.2.1
4
4
  Summary: A Python SDK for Microsoft Fabric
5
5
  Author: Andreas Rederer
6
6
  Project-URL: Homepage, https://github.com/DaSenf1860/ms-fabric-sdk-core
@@ -43,11 +43,14 @@ See the latest release notes [here](releasenotes/release_notes.md).
43
43
  Currently it supports all Core APIs, Admin APIs, all item specific CRUD APIs and Azure Resource Management APIs for Fabric capacities, i.e.:
44
44
  - Core APIs
45
45
  - [Capacities](#working-with-capacities)
46
+ - [Connections](#connections)
46
47
  - [Deployment Pipelines](#deployment-pipelines)
47
48
  - [External Data Shares](#external-data-shares)
49
+ - [Gateways](#gateways)
48
50
  - [Git](#working-with-git)
49
51
  - [Items](#working-with-items)
50
52
  - [Job Scheduler](#working-with-job-scheduler)
53
+ - [Managed Private Endpoints](#managed-private-endpoints)
51
54
  - [Long Running Operations](#long-running-operations)
52
55
  - [OneLakeDataAccessSecurity](#one-lake-data-access-security)
53
56
  - [OneLakeShortcuts](#working-with-one-lake-shortcuts)
@@ -225,6 +228,86 @@ ws.unassign_from_capacity()
225
228
 
226
229
  # List capacities
227
230
  fc.list_capacities()
231
+ ```
232
+ ### Connections
233
+
234
+ ```python
235
+
236
+ # Add connection role assignment
237
+ principal = {"id" : "755f273c-98f8-408c-a886-691794938bd8",
238
+ "type" : "ServicePrincipal"}
239
+
240
+ add_role_assi = fc.add_connection_role_assignment(connection_id="id", principal=principal, role='User')
241
+
242
+ # Create Connection
243
+ display_name = "ContosoCloudConnection" + datetime_str
244
+
245
+ cr = {"connectivityType": "ShareableCloud",
246
+ "displayName": display_name,
247
+ "connectionDetails": {
248
+ 'type': "SQL",
249
+ 'creationMethod': 'SQL',
250
+ "parameters": [
251
+ {
252
+ "dataType": "Text",
253
+ "name": "server",
254
+ "value": "server_name.database.windows.net"
255
+ },
256
+ {
257
+ "dataType": "Text",
258
+ "name": "database",
259
+ "value": "database_name"
260
+ }
261
+ ]},
262
+ 'privacyLevel': 'Organizational',
263
+ 'credentialDetails': {'credentials':{'credentialType': 'Basic',
264
+ 'userName': 'supercoolusername',
265
+ 'password': 'StrongPassword123!'},
266
+ 'singleSignOnType': 'None',
267
+ 'connectionEncryption': 'NotEncrypted',
268
+ 'skipTestConnection': False}
269
+ }
270
+
271
+ connection = fc.create_connection(connection_request=cr)
272
+
273
+ # Delete connection
274
+ status_code = fc.delete_connection(connection_id="id")
275
+
276
+ # Delete connection role assignment
277
+ status_code = fc.delete_connection_role_assignment(connection_id="id",
278
+ connection_role_assignment_id="role_assi_id")
279
+
280
+ # Get Connection
281
+ connection2 = fc.get_connection(connection_name="display_name")
282
+
283
+ # Get connection role assignment
284
+ role_assi = fc.get_connection_role_assignment(connection_id="id",
285
+ connection_role_assignment_id="role_assi_id")
286
+
287
+ # List connection role assignments
288
+ role_assis = fc.list_connection_role_assignments(connection_id="id")
289
+
290
+ # List Connections
291
+ connections = fc.list_connections()
292
+
293
+ # List supported connection types
294
+ supported_methods = fc.list_supported_connection_types(gateway_id='gw_id',
295
+ show_all_creation_methods=True)
296
+
297
+ # Update connection
298
+ cr = {
299
+ "connectivityType": "ShareableCloud",
300
+ "displayName": f"sqlserver{datetime_str}"
301
+ }
302
+
303
+ updated_connection = fc.update_connection(connection_id="id", connection_request=cr)
304
+
305
+ # Update connection role assignment
306
+ role_assi = fc.update_connection_role_assignment(connection_id="id",
307
+ connection_role_assignment_id="role_assi_id",
308
+ role='UserWithReshare')
309
+
310
+
228
311
  ```
229
312
 
230
313
  ### Deployment Pipelines
@@ -318,12 +401,18 @@ item = fc.get_item(workspace_id="workspace_id", item_id="item_id")
318
401
  # or
319
402
  item = ws.get_item(item_id="item_id")
320
403
 
404
+ # Get item definition
405
+ response = fc.get_item_definition(workspace_id="123123", item_id="123123", type = "Notebook")
321
406
 
322
407
  # List items
323
408
  item_list = fc.list_items(workspace_id="workspace_id")
324
409
  # or
325
410
  item_list = ws.list_items()
326
411
 
412
+ # List item connections
413
+ connections = fc.list_item_connections(workspace_id = '6a3',
414
+ item_id = '1bcc876')
415
+
327
416
 
328
417
  # Update an item
329
418
  fc.update_item(workspace_id="workspace_id", item_id="item_id" display_name="new_item_name", description = None, return_item=True)
@@ -332,6 +421,9 @@ ws.update_item(item_id="item_id", display_name="new_item_name", description = No
332
421
  # or
333
422
  item.update(display_name="new_item_name", description = None, return_item=True)
334
423
 
424
+ # Update item definition
425
+ response = fc.update_item_definition(workspace_id="dasf",
426
+ item_id="fsdsd", definition=definition)
335
427
 
336
428
  # Delete an item
337
429
  fc.delete_item(workspace_id="workspace_id", item_id="item_id")
@@ -342,6 +434,70 @@ item.delete()
342
434
 
343
435
  ```
344
436
 
437
+ ### Gateways
438
+
439
+ ```python
440
+
441
+ # Add gateway role assignment
442
+ principal = {"id" : "75dsbd8",
443
+ "type" : "ServicePrincipal"}
444
+ new_ras = fc.add_gateway_role_assignment(gateway_id="gw['id']", principal=principal, role='ConnectionCreator')
445
+
446
+ # Create a gateway
447
+ display_name = 'fabricvnet-123123' + datetime_str
448
+ gwr = {'displayName': display_name,
449
+ 'capacityId': '33saf79',
450
+ 'virtualNetworkAzureResource': {'virtualNetworkName': 'fabricvnet',
451
+ 'subnetName': 'default3',
452
+ 'resourceGroupName': 'fabricdemo',
453
+ 'subscriptionId': 'cfgf8'},
454
+ 'inactivityMinutesBeforeSleep': 30,
455
+ 'numberOfMemberGateways': 2,
456
+ 'type': 'VirtualNetwork'}
457
+
458
+ gw = fc.create_gateway(gateway_request=gwr)
459
+
460
+ # Delete gateway
461
+ resp_code = fc.delete_gateway(gateway_id= "gateway_id")
462
+
463
+ # Delete gateway role assignment
464
+ resp_code = fc.delete_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
465
+
466
+ # Get gateway
467
+ gw_ = fc.get_gateway(gateway_id=gw["id"])
468
+
469
+ # Get gateway role assignment
470
+ new_ras_ = fc.get_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
471
+
472
+ # List gateway members
473
+ gw_members = fc.list_gateway_members(gateway_id="gw_id")
474
+
475
+ # List gateway role assignments
476
+ ras = fc.list_gateway_role_assignments(gateway_id=gw['id'])
477
+
478
+ # list gateways
479
+ gateways = fc.list_gateways()
480
+
481
+ # Update gateway
482
+ gwr = {
483
+ "type": "OnPremises",
484
+ "displayName": "new_name",
485
+ "loadBalancingSetting": "Failover",
486
+ "allowCloudConnectionRefresh": False,
487
+ "allowCustomConnectors": False
488
+ }
489
+
490
+ gw_ = fc.update_gateway(gateway_id="gateway_id", gateway_request="gwr")
491
+
492
+ # Update gateway member
493
+ gw_member = fc.update_gateway_member(gateway_id = "gw_id", gateway_member_id = "gateway_member_id",
494
+ display_name="display_name_member", enabled=True)
495
+
496
+ # Update gateway role assignment
497
+ new_ras = fc.update_gateway_role_assignment(gateway_id= gw['id'], gateway_role_assignment_id=new_ras['id'], role='Admin')
498
+
499
+ ```
500
+
345
501
  ### Working with Git
346
502
 
347
503
  ```python
@@ -380,6 +536,11 @@ fc.git_get_status(workspace_id="workspaceid")
380
536
  # or
381
537
  ws.git_get_status()
382
538
 
539
+ # Get my credentials
540
+ git_credentials = fc.get_my_git_credentials(workspace_id="123123")
541
+
542
+ # Update my credentials
543
+ fc.update_my_git_credentials(workspace_id = "1232", git_credentials={"source": "Automatic"})
383
544
 
384
545
  # Update from git
385
546
  fc.update_from_git(workspace_id="workspaceid", remote_commit_hash="commit_hash",
@@ -455,6 +616,21 @@ ws.delete_shortcut(item_id="item_id",
455
616
  item.delete_shortcut(path="path",
456
617
  name="name")
457
618
 
619
+ # List shortcuts of an item
620
+
621
+ fc.list_shortcuts(workspace_id="workspace_id",
622
+ item_id="item_id",
623
+ # optional parent_path="Tables"
624
+ )
625
+
626
+ # or
627
+ ws.list_shortcuts(item_id="item_id",
628
+ # optional parent_path="Tables"
629
+ )
630
+
631
+ # or
632
+ item.list_shortcuts(parent_path="Tables")
633
+
458
634
  ```
459
635
 
460
636
 
@@ -470,7 +646,7 @@ ws.run_on_demand_item_job(item_id="item_id", job_type="RunNotebook", execution_d
470
646
  item.run_on_demand_item_job(job_type="RunNotebook", execution_data = None)
471
647
 
472
648
  # Other job types are e.g.:
473
- jobType=Pipeline
649
+ jobType="Pipeline"
474
650
 
475
651
 
476
652
  # Get an item job instance
@@ -487,6 +663,34 @@ ws.cancel_item_job_instance(item_id="item_id", job_instance_id="job_instance_id"
487
663
  # or
488
664
  item.cancel_item_job_instance(job_instance_id="job_instance_id")
489
665
 
666
+ # List item job instances
667
+ job_instances = fc.list_item_job_instances(workspace_id="workspace_id",
668
+ item_id="item_id")
669
+
670
+ # Create item schedule
671
+ configuration = {'type': 'Daily',
672
+ 'startDateTime': '2024-11-21T00:00:00',
673
+ 'endDateTime': '2028-11-08T23:59:00',
674
+ 'localTimeZoneId': 'Romance Standard Time',
675
+ 'times': ['15:39']}
676
+
677
+ schedule = fc.create_item_schedule(workspace_id="1232", item_id="1232", job_type="sparkjob", configuration=configuration, enabled=True)
678
+
679
+ # Delete item schedule
680
+ fc.delete_item_schedule(workspace_id="1232", item_id="1232", schedule_id="schedule_id", job_type="sparkjob")
681
+
682
+ # Get item schedule
683
+ schedule_check = fc.get_item_schedule(workspace_id="1232", item_id="1232",
684
+ schedule_id="schedule_id", job_type="sparkjob")
685
+
686
+ # Update item schedule
687
+ schedule_new = fc.update_item_schedule(workspace_id="1232", item_id="1232",
688
+ schedule_id="schedule_id", job_type="sparkjob", configuration=configuration, enabled=False)
689
+
690
+ # List item schedules
691
+ list_schedules = fc.list_item_schedules(workspace_id="1232", item_id="1232", job_type="sparkjob")
692
+
693
+
490
694
  ```
491
695
 
492
696
 
@@ -506,6 +710,32 @@ results = fc.get_operation_results(operation_id)
506
710
 
507
711
  ```
508
712
 
713
+ ### Managed Private Endpoints
714
+
715
+ ```python
716
+ from msfabricpysdkcore import FabricClientCore
717
+
718
+ fc = FabricClientCore()
719
+
720
+ # Create a workspace managed private endpoint
721
+ mpe = fc.create_workspace_managed_private_endpoint(workspace_id='535fb',
722
+ name = 'testmpe',
723
+ target_private_link_resource_id = '/subscriptions/c78/resourceGroups/fabricdemo/providers/Microsoft.Storage/storageAccounts/pu39',
724
+ target_subresource_type = 'dfs',
725
+ request_message = 'testmessage')
726
+
727
+ # Delete workspace managed private endpoint
728
+ status_code = fc.delete_workspace_managed_private_endpoint(workspace_id='53b',
729
+ managed_private_endpoint_id="mpeid")
730
+
731
+ # Get workspace managed private endpoint
732
+ mpe2 = fc.get_workspace_managed_private_endpoint(workspace_id='5355fb',
733
+ managed_private_endpoint_id="mpeid")
734
+
735
+ # List workspace managed private endpoints
736
+ mpes = fc.list_workspace_managed_private_endpoints(workspace_id='53b')
737
+ ```
738
+
509
739
  ### One Lake Data Access Security
510
740
 
511
741
  ```python
@@ -552,18 +782,22 @@ from msfabricpysdkcore import FabricClientAdmin
552
782
 
553
783
  fca = FabricClientAdmin()
554
784
 
555
-
556
- # List workspaces
557
- ws = fca.list_workspaces(name="testworkspace")[0]
558
-
559
785
  # Get workspace
560
786
  ws = fca.get_workspace(workspace_id="workspace_id")
561
787
 
562
- # Get workspace access details
788
+ # List git connectsions
789
+ git_connections = fca.discover_git_connections()
563
790
 
791
+ # List workspace access details
564
792
  ws_access = fca.list_workspace_access_details("workspace_id")
565
- # or
566
- ws_access = ws.list_access_details()
793
+
794
+ # List workspaces
795
+ ws = fca.list_workspaces(name="testworkspace")[0]
796
+
797
+ # Restore workspace
798
+ fca.restore_workspace(workspace_id = "213123",
799
+ new_workspace_admin_principal={"id": "081adiaj3", "type":"User"},
800
+ new_workspace_name = "Contoso Workspace")
567
801
  ```
568
802
 
569
803
  ### Admin API for Users
@@ -27,11 +27,14 @@ See the latest release notes [here](releasenotes/release_notes.md).
27
27
  Currently it supports all Core APIs, Admin APIs, all item specific CRUD APIs and Azure Resource Management APIs for Fabric capacities, i.e.:
28
28
  - Core APIs
29
29
  - [Capacities](#working-with-capacities)
30
+ - [Connections](#connections)
30
31
  - [Deployment Pipelines](#deployment-pipelines)
31
32
  - [External Data Shares](#external-data-shares)
33
+ - [Gateways](#gateways)
32
34
  - [Git](#working-with-git)
33
35
  - [Items](#working-with-items)
34
36
  - [Job Scheduler](#working-with-job-scheduler)
37
+ - [Managed Private Endpoints](#managed-private-endpoints)
35
38
  - [Long Running Operations](#long-running-operations)
36
39
  - [OneLakeDataAccessSecurity](#one-lake-data-access-security)
37
40
  - [OneLakeShortcuts](#working-with-one-lake-shortcuts)
@@ -209,6 +212,86 @@ ws.unassign_from_capacity()
209
212
 
210
213
  # List capacities
211
214
  fc.list_capacities()
215
+ ```
216
+ ### Connections
217
+
218
+ ```python
219
+
220
+ # Add connection role assignment
221
+ principal = {"id" : "755f273c-98f8-408c-a886-691794938bd8",
222
+ "type" : "ServicePrincipal"}
223
+
224
+ add_role_assi = fc.add_connection_role_assignment(connection_id="id", principal=principal, role='User')
225
+
226
+ # Create Connection
227
+ display_name = "ContosoCloudConnection" + datetime_str
228
+
229
+ cr = {"connectivityType": "ShareableCloud",
230
+ "displayName": display_name,
231
+ "connectionDetails": {
232
+ 'type': "SQL",
233
+ 'creationMethod': 'SQL',
234
+ "parameters": [
235
+ {
236
+ "dataType": "Text",
237
+ "name": "server",
238
+ "value": "server_name.database.windows.net"
239
+ },
240
+ {
241
+ "dataType": "Text",
242
+ "name": "database",
243
+ "value": "database_name"
244
+ }
245
+ ]},
246
+ 'privacyLevel': 'Organizational',
247
+ 'credentialDetails': {'credentials':{'credentialType': 'Basic',
248
+ 'userName': 'supercoolusername',
249
+ 'password': 'StrongPassword123!'},
250
+ 'singleSignOnType': 'None',
251
+ 'connectionEncryption': 'NotEncrypted',
252
+ 'skipTestConnection': False}
253
+ }
254
+
255
+ connection = fc.create_connection(connection_request=cr)
256
+
257
+ # Delete connection
258
+ status_code = fc.delete_connection(connection_id="id")
259
+
260
+ # Delete connection role assignment
261
+ status_code = fc.delete_connection_role_assignment(connection_id="id",
262
+ connection_role_assignment_id="role_assi_id")
263
+
264
+ # Get Connection
265
+ connection2 = fc.get_connection(connection_name="display_name")
266
+
267
+ # Get connection role assignment
268
+ role_assi = fc.get_connection_role_assignment(connection_id="id",
269
+ connection_role_assignment_id="role_assi_id")
270
+
271
+ # List connection role assignments
272
+ role_assis = fc.list_connection_role_assignments(connection_id="id")
273
+
274
+ # List Connections
275
+ connections = fc.list_connections()
276
+
277
+ # List supported connection types
278
+ supported_methods = fc.list_supported_connection_types(gateway_id='gw_id',
279
+ show_all_creation_methods=True)
280
+
281
+ # Update connection
282
+ cr = {
283
+ "connectivityType": "ShareableCloud",
284
+ "displayName": f"sqlserver{datetime_str}"
285
+ }
286
+
287
+ updated_connection = fc.update_connection(connection_id="id", connection_request=cr)
288
+
289
+ # Update connection role assignment
290
+ role_assi = fc.update_connection_role_assignment(connection_id="id",
291
+ connection_role_assignment_id="role_assi_id",
292
+ role='UserWithReshare')
293
+
294
+
212
295
  ```
213
296
 
214
297
  ### Deployment Pipelines
@@ -302,12 +385,18 @@ item = fc.get_item(workspace_id="workspace_id", item_id="item_id")
302
385
  # or
303
386
  item = ws.get_item(item_id="item_id")
304
387
 
388
+ # Get item definition
389
+ response = fc.get_item_definition(workspace_id="123123", item_id="123123", type = "Notebook")
305
390
 
306
391
  # List items
307
392
  item_list = fc.list_items(workspace_id="workspace_id")
308
393
  # or
309
394
  item_list = ws.list_items()
310
395
 
396
+ # List item connections
397
+ connections = fc.list_item_connections(workspace_id = '6a3',
398
+ item_id = '1bcc876')
399
+
311
400
 
312
401
  # Update an item
313
402
  fc.update_item(workspace_id="workspace_id", item_id="item_id" display_name="new_item_name", description = None, return_item=True)
@@ -316,6 +405,9 @@ ws.update_item(item_id="item_id", display_name="new_item_name", description = No
316
405
  # or
317
406
  item.update(display_name="new_item_name", description = None, return_item=True)
318
407
 
408
+ # Update item definition
409
+ response = fc.update_item_definition(workspace_id="dasf",
410
+ item_id="fsdsd", definition=definition)
319
411
 
320
412
  # Delete an item
321
413
  fc.delete_item(workspace_id="workspace_id", item_id="item_id")
@@ -326,6 +418,70 @@ item.delete()
326
418
 
327
419
  ```
328
420
 
421
+ ### Gateways
422
+
423
+ ```python
424
+
425
+ # Add gateway role assignment
426
+ principal = {"id" : "75dsbd8",
427
+ "type" : "ServicePrincipal"}
428
+ new_ras = fc.add_gateway_role_assignment(gateway_id="gw['id']", principal=principal, role='ConnectionCreator')
429
+
430
+ # Create a gateway
431
+ display_name = 'fabricvnet-123123' + datetime_str
432
+ gwr = {'displayName': display_name,
433
+ 'capacityId': '33saf79',
434
+ 'virtualNetworkAzureResource': {'virtualNetworkName': 'fabricvnet',
435
+ 'subnetName': 'default3',
436
+ 'resourceGroupName': 'fabricdemo',
437
+ 'subscriptionId': 'cfgf8'},
438
+ 'inactivityMinutesBeforeSleep': 30,
439
+ 'numberOfMemberGateways': 2,
440
+ 'type': 'VirtualNetwork'}
441
+
442
+ gw = fc.create_gateway(gateway_request=gwr)
443
+
444
+ # Delete gateway
445
+ resp_code = fc.delete_gateway(gateway_id= "gateway_id")
446
+
447
+ # Delete gateway role assignment
448
+ resp_code = fc.delete_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
449
+
450
+ # Get gateway
451
+ gw_ = fc.get_gateway(gateway_id=gw["id"])
452
+
453
+ # Get gateway role assignment
454
+ new_ras_ = fc.get_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
455
+
456
+ # List gateway members
457
+ gw_members = fc.list_gateway_members(gateway_id="gw_id")
458
+
459
+ # List gateway role assignments
460
+ ras = fc.list_gateway_role_assignments(gateway_id=gw['id'])
461
+
462
+ # list gateways
463
+ gateways = fc.list_gateways()
464
+
465
+ # Update gateway
466
+ gwr = {
467
+ "type": "OnPremises",
468
+ "displayName": "new_name",
469
+ "loadBalancingSetting": "Failover",
470
+ "allowCloudConnectionRefresh": False,
471
+ "allowCustomConnectors": False
472
+ }
473
+
474
+ gw_ = fc.update_gateway(gateway_id="gateway_id", gateway_request="gwr")
475
+
476
+ # Update gateway member
477
+ gw_member = fc.update_gateway_member(gateway_id = "gw_id", gateway_member_id = "gateway_member_id",
478
+ display_name="display_name_member", enabled=True)
479
+
480
+ # Update gateway role assignment
481
+ new_ras = fc.update_gateway_role_assignment(gateway_id= gw['id'], gateway_role_assignment_id=new_ras['id'], role='Admin')
482
+
483
+ ```
484
+
329
485
  ### Working with Git
330
486
 
331
487
  ```python
@@ -364,6 +520,11 @@ fc.git_get_status(workspace_id="workspaceid")
364
520
  # or
365
521
  ws.git_get_status()
366
522
 
523
+ # Get my credentials
524
+ git_credentials = fc.get_my_git_credentials(workspace_id="123123")
525
+
526
+ # Update my credentials
527
+ fc.update_my_git_credentials(workspace_id = "1232", git_credentials={"source": "Automatic"})
367
528
 
368
529
  # Update from git
369
530
  fc.update_from_git(workspace_id="workspaceid", remote_commit_hash="commit_hash",
@@ -439,6 +600,21 @@ ws.delete_shortcut(item_id="item_id",
439
600
  item.delete_shortcut(path="path",
440
601
  name="name")
441
602
 
603
+ # List shortcuts of an item
604
+
605
+ fc.list_shortcuts(workspace_id="workspace_id",
606
+ item_id="item_id",
607
+ # optional parent_path="Tables"
608
+ )
609
+
610
+ # or
611
+ ws.list_shortcuts(item_id="item_id",
612
+ # optional parent_path="Tables"
613
+ )
614
+
615
+ # or
616
+ item.list_shortcuts(parent_path="Tables")
617
+
442
618
  ```
443
619
 
444
620
 
@@ -454,7 +630,7 @@ ws.run_on_demand_item_job(item_id="item_id", job_type="RunNotebook", execution_d
454
630
  item.run_on_demand_item_job(job_type="RunNotebook", execution_data = None)
455
631
 
456
632
  # Other job types are e.g.:
457
- jobType=Pipeline
633
+ jobType="Pipeline"
458
634
 
459
635
 
460
636
  # Get an item job instance
@@ -471,6 +647,34 @@ ws.cancel_item_job_instance(item_id="item_id", job_instance_id="job_instance_id"
471
647
  # or
472
648
  item.cancel_item_job_instance(job_instance_id="job_instance_id")
473
649
 
650
+ # List item job instances
651
+ job_instances = fc.list_item_job_instances(workspace_id="workspace_id",
652
+ item_id="item_id")
653
+
654
+ # Create item schedule
655
+ configuration = {'type': 'Daily',
656
+ 'startDateTime': '2024-11-21T00:00:00',
657
+ 'endDateTime': '2028-11-08T23:59:00',
658
+ 'localTimeZoneId': 'Romance Standard Time',
659
+ 'times': ['15:39']}
660
+
661
+ schedule = fc.create_item_schedule(workspace_id="1232", item_id="1232", job_type="sparkjob", configuration=configuration, enabled=True)
662
+
663
+ # Delete item schedule
664
+ fc.delete_item_schedule(workspace_id="1232", item_id="1232", schedule_id="schedule_id", job_type="sparkjob")
665
+
666
+ # Get item schedule
667
+ schedule_check = fc.get_item_schedule(workspace_id="1232", item_id="1232",
668
+ schedule_id="schedule_id", job_type="sparkjob")
669
+
670
+ # Update item schedule
671
+ schedule_new = fc.update_item_schedule(workspace_id="1232", item_id="1232",
672
+ schedule_id="schedule_id", job_type="sparkjob", configuration=configuration, enabled=False)
673
+
674
+ # List item schedules
675
+ list_schedules = fc.list_item_schedules(workspace_id="1232", item_id="1232", job_type="sparkjob")
676
+
677
+
474
678
  ```
475
679
 
476
680
 
@@ -490,6 +694,32 @@ results = fc.get_operation_results(operation_id)
490
694
 
491
695
  ```
492
696
 
697
+ ### Managed Private Endpoints
698
+
699
+ ```python
700
+ from msfabricpysdkcore import FabricClientCore
701
+
702
+ fc = FabricClientCore()
703
+
704
+ # Create a workspace managed private endpoint
705
+ mpe = fc.create_workspace_managed_private_endpoint(workspace_id='535fb',
706
+ name = 'testmpe',
707
+ target_private_link_resource_id = '/subscriptions/c78/resourceGroups/fabricdemo/providers/Microsoft.Storage/storageAccounts/pu39',
708
+ target_subresource_type = 'dfs',
709
+ request_message = 'testmessage')
710
+
711
+ # Delete workspace managed private endpoint
712
+ status_code = fc.delete_workspace_managed_private_endpoint(workspace_id='53b',
713
+ managed_private_endpoint_id="mpeid")
714
+
715
+ # Get workspace managed private endpoint
716
+ mpe2 = fc.get_workspace_managed_private_endpoint(workspace_id='5355fb',
717
+ managed_private_endpoint_id="mpeid")
718
+
719
+ # List workspace managed private endpoints
720
+ mpes = fc.list_workspace_managed_private_endpoints(workspace_id='53b')
721
+ ```
722
+
493
723
  ### One Lake Data Access Security
494
724
 
495
725
  ```python
@@ -536,18 +766,22 @@ from msfabricpysdkcore import FabricClientAdmin
536
766
 
537
767
  fca = FabricClientAdmin()
538
768
 
539
-
540
- # List workspaces
541
- ws = fca.list_workspaces(name="testworkspace")[0]
542
-
543
769
  # Get workspace
544
770
  ws = fca.get_workspace(workspace_id="workspace_id")
545
771
 
546
- # Get workspace access details
772
+ # List git connectsions
773
+ git_connections = fca.discover_git_connections()
547
774
 
775
+ # List workspace access details
548
776
  ws_access = fca.list_workspace_access_details("workspace_id")
549
- # or
550
- ws_access = ws.list_access_details()
777
+
778
+ # List workspaces
779
+ ws = fca.list_workspaces(name="testworkspace")[0]
780
+
781
+ # Restore workspace
782
+ fca.restore_workspace(workspace_id = "213123",
783
+ new_workspace_admin_principal={"id": "081adiaj3", "type":"User"},
784
+ new_workspace_name = "Contoso Workspace")
551
785
  ```
552
786
 
553
787
  ### Admin API for Users