@@ -1737,3 +1737,84 @@ def create_hardlink(
17371737 ))
17381738 except HttpResponseError as error :
17391739 process_storage_error (error )
1740+
1741+ @distributed_trace
1742+ def create_symlink (
1743+ self , target : str ,
1744+ * ,
1745+ metadata : Optional [Dict [str , str ]] = None ,
1746+ file_creation_time : Optional [Union [str , datetime ]] = None ,
1747+ file_last_write_time : Optional [Union [str , datetime ]] = None ,
1748+ owner : Optional [str ] = None ,
1749+ group : Optional [str ] = None ,
1750+ lease : Optional [Union [ShareLeaseClient , str ]] = None ,
1751+ timeout : Optional [int ] = None ,
1752+ ** kwargs : Any
1753+ ) -> Dict [str , Any ]:
1754+ """NFS only. Creates a symbolic link to the specified file.
1755+
1756+ :param str target:
1757+ Specifies the file path the symbolic link will point to. The file path can be either relative or absolute.
1758+ :keyword dict[str, str] metadata:
1759+ Name-value pairs associated with the file as metadata.
1760+ :keyword file_creation_time: Creation time for the file.
1761+ :paramtype file_creation_time: str or ~datetime.datetime
1762+ :keyword file_last_write_time: Last write time for the file.
1763+ :paramtype file_last_write_time: str or ~datetime.datetime
1764+ :keyword str owner: The owner of the file.
1765+ :keyword str group: The owning group of the file.
1766+ :keyword lease:
1767+ Required if the file has an active lease. Value can be a ShareLeaseClient object
1768+ or the lease ID as a string.
1769+ :paramtype lease: ~azure.storage.fileshare.ShareLeaseClient or str
1770+ :keyword int timeout:
1771+ Sets the server-side timeout for the operation in seconds. For more details see
1772+ https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
1773+ This value is not tracked or validated on the client. To configure client-side network timeouts
1774+ see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-share
1775+ #other-client--per-operation-configuration>`__.
1776+ :returns: File-updated property dict (ETag and last modified).
1777+ :rtype: dict[str, Any]
1778+ """
1779+ try :
1780+ return cast (Dict [str , Any ], self ._client .file .create_symbolic_link (
1781+ link_text = target ,
1782+ metadata = metadata ,
1783+ file_creation_time = file_creation_time ,
1784+ file_last_write_time = file_last_write_time ,
1785+ owner = owner ,
1786+ group = group ,
1787+ lease_access_conditions = lease ,
1788+ timeout = timeout ,
1789+ cls = return_response_headers ,
1790+ ** kwargs
1791+ ))
1792+ except HttpResponseError as error :
1793+ process_storage_error (error )
1794+
1795+ @distributed_trace
1796+ def get_symlink (
1797+ self ,
1798+ * ,
1799+ timeout : Optional [int ] = None ,
1800+ ** kwargs : Any
1801+ ) -> Dict [str , Any ]:
1802+ """NFS only. Gets the symbolic link for the file client.
1803+
1804+ :keyword int timeout:
1805+ Sets the server-side timeout for the operation in seconds. For more details see
1806+ https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
1807+ This value is not tracked or validated on the client. To configure client-side network timeouts
1808+ see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-share
1809+ #other-client--per-operation-configuration>`__.
1810+ :returns: File-updated property dict (ETag and last modified).
1811+ :rtype: dict[str, Any]
1812+ """
1813+ try :
1814+ return cast (Dict [str , Any ], self ._client .file .get_symbolic_link (
1815+ timeout = timeout ,
1816+ cls = return_response_headers ,
1817+ ** kwargs
1818+ ))
1819+ except HttpResponseError as error :
1820+ process_storage_error (error )
0 commit comments