You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sempy_labs/_external_data_shares.py
+55-1Lines changed: 55 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@
7
7
_base_api,
8
8
_create_dataframe,
9
9
resolve_item_id,
10
+
resolve_item_name_and_id,
11
+
resolve_workspace_id,
10
12
)
11
13
fromsempy._utils._logimportlog
12
14
@@ -24,6 +26,8 @@ def create_external_data_share(
24
26
25
27
This is a wrapper function for the following API: `External Data Shares - Create External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/create-external-data-share>`_.
26
28
29
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
30
+
27
31
Parameters
28
32
----------
29
33
item_name : str
@@ -53,6 +57,7 @@ def create_external_data_share(
53
57
method="post",
54
58
status_codes=201,
55
59
payload=payload,
60
+
client="fabric_sp",
56
61
)
57
62
print(
58
63
f"{icons.green_dot} An external data share was created for the '{item_name}' {item_type} within the '{workspace_name}' workspace for the {paths} paths."
@@ -71,6 +76,8 @@ def revoke_external_data_share(
71
76
72
77
This is a wrapper function for the following API: `External Data Shares - Revoke External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/revoke-external-data-share`_.
73
78
79
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
f"{icons.green_dot} The '{external_data_share_id}' external data share for the '{item_name}' {item_type} within the '{workspace_name}' workspace has been revoked."
This is a wrapper function for the following API: `External Data Shares - List External Data Shares In Item <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares/list-external-data-shares-in-item`_.
108
116
117
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
This is a wrapper function for the following API: `External Data Shares Provider - Delete External Data Share <https://learn.microsoft.com/rest/api/fabric/core/external-data-shares-provider/delete-external-data-share`_.
201
+
202
+
Service Principal Authentication is supported (see `here <https://github.com/microsoft/semantic-link-labs/blob/main/notebooks/Service%20Principal.ipynb>`_ for examples).
203
+
204
+
Parameters
205
+
----------
206
+
external_data_share_id : uuid.UUID
207
+
The external data share ID.
208
+
item : str | uuid.UUID
209
+
The item name or ID.
210
+
item_type : str
211
+
The `item type <https://learn.microsoft.com/rest/api/fabric/core/items/list-items?tabs=HTTP#itemtype>`_.
212
+
workspace : str | uuid.UUID, default=None
213
+
The Fabric workspace name or ID.
214
+
Defaults to None which resolves to the workspace of the attached lakehouse
215
+
or if no lakehouse attached, resolves to the workspace of the notebook.
f"{icons.green_dot} The '{external_data_share_id}' external data share for the '{item_name}' {item_type} within the '{workspace_name}' workspace has been revoked."
0 commit comments