msfabricpysdkcore 0.1.7__py3-none-any.whl → 0.2.1__py3-none-any.whl
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/adminapi.py +36 -10
- msfabricpysdkcore/coreapi.py +1027 -88
- msfabricpysdkcore/item.py +41 -2
- msfabricpysdkcore/job_instance.py +2 -1
- msfabricpysdkcore/otheritems.py +66 -10
- msfabricpysdkcore/workspace.py +148 -11
- {msfabricpysdkcore-0.1.7.dist-info → msfabricpysdkcore-0.2.1.dist-info}/METADATA +246 -12
- {msfabricpysdkcore-0.1.7.dist-info → msfabricpysdkcore-0.2.1.dist-info}/RECORD +11 -11
- {msfabricpysdkcore-0.1.7.dist-info → msfabricpysdkcore-0.2.1.dist-info}/WHEEL +1 -1
- {msfabricpysdkcore-0.1.7.dist-info → msfabricpysdkcore-0.2.1.dist-info}/LICENSE +0 -0
- {msfabricpysdkcore-0.1.7.dist-info → msfabricpysdkcore-0.2.1.dist-info}/top_level.txt +0 -0
msfabricpysdkcore/adminapi.py
CHANGED
@@ -279,7 +279,7 @@ class FabricClientAdmin(FabricClient):
|
|
279
279
|
|
280
280
|
return response.status_code
|
281
281
|
|
282
|
-
def update_domain(self, domain_id, description = None, display_name = None, contributors_scope = None, return_item =
|
282
|
+
def update_domain(self, domain_id, description = None, display_name = None, contributors_scope = None, return_item = False):
|
283
283
|
"""Method to update a domain
|
284
284
|
|
285
285
|
Args:
|
@@ -301,15 +301,7 @@ class FabricClientAdmin(FabricClient):
|
|
301
301
|
response_json = self.calling_routine(url = url, operation = "PATCH", body = body,
|
302
302
|
response_codes = [200, 429], error_message = "Error updating domain",
|
303
303
|
return_format="json")
|
304
|
-
|
305
|
-
if return_item == "Default":
|
306
|
-
warn(
|
307
|
-
message="Updating a domain currently will make invoke an additional API call to get the domain "
|
308
|
-
"object. This default behaviour will change in newer versions of the SDK. To keep this "
|
309
|
-
"behaviour, set return_item=True in the function call.",
|
310
|
-
category=FutureWarning,
|
311
|
-
stacklevel=2
|
312
|
-
)
|
304
|
+
|
313
305
|
if return_item:
|
314
306
|
return self.get_domain_by_id(domain_id)
|
315
307
|
return response_json
|
@@ -581,6 +573,19 @@ class FabricClientAdmin(FabricClient):
|
|
581
573
|
|
582
574
|
workspace = AdminWorkspace.from_dict(response_json, self)
|
583
575
|
return workspace
|
576
|
+
|
577
|
+
# GET https://api.fabric.microsoft.com/v1/admin/workspaces/discoverGitConnections
|
578
|
+
def discover_git_connections(self):
|
579
|
+
"""Discover Git connections
|
580
|
+
|
581
|
+
Returns:
|
582
|
+
dict: The Git connections
|
583
|
+
"""
|
584
|
+
url = "https://api.fabric.microsoft.com/v1/admin/workspaces/discoverGitConnections"
|
585
|
+
|
586
|
+
response_json = self.calling_routine(url = url, operation = "GET", response_codes = [200, 429],
|
587
|
+
error_message = "Error discovering Git connections", return_format="value_json", paging=True)
|
588
|
+
return response_json
|
584
589
|
|
585
590
|
def list_workspace_access_details(self, workspace_id):
|
586
591
|
"""Get the access details of the workspace
|
@@ -639,3 +644,24 @@ class FabricClientAdmin(FabricClient):
|
|
639
644
|
workspaces = [AdminWorkspace.from_dict(i, self) for i in workspaces]
|
640
645
|
|
641
646
|
return workspaces
|
647
|
+
|
648
|
+
def restore_workspace(self, workspace_id, new_workspace_admin_principal, new_workspace_name = None):
|
649
|
+
"""Restore a workspace
|
650
|
+
|
651
|
+
Args:
|
652
|
+
workspace_id (str): The ID of the workspace
|
653
|
+
Returns:
|
654
|
+
response: The response from the API
|
655
|
+
"""
|
656
|
+
|
657
|
+
restore_request = {
|
658
|
+
"newWorkspaceAdminPrincipal": new_workspace_admin_principal,
|
659
|
+
"newWorkspaceName": new_workspace_name
|
660
|
+
}
|
661
|
+
url = f"https://api.fabric.microsoft.com/v1/admin/workspaces/{workspace_id}/restore"
|
662
|
+
|
663
|
+
response_json = self.calling_routine(url = url, operation = "POST", body = restore_request,
|
664
|
+
response_codes = [200, 429], error_message = "Error restoring workspace",
|
665
|
+
return_format="response")
|
666
|
+
|
667
|
+
return response_json
|