msfabricpysdkcore 0.2.8__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.8 → msfabricpysdkcore-0.2.10}/PKG-INFO +81 -5
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/README.md +80 -4
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/adminapi.py +52 -14
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/client.py +2 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/coreapi.py +906 -40
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/domain.py +36 -5
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/item.py +5 -0
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/lakehouse.py +79 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/otheritems.py +216 -1
- msfabricpysdkcore-0.2.10/msfabricpysdkcore/tests/test_anomaly_detector.py +60 -0
- {msfabricpysdkcore-0.2.8 → 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.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_workspaces_capacities.py +12 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/workspace.py +482 -9
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/PKG-INFO +81 -5
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/SOURCES.txt +2 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/pyproject.toml +1 -1
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/setup.py +1 -1
- msfabricpysdkcore-0.2.8/msfabricpysdkcore/lakehouse.py +0 -35
- msfabricpysdkcore-0.2.8/msfabricpysdkcore/tests/test_sql_endpoint.py +0 -28
- msfabricpysdkcore-0.2.8/msfabricpysdkcore/tests/test_warehouses.py +0 -50
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/LICENSE +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/__init__.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/admin_item.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/admin_workspace.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/auth.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/capacity.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/deployment_pipeline.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/environment.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/eventstream.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/fabric_azure_capacity.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/fabric_azure_client.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/folder.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/job_instance.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/long_running_operation.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/onelakeshortcut.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/spark_custom_pool.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/__init__.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_admin_apis.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_admin_tags.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_apache_airflow_job.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_connection.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_copy_jobs.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_datapipelines.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_deployment_pipelinev2.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_digital_twin_builder.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_domains.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_environments.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_evenstreams.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_eventhouses.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_eventstream_topology.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_external_data_shares.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_fabric_azure_client.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_folders.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_gateways.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_git.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_graphqlapi.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_items.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_jobs.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_kql_dashboards.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_kql_queryset.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_kqldatabases.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_lakehouse.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_managed_private_endpoints.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_mirrored_azuredatabricks_catalog.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_mirroreddatabases.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_ml_experiments.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_ml_models.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_mounted_adf.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_notebooks.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_one_lake_data_access_security.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_other_items.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_reflex.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_reports.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_semantic_model.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_shortcuts.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_spark.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_sparkjobdefinition.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_sqldatabases.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_tags.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/tests/test_variable_libary.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/util/__init__.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore/util/logger.py +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/dependency_links.txt +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/requires.txt +0 -0
- {msfabricpysdkcore-0.2.8 → msfabricpysdkcore-0.2.10}/msfabricpysdkcore.egg-info/top_level.txt +0 -0
- {msfabricpysdkcore-0.2.8 → 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
|
@@ -653,9 +685,15 @@ git_provider_details = {'organizationName': 'dasenf1860',
|
|
653
685
|
'branchName': 'main',
|
654
686
|
'directoryName': '/folder1'}
|
655
687
|
|
656
|
-
|
688
|
+
# Optional:
|
689
|
+
my_git_credentials = {
|
690
|
+
"source": "ConfiguredConnection",
|
691
|
+
"connectionId": "3f2asdfasdf82c3301"
|
692
|
+
}
|
693
|
+
|
694
|
+
fc.git_connect(workspace_id="workspaceid", git_provider_details=git_provider_details, my_git_credentials=my_git_credentials)
|
657
695
|
# or
|
658
|
-
ws.git_connect(git_provider_details=git_provider_details)
|
696
|
+
ws.git_connect(git_provider_details=git_provider_details, my_git_credentials=my_git_credentials)
|
659
697
|
|
660
698
|
|
661
699
|
# Initialize a git connection
|
@@ -682,7 +720,8 @@ ws.git_get_status()
|
|
682
720
|
git_credentials = fc.get_my_git_credentials(workspace_id="123123")
|
683
721
|
|
684
722
|
# Update my credentials
|
685
|
-
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")
|
686
725
|
|
687
726
|
# Update from git
|
688
727
|
fc.update_from_git(workspace_id="workspaceid", remote_commit_hash="commit_hash",
|
@@ -731,6 +770,34 @@ item.create_shortcut(path="path",
|
|
731
770
|
"workspaceId": "workspace_id_target"}})
|
732
771
|
|
733
772
|
|
773
|
+
# Bulk create shortcuts
|
774
|
+
fc.create_shortcuts_bulk(workspace_id="workspace_id",
|
775
|
+
item_id="item_id",
|
776
|
+
create_shortcut_requests=[
|
777
|
+
{
|
778
|
+
"path": "Files",
|
779
|
+
"name": "sales_2023",
|
780
|
+
"target": {
|
781
|
+
"oneLake": {
|
782
|
+
"workspaceId": "workspace_id_target",
|
783
|
+
"itemId": "item_id_target",
|
784
|
+
"path": "Tables/Sales2023"
|
785
|
+
}
|
786
|
+
}
|
787
|
+
},
|
788
|
+
{
|
789
|
+
"path": "Files/landingZone",
|
790
|
+
"name": "PartnerProducts",
|
791
|
+
"target": {
|
792
|
+
"adlsGen2": {
|
793
|
+
"location": "https://casdfasdfat.dfs.core.windows.net",
|
794
|
+
"subpath": "/mycontainer/data/ContosoProducts",
|
795
|
+
"connectionId": "91asdfasdfa1e"
|
796
|
+
}
|
797
|
+
}
|
798
|
+
}
|
799
|
+
])
|
800
|
+
|
734
801
|
# Get a shortcut
|
735
802
|
shortcut = fc.get_shortcut(workspace_id="workspace_id",
|
736
803
|
item_id="item_id",
|
@@ -1165,6 +1232,15 @@ status_code = fca.role_assignments_bulk_unassign(domain.id, "Contributors", [pri
|
|
1165
1232
|
|
1166
1233
|
# Delete domain
|
1167
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
|
+
|
1168
1244
|
```
|
1169
1245
|
|
1170
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
|
@@ -635,9 +667,15 @@ git_provider_details = {'organizationName': 'dasenf1860',
|
|
635
667
|
'branchName': 'main',
|
636
668
|
'directoryName': '/folder1'}
|
637
669
|
|
638
|
-
|
670
|
+
# Optional:
|
671
|
+
my_git_credentials = {
|
672
|
+
"source": "ConfiguredConnection",
|
673
|
+
"connectionId": "3f2asdfasdf82c3301"
|
674
|
+
}
|
675
|
+
|
676
|
+
fc.git_connect(workspace_id="workspaceid", git_provider_details=git_provider_details, my_git_credentials=my_git_credentials)
|
639
677
|
# or
|
640
|
-
ws.git_connect(git_provider_details=git_provider_details)
|
678
|
+
ws.git_connect(git_provider_details=git_provider_details, my_git_credentials=my_git_credentials)
|
641
679
|
|
642
680
|
|
643
681
|
# Initialize a git connection
|
@@ -664,7 +702,8 @@ ws.git_get_status()
|
|
664
702
|
git_credentials = fc.get_my_git_credentials(workspace_id="123123")
|
665
703
|
|
666
704
|
# Update my credentials
|
667
|
-
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")
|
668
707
|
|
669
708
|
# Update from git
|
670
709
|
fc.update_from_git(workspace_id="workspaceid", remote_commit_hash="commit_hash",
|
@@ -713,6 +752,34 @@ item.create_shortcut(path="path",
|
|
713
752
|
"workspaceId": "workspace_id_target"}})
|
714
753
|
|
715
754
|
|
755
|
+
# Bulk create shortcuts
|
756
|
+
fc.create_shortcuts_bulk(workspace_id="workspace_id",
|
757
|
+
item_id="item_id",
|
758
|
+
create_shortcut_requests=[
|
759
|
+
{
|
760
|
+
"path": "Files",
|
761
|
+
"name": "sales_2023",
|
762
|
+
"target": {
|
763
|
+
"oneLake": {
|
764
|
+
"workspaceId": "workspace_id_target",
|
765
|
+
"itemId": "item_id_target",
|
766
|
+
"path": "Tables/Sales2023"
|
767
|
+
}
|
768
|
+
}
|
769
|
+
},
|
770
|
+
{
|
771
|
+
"path": "Files/landingZone",
|
772
|
+
"name": "PartnerProducts",
|
773
|
+
"target": {
|
774
|
+
"adlsGen2": {
|
775
|
+
"location": "https://casdfasdfat.dfs.core.windows.net",
|
776
|
+
"subpath": "/mycontainer/data/ContosoProducts",
|
777
|
+
"connectionId": "91asdfasdfa1e"
|
778
|
+
}
|
779
|
+
}
|
780
|
+
}
|
781
|
+
])
|
782
|
+
|
716
783
|
# Get a shortcut
|
717
784
|
shortcut = fc.get_shortcut(workspace_id="workspace_id",
|
718
785
|
item_id="item_id",
|
@@ -1147,6 +1214,15 @@ status_code = fca.role_assignments_bulk_unassign(domain.id, "Contributors", [pri
|
|
1147
1214
|
|
1148
1215
|
# Delete domain
|
1149
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
|
+
|
1150
1226
|
```
|
1151
1227
|
|
1152
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
|
@@ -118,6 +118,8 @@ class FabricClient():
|
|
118
118
|
if wait_for_completion:
|
119
119
|
operation_result = self.long_running_operation(response.headers)
|
120
120
|
if "operation_result" in return_format:
|
121
|
+
if ("value_json" in return_format and isinstance(operation_result, dict) and "value" in operation_result):
|
122
|
+
return operation_result["value"]
|
121
123
|
return operation_result
|
122
124
|
return response
|
123
125
|
elif response.status_code not in response_codes:
|