msfabricpysdkcore 0.2.1__tar.gz → 0.2.2__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 (72) hide show
  1. {msfabricpysdkcore-0.2.1/msfabricpysdkcore.egg-info → msfabricpysdkcore-0.2.2}/PKG-INFO +31 -5
  2. msfabricpysdkcore-0.2.1/PKG-INFO → msfabricpysdkcore-0.2.2/README.md +28 -19
  3. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/adminapi.py +142 -2
  4. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/coreapi.py +475 -8
  5. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/item.py +6 -4
  6. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/otheritems.py +93 -0
  7. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/__init__.py +0 -0
  8. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_admin_apis.py +174 -0
  9. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_connection.py +111 -0
  10. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_datapipelines.py +45 -0
  11. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_deployment_pipeline.py +63 -0
  12. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_domains.py +126 -0
  13. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_environments.py +114 -0
  14. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_evenhouses.py +56 -0
  15. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_evenstreams.py +52 -0
  16. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_external_data_shares.py +51 -0
  17. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_fabric_azure_client.py +80 -0
  18. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_gateways.py +99 -0
  19. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_git.py +66 -0
  20. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_graphqlapi.py +44 -0
  21. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_items.py +97 -0
  22. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_jobs.py +96 -0
  23. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_kql_dashboards.py +63 -0
  24. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_kql_queryset.py +64 -0
  25. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_kqldatabases.py +56 -0
  26. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_lakehouse.py +93 -0
  27. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_managed_private_endpoints.py +61 -0
  28. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_mirroreddatabases.py +80 -0
  29. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_ml_experiments.py +47 -0
  30. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_ml_models.py +47 -0
  31. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_mounted_adf.py +64 -0
  32. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_notebooks.py +57 -0
  33. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_one_lake_data_access_security.py +63 -0
  34. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_other_items.py +45 -0
  35. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_reflex.py +57 -0
  36. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_reports.py +56 -0
  37. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_semantic_model.py +56 -0
  38. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_shortcuts.py +60 -0
  39. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_spark.py +91 -0
  40. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_sparkjobdefinition.py +55 -0
  41. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_sqldatabases.py +45 -0
  42. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_warehouses.py +50 -0
  43. msfabricpysdkcore-0.2.2/msfabricpysdkcore/tests/test_workspaces_capacities.py +159 -0
  44. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/workspace.py +149 -5
  45. msfabricpysdkcore-0.2.1/README.md → msfabricpysdkcore-0.2.2/msfabricpysdkcore.egg-info/PKG-INFO +45 -3
  46. msfabricpysdkcore-0.2.2/msfabricpysdkcore.egg-info/SOURCES.txt +69 -0
  47. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/pyproject.toml +1 -1
  48. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/setup.py +1 -1
  49. msfabricpysdkcore-0.2.1/msfabricpysdkcore.egg-info/SOURCES.txt +0 -32
  50. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/LICENSE +0 -0
  51. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/__init__.py +0 -0
  52. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/admin_item.py +0 -0
  53. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/admin_workspace.py +0 -0
  54. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/auth.py +0 -0
  55. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/capacity.py +0 -0
  56. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/client.py +0 -0
  57. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/deployment_pipeline.py +0 -0
  58. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/domain.py +0 -0
  59. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/environment.py +0 -0
  60. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
  61. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/fabric_azure_client.py +0 -0
  62. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/job_instance.py +0 -0
  63. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/lakehouse.py +0 -0
  64. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/long_running_operation.py +0 -0
  65. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/onelakeshortcut.py +0 -0
  66. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/spark_custom_pool.py +0 -0
  67. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/util/__init__.py +0 -0
  68. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore/util/logger.py +0 -0
  69. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
  70. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore.egg-info/requires.txt +0 -0
  71. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
  72. {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: msfabricpysdkcore
3
- Version: 0.2.1
3
+ Version: 0.2.2
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
@@ -13,6 +13,7 @@ License-File: LICENSE
13
13
  Requires-Dist: requests>=2.30.0
14
14
  Requires-Dist: azure-identity>=1.15.0
15
15
  Requires-Dist: msal>=1.28.0
16
+ Dynamic: requires-dist
16
17
 
17
18
  # Python SDK for Microsoft Fabric
18
19
 
@@ -460,6 +461,9 @@ gw = fc.create_gateway(gateway_request=gwr)
460
461
  # Delete gateway
461
462
  resp_code = fc.delete_gateway(gateway_id= "gateway_id")
462
463
 
464
+ # Delete gatewway member
465
+ resp_code = fc.delete_gateway_member(gateway_id= "gateway_id", gateway_member_id= "gateway_member_id")
466
+
463
467
  # Delete gateway role assignment
464
468
  resp_code = fc.delete_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
465
469
 
@@ -631,6 +635,9 @@ ws.list_shortcuts(item_id="item_id",
631
635
  # or
632
636
  item.list_shortcuts(parent_path="Tables")
633
637
 
638
+ # Reset shortcut cache
639
+ fc.reset_shortcut_cache(workspace_id="23232", wait_for_completion = False)
640
+
634
641
  ```
635
642
 
636
643
 
@@ -821,14 +828,33 @@ from msfabricpysdkcore import FabricClientAdmin
821
828
 
822
829
  fca = FabricClientAdmin()
823
830
 
824
- # Get tenant settings
825
-
831
+ # List tenant settings
826
832
  tenant_settings = fca.list_tenant_settings()
827
833
 
828
834
  # Get capacity tenant settings overrides
829
-
830
835
  overrides = fca.list_capacities_tenant_settings_overrides()
831
836
 
837
+ # Get domain tenant settings overrides
838
+ overrides = fca.list_domain_tenant_settings_overrides()
839
+
840
+ # Get workspace tenant settings overrides
841
+ overrides = fca.list_workspace_tenant_settings_overrides()
842
+
843
+ # Get capacity tenant settings overrides by capacity id
844
+ overrides = fca.list_capacity_tenant_settings_overrides_by_capacity_id(capacity_id="adsfasdfasf")
845
+
846
+ # Update tenant setting
847
+ fc.update_tenant_setting(tenant_setting_name = "PlatformMonitoringTenantSetting", enabled = True, delegate_to_capacity = None, delegate_to_domain = None,
848
+ delegate_to_workspace = None, enabled_security_groups = None, excluded_security_groups = None, properties = None)
849
+
850
+ # Update capacity tenant setting override
851
+ fc.update_capacity_tenant_setting_override(capacity_id = "capacity_id", tenant_setting_name = "PlatformMonitoringTenantSetting", enabled = True, delegate_to_workspace = None,
852
+ enabled_security_groups = None, excluded_security_groups = None)
853
+
854
+
855
+ # Delete capacity tenant setting override
856
+ fc.delete_capacity_tenant_setting_override(capacity_id = "capacity_id", tenant_setting_name = "PlatformMonitoringTenantSetting")
857
+
832
858
  ```
833
859
 
834
860
  ### Admin API for Items
@@ -1,19 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: msfabricpysdkcore
3
- Version: 0.2.1
4
- Summary: A Python SDK for Microsoft Fabric
5
- Author: Andreas Rederer
6
- Project-URL: Homepage, https://github.com/DaSenf1860/ms-fabric-sdk-core
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.10
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: requests>=2.30.0
14
- Requires-Dist: azure-identity>=1.15.0
15
- Requires-Dist: msal>=1.28.0
16
-
17
1
  # Python SDK for Microsoft Fabric
18
2
 
19
3
  This is a Python SDK for Microsoft Fabric. It is a wrapper around the REST APIs (v1) of Fabric*. It supports all Fabric REST APIs as well as Azure Resource Management APIs for Fabric (as of July 23, 2024).
@@ -460,6 +444,9 @@ gw = fc.create_gateway(gateway_request=gwr)
460
444
  # Delete gateway
461
445
  resp_code = fc.delete_gateway(gateway_id= "gateway_id")
462
446
 
447
+ # Delete gatewway member
448
+ resp_code = fc.delete_gateway_member(gateway_id= "gateway_id", gateway_member_id= "gateway_member_id")
449
+
463
450
  # Delete gateway role assignment
464
451
  resp_code = fc.delete_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
465
452
 
@@ -631,6 +618,9 @@ ws.list_shortcuts(item_id="item_id",
631
618
  # or
632
619
  item.list_shortcuts(parent_path="Tables")
633
620
 
621
+ # Reset shortcut cache
622
+ fc.reset_shortcut_cache(workspace_id="23232", wait_for_completion = False)
623
+
634
624
  ```
635
625
 
636
626
 
@@ -821,14 +811,33 @@ from msfabricpysdkcore import FabricClientAdmin
821
811
 
822
812
  fca = FabricClientAdmin()
823
813
 
824
- # Get tenant settings
825
-
814
+ # List tenant settings
826
815
  tenant_settings = fca.list_tenant_settings()
827
816
 
828
817
  # Get capacity tenant settings overrides
829
-
830
818
  overrides = fca.list_capacities_tenant_settings_overrides()
831
819
 
820
+ # Get domain tenant settings overrides
821
+ overrides = fca.list_domain_tenant_settings_overrides()
822
+
823
+ # Get workspace tenant settings overrides
824
+ overrides = fca.list_workspace_tenant_settings_overrides()
825
+
826
+ # Get capacity tenant settings overrides by capacity id
827
+ overrides = fca.list_capacity_tenant_settings_overrides_by_capacity_id(capacity_id="adsfasdfasf")
828
+
829
+ # Update tenant setting
830
+ fc.update_tenant_setting(tenant_setting_name = "PlatformMonitoringTenantSetting", enabled = True, delegate_to_capacity = None, delegate_to_domain = None,
831
+ delegate_to_workspace = None, enabled_security_groups = None, excluded_security_groups = None, properties = None)
832
+
833
+ # Update capacity tenant setting override
834
+ fc.update_capacity_tenant_setting_override(capacity_id = "capacity_id", tenant_setting_name = "PlatformMonitoringTenantSetting", enabled = True, delegate_to_workspace = None,
835
+ enabled_security_groups = None, excluded_security_groups = None)
836
+
837
+
838
+ # Delete capacity tenant setting override
839
+ fc.delete_capacity_tenant_setting_override(capacity_id = "capacity_id", tenant_setting_name = "PlatformMonitoringTenantSetting")
840
+
832
841
  ```
833
842
 
834
843
  ### Admin API for Items
@@ -505,6 +505,25 @@ class FabricClientAdmin(FabricClient):
505
505
 
506
506
  # Tenant Settings APIs
507
507
 
508
+ # DELETE https://api.fabric.microsoft.com/v1/admin/capacities/{capacityId}/delegatedTenantSettingOverrides/{tenantSettingName}
509
+ def delete_capacity_tenant_setting_override(self, capacity_id, tenant_setting_name):
510
+ """Delete a tenant setting override at the capacity
511
+
512
+ Args:
513
+ capacity_id (str): The ID of the capacity
514
+ tenant_setting_name (str): The name of the tenant setting
515
+
516
+ Returns:
517
+ int: The status code of the response
518
+ """
519
+ url = f"https://api.fabric.microsoft.com/v1/admin/capacities/{capacity_id}/delegatedTenantSettingOverrides/{tenant_setting_name}"
520
+
521
+ response:requests.Response = self.calling_routine(url = url, operation = "DELETE", response_codes = [200, 429],
522
+ error_message = "Error deleting capacity tenant setting override",
523
+ return_format="response")
524
+
525
+ return response.status_code
526
+
508
527
  def list_capacities_tenant_settings_overrides(self):
509
528
  """Returns list of tenant setting overrides that override at the capacities
510
529
 
@@ -516,10 +535,42 @@ class FabricClientAdmin(FabricClient):
516
535
 
517
536
  items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
518
537
  error_message = "Error listing capacities tenant settings overrides",
519
- return_format="Overrides", paging=True)
538
+ return_format="value", paging=True)
520
539
 
521
540
  return items
541
+
542
+ # GET https://api.fabric.microsoft.com/v1/admin/capacities/{capacityId}/delegatedTenantSettingOverrides?continuationToken={continuationToken}
543
+ def list_capacity_tenant_settings_overrides_by_capacity_id(self, capacity_id):
544
+ """Returns list of tenant setting overrides that override at the capacity
545
+
546
+ Args:
547
+ capacity_id (str): The ID of the capacity
548
+ Returns:
549
+ list: The capacities tenant settings overrides
550
+ """
551
+ url = f"https://api.fabric.microsoft.com/v1/admin/capacities/{capacity_id}/delegatedTenantSettingOverrides"
552
+
553
+ items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
554
+ error_message = "Error listing capacity tenant settings overrides",
555
+ return_format="value", paging=True)
556
+
557
+ return items
558
+
559
+ # GET https://api.fabric.microsoft.com/v1/admin/domains/delegatedTenantSettingOverrides?continuationToken={continuationToken}
560
+ def list_domain_tenant_settings_overrides(self):
561
+ """Returns list of tenant setting overrides that override at the domains
562
+
563
+ Returns:
564
+ list: The domains tenant settings overrides
565
+ """
566
+ url = "https://api.fabric.microsoft.com/v1/admin/domains/delegatedTenantSettingOverrides"
567
+
568
+ items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
569
+ error_message = "Error listing domain tenant settings overrides",
570
+ return_format="value", paging=True)
522
571
 
572
+ return items
573
+
523
574
  def list_tenant_settings(self):
524
575
  """Get the tenant settings
525
576
 
@@ -529,9 +580,98 @@ class FabricClientAdmin(FabricClient):
529
580
  url = "https://api.fabric.microsoft.com/v1/admin/tenantsettings"
530
581
 
531
582
  response_json = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
532
- error_message = "Error getting tenant settings", return_format="json")
583
+ error_message = "Error getting tenant settings", paging= True, return_format="value")
533
584
  return response_json
534
585
 
586
+ # GET https://api.fabric.microsoft.com/v1/admin/workspaces/delegatedTenantSettingOverrides?continuationToken={continuationToken}
587
+ def list_workspace_tenant_settings_overrides(self):
588
+ """Returns list of tenant setting overrides that override at the workspaces
589
+
590
+ Returns:
591
+ list: The workspaces tenant settings overrides
592
+ """
593
+ url = "https://api.fabric.microsoft.com/v1/admin/workspaces/delegatedTenantSettingOverrides"
594
+
595
+ items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
596
+ error_message = "Error listing workspace tenant settings overrides",
597
+ return_format="value", paging=True)
598
+
599
+ return items
600
+
601
+ # POST https://api.fabric.microsoft.com/v1/admin/capacities/{capacityId}/delegatedTenantSettingOverrides/{tenantSettingName}/update
602
+ def update_capacity_tenant_setting_override(self, capacity_id, tenant_setting_name, enabled, delegate_to_workspace = None,
603
+ enabled_security_groups = None, excluded_security_groups = None):
604
+ """Update a tenant setting override at the capacity
605
+
606
+ Args:
607
+ capacity_id (str): The ID of the capacity
608
+ tenant_setting_name (str): The name of the tenant setting
609
+ enabled (bool): Whether the tenant setting is enabled
610
+ delegate_to_workspace (bool): Indicates whether the tenant setting can be delegated to a workspace admin. False - Workspace admin cannot override the tenant setting. True - Workspace admin can override the tenant setting.
611
+ enabled_security_groups (list): The list of enabled security groups
612
+ excluded_security_groups (list): The list of excluded security groups
613
+ Returns:
614
+ dict: The overrides
615
+ """
616
+ url = f"https://api.fabric.microsoft.com/v1/admin/capacities/{capacity_id}/delegatedTenantSettingOverrides/{tenant_setting_name}/update"
617
+ body = {
618
+ "enabled": enabled
619
+ }
620
+ if delegate_to_workspace:
621
+ body["delegateToWorkspace"] = delegate_to_workspace
622
+ if enabled_security_groups:
623
+ body["enabledSecurityGroups"] = enabled_security_groups
624
+ if excluded_security_groups:
625
+ body["excludedSecurityGroups"] = excluded_security_groups
626
+
627
+ response_json : dict = self.calling_routine(url = url, operation = "POST", body = body, response_codes = [200, 429],
628
+ error_message = "Error updating capacity tenant setting override", return_format="json")
629
+
630
+ return response_json
631
+
632
+ # POST https://api.fabric.microsoft.com/v1/admin/tenantsettings/{tenantSettingName}/update
633
+ def update_tenant_setting(self, tenant_setting_name, enabled, delegate_to_capacity = None, delegate_to_domain = None,
634
+ delegate_to_workspace = None, enabled_security_groups = None, excluded_security_groups = None, properties = None):
635
+ """Update a tenant setting
636
+
637
+ Args:
638
+ capacity_id (str): The ID of the capacity
639
+ tenant_setting_name (str): The name of the tenant setting
640
+ enabled (bool): Whether the tenant setting is enabled
641
+ delegate_to_capacity (bool): Indicates whether the tenant setting can be delegated to a capacity admin. False - Capacity admin cannot override the tenant setting. True - Capacity admin can override the tenant setting.
642
+ delegate_to_domain (bool): Indicates whether the tenant setting can be delegated to a domain admin. False - Domain admin cannot override the tenant setting. True - Domain admin can override the tenant setting.
643
+ delegate_to_workspace (bool): Indicates whether the tenant setting can be delegated to a workspace admin. False - Workspace admin cannot override the tenant setting. True - Workspace admin can override the tenant setting.
644
+ enabled_security_groups (list): The list of enabled security groups
645
+ excluded_security_groups (list): The list of excluded security groups
646
+ Returns:
647
+ dict: The tenant settings
648
+ """
649
+
650
+ url = f"https://api.fabric.microsoft.com/v1/admin/tenantsettings/{tenant_setting_name}/update"
651
+
652
+ body = {
653
+ "enabled": enabled
654
+ }
655
+ if delegate_to_capacity:
656
+ body["delegateToCapacity"] = delegate_to_capacity
657
+ if delegate_to_domain:
658
+ body["delegateToDomain"] = delegate_to_domain
659
+ if delegate_to_workspace:
660
+ body["delegateToWorkspace"] = delegate_to_workspace
661
+ if enabled_security_groups:
662
+ body["enabledSecurityGroups"] = enabled_security_groups
663
+ if excluded_security_groups:
664
+ body["excludedSecurityGroups"] = excluded_security_groups
665
+ if properties:
666
+ body["properties"] = properties
667
+
668
+ response_json : dict = self.calling_routine(url = url, operation = "POST", body = body, response_codes = [200, 429],
669
+ error_message = "Error updating tenant setting", return_format="json")
670
+
671
+ return response_json
672
+
673
+
674
+
535
675
  # Users APIs
536
676
 
537
677
  def list_access_entities(self, user_id, type = None):