msfabricpysdkcore 0.2.9__tar.gz → 0.2.10__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.9 → msfabricpysdkcore-0.2.10}/PKG-INFO +45 -3
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/README.md +44 -2
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/adminapi.py +52 -14
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/coreapi.py +857 -36
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/domain.py +36 -5
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/lakehouse.py +79 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/otheritems.py +216 -1
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/tests/test_anomaly_detector.py +60 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_dataflows.py +13 -0
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/tests/test_maps.py +60 -0
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/tests/test_sql_endpoint.py +34 -0
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/tests/test_warehouses.py +105 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_workspaces_capacities.py +12 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/workspace.py +476 -6
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/PKG-INFO +45 -3
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/SOURCES.txt +2 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/pyproject.toml +1 -1
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/setup.py +1 -1
- msfabricpysdkcore-0.2.9/msfabricpysdkcore/lakehouse.py +0 -35
- msfabricpysdkcore-0.2.9/msfabricpysdkcore/tests/test_sql_endpoint.py +0 -28
- msfabricpysdkcore-0.2.9/msfabricpysdkcore/tests/test_warehouses.py +0 -50
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/LICENSE +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/__init__.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/admin_item.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/admin_workspace.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/auth.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/capacity.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/client.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/deployment_pipeline.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/environment.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/eventstream.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/fabric_azure_client.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/folder.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/item.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/job_instance.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/long_running_operation.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/onelakeshortcut.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/spark_custom_pool.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/__init__.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_admin_apis.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_admin_tags.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_apache_airflow_job.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_connection.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_copy_jobs.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_datapipelines.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_deployment_pipelinev2.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_digital_twin_builder.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_domains.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_environments.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_evenstreams.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_eventhouses.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_eventstream_topology.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_external_data_shares.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_fabric_azure_client.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_folders.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_gateways.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_git.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_graphqlapi.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_items.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_jobs.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_kql_dashboards.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_kql_queryset.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_kqldatabases.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_lakehouse.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_managed_private_endpoints.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_mirrored_azuredatabricks_catalog.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_mirroreddatabases.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_ml_experiments.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_ml_models.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_mounted_adf.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_notebooks.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_one_lake_data_access_security.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_other_items.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_reflex.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_reports.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_semantic_model.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_shortcuts.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_spark.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_sparkjobdefinition.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_sqldatabases.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_tags.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_variable_libary.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/util/__init__.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/util/logger.py +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/requires.txt +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
- {msfabricpysdkcore-0.2.9 → msfabricpysdkcore-0.2.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: msfabricpysdkcore
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.10
|
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
|
@@ -18,10 +18,32 @@ Dynamic: requires-dist
|
|
18
18
|
|
19
19
|
# Python SDK for Microsoft Fabric
|
20
20
|
|
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
|
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 October 10, 2025).
|
22
22
|
|
23
23
|

|
24
24
|
|
25
|
+
<a href="https://badgen.net/github/license/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
26
|
+
<img src="https://badgen.net/github/license/DaSenf1860/ms-fabric-sdk-core" alt="License">
|
27
|
+
</a>
|
28
|
+
<a href="https://badgen.net/github/releases/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
29
|
+
<img src="https://badgen.net/github/releases/DaSenf1860/ms-fabric-sdk-core" alt="Test">
|
30
|
+
</a>
|
31
|
+
<a href="https://badgen.net/github/contributors/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
32
|
+
<img src="https://badgen.net/github/contributors/DaSenf1860/ms-fabric-sdk-core" alt="Publish">
|
33
|
+
</a>
|
34
|
+
<a href="https://badgen.net/github/commits/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
35
|
+
<img src="https://badgen.net/github/commits/DaSenf1860/ms-fabric-sdk-core" alt="Commits">
|
36
|
+
</a>
|
37
|
+
<a href="https://badgen.net/pypi/v/msfabricpysdkcore" target="_blank">
|
38
|
+
<img src="https://badgen.net/pypi/v/msfabricpysdkcore" alt="Package version">
|
39
|
+
</a>
|
40
|
+
<a href="https://badgen.net/pypi/dm/msfabricpysdkcore" target="_blank">
|
41
|
+
<img src="https://badgen.net/pypi/dm/msfabricpysdkcore" alt="Monthly Downloads">
|
42
|
+
</a>
|
43
|
+
|
44
|
+
<p> </p>
|
45
|
+
|
46
|
+
|
25
47
|
The Microsoft Fabric REST APIs are documented [here](https://docs.microsoft.com/en-us/rest/api/fabric/).
|
26
48
|
The Azure Resoure Management APIs for Fabric are documented [here](https://learn.microsoft.com/en-us/rest/api/microsoftfabric/fabric-capacities?view=rest-microsoftfabric-2023-11-01).
|
27
49
|
They are designed to automate your Fabric processes.
|
@@ -211,6 +233,16 @@ print(result["applicationId"]))
|
|
211
233
|
# Deprovision Identity
|
212
234
|
fc.deprovision_identity(workspace_id=ws.id)
|
213
235
|
|
236
|
+
# Get network communication policy
|
237
|
+
policy = fc.get_network_communication_policy(workspace_id=ws.id)
|
238
|
+
|
239
|
+
# Set network communication policy
|
240
|
+
inbound = {'publicAccessRules': {'defaultAction': 'Allow'}}
|
241
|
+
outbound = {'publicAccessRules': {'defaultAction': 'Allow'}}
|
242
|
+
|
243
|
+
resp = fc.set_network_communication_policy(workspace_id=ws.id, inbound=inbound, outbound=outbound)
|
244
|
+
|
245
|
+
|
214
246
|
```
|
215
247
|
|
216
248
|
### Working with capacities
|
@@ -688,7 +720,8 @@ ws.git_get_status()
|
|
688
720
|
git_credentials = fc.get_my_git_credentials(workspace_id="123123")
|
689
721
|
|
690
722
|
# Update my credentials
|
691
|
-
fc.update_my_git_credentials(workspace_id = "1232",
|
723
|
+
fc.update_my_git_credentials(workspace_id = "1232", source = "Automatic")
|
724
|
+
fc.update_my_git_credentials(workspace_id = "1232", source = "ConfiguredConnection", connection_id = "3f2504e0aasdfasdf")
|
692
725
|
|
693
726
|
# Update from git
|
694
727
|
fc.update_from_git(workspace_id="workspaceid", remote_commit_hash="commit_hash",
|
@@ -1199,6 +1232,15 @@ status_code = fca.role_assignments_bulk_unassign(domain.id, "Contributors", [pri
|
|
1199
1232
|
|
1200
1233
|
# Delete domain
|
1201
1234
|
status_code = fca.delete_domain(domain.id)
|
1235
|
+
|
1236
|
+
# List role assignments
|
1237
|
+
resp = fca.list_role_assignments(domain_id=domain.id)
|
1238
|
+
|
1239
|
+
# Sync role assignments to subdomains
|
1240
|
+
resp = fca.sync_role_assignments_to_subdomains(domain_id=domain.id, role="Contributor")
|
1241
|
+
|
1242
|
+
|
1243
|
+
|
1202
1244
|
```
|
1203
1245
|
|
1204
1246
|
### Admin API for External Data Shares
|
@@ -1,9 +1,31 @@
|
|
1
1
|
# Python SDK for Microsoft Fabric
|
2
2
|
|
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
|
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 October 10, 2025).
|
4
4
|
|
5
5
|

|
6
6
|
|
7
|
+
<a href="https://badgen.net/github/license/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
8
|
+
<img src="https://badgen.net/github/license/DaSenf1860/ms-fabric-sdk-core" alt="License">
|
9
|
+
</a>
|
10
|
+
<a href="https://badgen.net/github/releases/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
11
|
+
<img src="https://badgen.net/github/releases/DaSenf1860/ms-fabric-sdk-core" alt="Test">
|
12
|
+
</a>
|
13
|
+
<a href="https://badgen.net/github/contributors/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
14
|
+
<img src="https://badgen.net/github/contributors/DaSenf1860/ms-fabric-sdk-core" alt="Publish">
|
15
|
+
</a>
|
16
|
+
<a href="https://badgen.net/github/commits/DaSenf1860/ms-fabric-sdk-core" target="_blank">
|
17
|
+
<img src="https://badgen.net/github/commits/DaSenf1860/ms-fabric-sdk-core" alt="Commits">
|
18
|
+
</a>
|
19
|
+
<a href="https://badgen.net/pypi/v/msfabricpysdkcore" target="_blank">
|
20
|
+
<img src="https://badgen.net/pypi/v/msfabricpysdkcore" alt="Package version">
|
21
|
+
</a>
|
22
|
+
<a href="https://badgen.net/pypi/dm/msfabricpysdkcore" target="_blank">
|
23
|
+
<img src="https://badgen.net/pypi/dm/msfabricpysdkcore" alt="Monthly Downloads">
|
24
|
+
</a>
|
25
|
+
|
26
|
+
<p> </p>
|
27
|
+
|
28
|
+
|
7
29
|
The Microsoft Fabric REST APIs are documented [here](https://docs.microsoft.com/en-us/rest/api/fabric/).
|
8
30
|
The Azure Resoure Management APIs for Fabric are documented [here](https://learn.microsoft.com/en-us/rest/api/microsoftfabric/fabric-capacities?view=rest-microsoftfabric-2023-11-01).
|
9
31
|
They are designed to automate your Fabric processes.
|
@@ -193,6 +215,16 @@ print(result["applicationId"]))
|
|
193
215
|
# Deprovision Identity
|
194
216
|
fc.deprovision_identity(workspace_id=ws.id)
|
195
217
|
|
218
|
+
# Get network communication policy
|
219
|
+
policy = fc.get_network_communication_policy(workspace_id=ws.id)
|
220
|
+
|
221
|
+
# Set network communication policy
|
222
|
+
inbound = {'publicAccessRules': {'defaultAction': 'Allow'}}
|
223
|
+
outbound = {'publicAccessRules': {'defaultAction': 'Allow'}}
|
224
|
+
|
225
|
+
resp = fc.set_network_communication_policy(workspace_id=ws.id, inbound=inbound, outbound=outbound)
|
226
|
+
|
227
|
+
|
196
228
|
```
|
197
229
|
|
198
230
|
### Working with capacities
|
@@ -670,7 +702,8 @@ ws.git_get_status()
|
|
670
702
|
git_credentials = fc.get_my_git_credentials(workspace_id="123123")
|
671
703
|
|
672
704
|
# Update my credentials
|
673
|
-
fc.update_my_git_credentials(workspace_id = "1232",
|
705
|
+
fc.update_my_git_credentials(workspace_id = "1232", source = "Automatic")
|
706
|
+
fc.update_my_git_credentials(workspace_id = "1232", source = "ConfiguredConnection", connection_id = "3f2504e0aasdfasdf")
|
674
707
|
|
675
708
|
# Update from git
|
676
709
|
fc.update_from_git(workspace_id="workspaceid", remote_commit_hash="commit_hash",
|
@@ -1181,6 +1214,15 @@ status_code = fca.role_assignments_bulk_unassign(domain.id, "Contributors", [pri
|
|
1181
1214
|
|
1182
1215
|
# Delete domain
|
1183
1216
|
status_code = fca.delete_domain(domain.id)
|
1217
|
+
|
1218
|
+
# List role assignments
|
1219
|
+
resp = fca.list_role_assignments(domain_id=domain.id)
|
1220
|
+
|
1221
|
+
# Sync role assignments to subdomains
|
1222
|
+
resp = fca.sync_role_assignments_to_subdomains(domain_id=domain.id, role="Contributor")
|
1223
|
+
|
1224
|
+
|
1225
|
+
|
1184
1226
|
```
|
1185
1227
|
|
1186
1228
|
### Admin API for External Data Shares
|
@@ -67,7 +67,7 @@ class FabricClientAdmin(FabricClient):
|
|
67
67
|
|
68
68
|
return response.status_code
|
69
69
|
|
70
|
-
def create_domain(self, display_name, description = None, parent_domain_id = None):
|
70
|
+
def create_domain(self, display_name, description = None, parent_domain_id = None, preview="false"):
|
71
71
|
"""Method to create a domain
|
72
72
|
|
73
73
|
Args:
|
@@ -79,7 +79,7 @@ class FabricClientAdmin(FabricClient):
|
|
79
79
|
"""
|
80
80
|
from msfabricpysdkcore.domain import Domain
|
81
81
|
|
82
|
-
url = "https://api.fabric.microsoft.com/v1/admin/domains"
|
82
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/domains?preview={preview}"
|
83
83
|
body = {
|
84
84
|
"displayName": display_name
|
85
85
|
}
|
@@ -110,8 +110,8 @@ class FabricClientAdmin(FabricClient):
|
|
110
110
|
return_format="response")
|
111
111
|
|
112
112
|
return response.status_code
|
113
|
-
|
114
|
-
def get_domain_by_id(self, domain_id):
|
113
|
+
|
114
|
+
def get_domain_by_id(self, domain_id, preview="false"):
|
115
115
|
"""Method to get a domain by ID
|
116
116
|
|
117
117
|
Args:
|
@@ -121,14 +121,14 @@ class FabricClientAdmin(FabricClient):
|
|
121
121
|
"""
|
122
122
|
from msfabricpysdkcore.domain import Domain
|
123
123
|
|
124
|
-
url = f"https://api.fabric.microsoft.com/v1/admin/domains/{domain_id}"
|
124
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/domains/{domain_id}?preview={preview}"
|
125
125
|
|
126
126
|
domain_dict = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429], error_message = "Error getting domain",
|
127
127
|
return_format="json")
|
128
128
|
domain = Domain.from_dict(domain_dict, self)
|
129
129
|
return domain
|
130
130
|
|
131
|
-
def get_domain_by_name(self, domain_name):
|
131
|
+
def get_domain_by_name(self, domain_name, preview="false"):
|
132
132
|
"""Method to get a domain by name
|
133
133
|
|
134
134
|
Args:
|
@@ -139,10 +139,10 @@ class FabricClientAdmin(FabricClient):
|
|
139
139
|
domains = self.list_domains()
|
140
140
|
domains = [domain for domain in domains if domain.display_name == domain_name]
|
141
141
|
if len(domains) > 0:
|
142
|
-
return self.get_domain_by_id(domains[0].id)
|
142
|
+
return self.get_domain_by_id(domains[0].id, preview=preview)
|
143
143
|
raise ValueError("Domain not found")
|
144
144
|
|
145
|
-
def get_domain(self, domain_id = None, domain_name = None):
|
145
|
+
def get_domain(self, domain_id = None, domain_name = None, preview="false"):
|
146
146
|
"""Get a domain by ID or name
|
147
147
|
|
148
148
|
Args:
|
@@ -152,9 +152,9 @@ class FabricClientAdmin(FabricClient):
|
|
152
152
|
Domain: The Domain object
|
153
153
|
"""
|
154
154
|
if domain_id:
|
155
|
-
return self.get_domain_by_id(domain_id)
|
155
|
+
return self.get_domain_by_id(domain_id, preview=preview)
|
156
156
|
if domain_name:
|
157
|
-
return self.get_domain_by_name(domain_name)
|
157
|
+
return self.get_domain_by_name(domain_name, preview=preview)
|
158
158
|
raise ValueError("Either domain_id or domain_name must be provided")
|
159
159
|
|
160
160
|
def list_domain_workspaces(self, domain_id, workspace_objects = False):
|
@@ -179,7 +179,7 @@ class FabricClientAdmin(FabricClient):
|
|
179
179
|
|
180
180
|
return workspaces
|
181
181
|
|
182
|
-
def list_domains(self, nonEmptyOnly=False):
|
182
|
+
def list_domains(self, nonEmptyOnly=False, preview="false"):
|
183
183
|
"""List all domains in the tenant
|
184
184
|
|
185
185
|
Args:
|
@@ -188,7 +188,7 @@ class FabricClientAdmin(FabricClient):
|
|
188
188
|
list: List of Domain objects"""
|
189
189
|
from msfabricpysdkcore.domain import Domain
|
190
190
|
|
191
|
-
url = "https://api.fabric.microsoft.com/v1/admin/domains"
|
191
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/domains?preview={preview}"
|
192
192
|
if nonEmptyOnly:
|
193
193
|
url = f"{url}?nonEmptyOnly=True"
|
194
194
|
|
@@ -198,6 +198,23 @@ class FabricClientAdmin(FabricClient):
|
|
198
198
|
|
199
199
|
domains = [Domain.from_dict(i, self) for i in domains]
|
200
200
|
return domains
|
201
|
+
|
202
|
+
# GET https://api.fabric.microsoft.com/v1/admin/domains/{domainId}/roleAssignments?continuationToken={continuationToken}
|
203
|
+
def list_role_assignments(self, domain_id):
|
204
|
+
"""List role assignments in a domain
|
205
|
+
|
206
|
+
Args:
|
207
|
+
domain_id (str): The ID of the domain
|
208
|
+
Returns:
|
209
|
+
list: The list of role assignments
|
210
|
+
"""
|
211
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/domains/{domain_id}/roleAssignments"
|
212
|
+
|
213
|
+
items: list = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
214
|
+
error_message = "Error listing role assignments",
|
215
|
+
return_format="value_json", paging=True)
|
216
|
+
|
217
|
+
return items
|
201
218
|
|
202
219
|
def role_assignments_bulk_assign(self, domain_id, type, principals):
|
203
220
|
"""Assign a role to principals in bulk
|
@@ -243,6 +260,27 @@ class FabricClientAdmin(FabricClient):
|
|
243
260
|
return_format="response")
|
244
261
|
|
245
262
|
return response.status_code
|
263
|
+
|
264
|
+
# POST https://api.fabric.microsoft.com/v1/admin/domains/{domainId}/roleAssignments/syncToSubdomains
|
265
|
+
def sync_role_assignments_to_subdomains(self, domain_id, role):
|
266
|
+
"""Sync role assignments to subdomains
|
267
|
+
|
268
|
+
Args:
|
269
|
+
domain_id (str): The ID of the domain
|
270
|
+
role (str): The role to sync
|
271
|
+
Returns:
|
272
|
+
int: The status code of the response
|
273
|
+
"""
|
274
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/domains/{domain_id}/roleAssignments/syncToSubdomains"
|
275
|
+
body = {
|
276
|
+
"role": role
|
277
|
+
}
|
278
|
+
|
279
|
+
response:requests.Response = self.calling_routine(url = url, operation = "POST", body = body, response_codes = [200, 429],
|
280
|
+
error_message = "Error syncing role assignments to subdomains",
|
281
|
+
return_format="response")
|
282
|
+
|
283
|
+
return response.status_code
|
246
284
|
|
247
285
|
def unassign_all_domain_workspaces(self, domain_id):
|
248
286
|
"""Unassign all workspaces from a domain
|
@@ -279,7 +317,7 @@ class FabricClientAdmin(FabricClient):
|
|
279
317
|
|
280
318
|
return response.status_code
|
281
319
|
|
282
|
-
def update_domain(self, domain_id, description = None, display_name = None, contributors_scope = None, return_item = False):
|
320
|
+
def update_domain(self, domain_id, description = None, display_name = None, contributors_scope = None, return_item = False, preview="false"):
|
283
321
|
"""Method to update a domain
|
284
322
|
|
285
323
|
Args:
|
@@ -287,7 +325,7 @@ class FabricClientAdmin(FabricClient):
|
|
287
325
|
Returns:
|
288
326
|
Domain: The Domain object
|
289
327
|
"""
|
290
|
-
url = f"https://api.fabric.microsoft.com/v1/admin/domains/{domain_id}"
|
328
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/domains/{domain_id}?preview={preview}"
|
291
329
|
body = {}
|
292
330
|
if description:
|
293
331
|
body["description"] = description
|