msfabricpysdkcore 0.2.1__tar.gz → 0.2.3__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.
- {msfabricpysdkcore-0.2.1/msfabricpysdkcore.egg-info → msfabricpysdkcore-0.2.3}/PKG-INFO +33 -6
- msfabricpysdkcore-0.2.1/PKG-INFO → msfabricpysdkcore-0.2.3/README.md +29 -20
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/adminapi.py +142 -2
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/coreapi.py +476 -9
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/domain.py +4 -1
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/item.py +6 -4
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/otheritems.py +93 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/__init__.py +0 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_admin_apis.py +174 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_connection.py +111 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_datapipelines.py +45 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_deployment_pipeline.py +63 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_domains.py +126 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_environments.py +114 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_evenhouses.py +56 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_evenstreams.py +52 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_external_data_shares.py +51 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_fabric_azure_client.py +80 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_gateways.py +99 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_git.py +66 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_graphqlapi.py +44 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_items.py +97 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_jobs.py +96 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_kql_dashboards.py +63 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_kql_queryset.py +64 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_kqldatabases.py +56 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_lakehouse.py +93 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_managed_private_endpoints.py +61 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_mirroreddatabases.py +80 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_ml_experiments.py +47 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_ml_models.py +47 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_mounted_adf.py +64 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_notebooks.py +57 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_one_lake_data_access_security.py +63 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_other_items.py +45 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_reflex.py +57 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_reports.py +56 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_semantic_model.py +56 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_shortcuts.py +60 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_spark.py +91 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_sparkjobdefinition.py +55 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_sqldatabases.py +45 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_warehouses.py +50 -0
- msfabricpysdkcore-0.2.3/msfabricpysdkcore/tests/test_workspaces_capacities.py +159 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/workspace.py +149 -5
- msfabricpysdkcore-0.2.1/README.md → msfabricpysdkcore-0.2.3/msfabricpysdkcore.egg-info/PKG-INFO +47 -4
- msfabricpysdkcore-0.2.3/msfabricpysdkcore.egg-info/SOURCES.txt +69 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/pyproject.toml +1 -1
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/setup.py +1 -1
- msfabricpysdkcore-0.2.1/msfabricpysdkcore.egg-info/SOURCES.txt +0 -32
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/LICENSE +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/__init__.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/admin_item.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/admin_workspace.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/auth.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/capacity.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/client.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/deployment_pipeline.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/environment.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/fabric_azure_client.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/job_instance.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/lakehouse.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/long_running_operation.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/onelakeshortcut.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/spark_custom_pool.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/util/__init__.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore/util/logger.py +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore.egg-info/requires.txt +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
- {msfabricpysdkcore-0.2.1 → msfabricpysdkcore-0.2.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: msfabricpysdkcore
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.3
|
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,10 +13,12 @@ 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: license-file
|
17
|
+
Dynamic: requires-dist
|
16
18
|
|
17
19
|
# Python SDK for Microsoft Fabric
|
18
20
|
|
19
|
-
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
|
21
|
+
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 March 06, 2025).
|
20
22
|
|
21
23
|

|
22
24
|
|
@@ -460,6 +462,9 @@ gw = fc.create_gateway(gateway_request=gwr)
|
|
460
462
|
# Delete gateway
|
461
463
|
resp_code = fc.delete_gateway(gateway_id= "gateway_id")
|
462
464
|
|
465
|
+
# Delete gatewway member
|
466
|
+
resp_code = fc.delete_gateway_member(gateway_id= "gateway_id", gateway_member_id= "gateway_member_id")
|
467
|
+
|
463
468
|
# Delete gateway role assignment
|
464
469
|
resp_code = fc.delete_gateway_role_assignment(gateway_id=gw['id'], gateway_role_assignment_id=new_ras['id'])
|
465
470
|
|
@@ -631,6 +636,9 @@ ws.list_shortcuts(item_id="item_id",
|
|
631
636
|
# or
|
632
637
|
item.list_shortcuts(parent_path="Tables")
|
633
638
|
|
639
|
+
# Reset shortcut cache
|
640
|
+
fc.reset_shortcut_cache(workspace_id="23232", wait_for_completion = False)
|
641
|
+
|
634
642
|
```
|
635
643
|
|
636
644
|
|
@@ -821,14 +829,33 @@ from msfabricpysdkcore import FabricClientAdmin
|
|
821
829
|
|
822
830
|
fca = FabricClientAdmin()
|
823
831
|
|
824
|
-
#
|
825
|
-
|
832
|
+
# List tenant settings
|
826
833
|
tenant_settings = fca.list_tenant_settings()
|
827
834
|
|
828
835
|
# Get capacity tenant settings overrides
|
829
|
-
|
830
836
|
overrides = fca.list_capacities_tenant_settings_overrides()
|
831
837
|
|
838
|
+
# Get domain tenant settings overrides
|
839
|
+
overrides = fca.list_domain_tenant_settings_overrides()
|
840
|
+
|
841
|
+
# Get workspace tenant settings overrides
|
842
|
+
overrides = fca.list_workspace_tenant_settings_overrides()
|
843
|
+
|
844
|
+
# Get capacity tenant settings overrides by capacity id
|
845
|
+
overrides = fca.list_capacity_tenant_settings_overrides_by_capacity_id(capacity_id="adsfasdfasf")
|
846
|
+
|
847
|
+
# Update tenant setting
|
848
|
+
fc.update_tenant_setting(tenant_setting_name = "PlatformMonitoringTenantSetting", enabled = True, delegate_to_capacity = None, delegate_to_domain = None,
|
849
|
+
delegate_to_workspace = None, enabled_security_groups = None, excluded_security_groups = None, properties = None)
|
850
|
+
|
851
|
+
# Update capacity tenant setting override
|
852
|
+
fc.update_capacity_tenant_setting_override(capacity_id = "capacity_id", tenant_setting_name = "PlatformMonitoringTenantSetting", enabled = True, delegate_to_workspace = None,
|
853
|
+
enabled_security_groups = None, excluded_security_groups = None)
|
854
|
+
|
855
|
+
|
856
|
+
# Delete capacity tenant setting override
|
857
|
+
fc.delete_capacity_tenant_setting_override(capacity_id = "capacity_id", tenant_setting_name = "PlatformMonitoringTenantSetting")
|
858
|
+
|
832
859
|
```
|
833
860
|
|
834
861
|
### Admin API for Items
|
@@ -1,22 +1,6 @@
|
|
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
|
-
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
|
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 March 06, 2025).
|
20
4
|
|
21
5
|

|
22
6
|
|
@@ -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
|
-
#
|
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="
|
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="
|
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):
|