Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def default_api_version(self):
ResourceType.DATA_KEYVAULT_ADMINISTRATION_ACCESS_CONTROL: '7.4',
ResourceType.DATA_STORAGE_BLOB: '2022-11-02',
ResourceType.DATA_STORAGE_FILEDATALAKE: '2021-08-06',
ResourceType.DATA_STORAGE_FILESHARE: '2025-05-05',
ResourceType.DATA_STORAGE_FILESHARE: '2025-07-05',
ResourceType.DATA_STORAGE_QUEUE: '2018-03-28',
ResourceType.DATA_STORAGE_TABLE: None,
ResourceType.MGMT_SERVICEBUS: None,
Expand Down
23 changes: 23 additions & 0 deletions src/azure-cli/azure/cli/command_modules/storage/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -3190,3 +3190,26 @@
text: |
az storage file hard-link create --account-name MyAccount --share-name share --path link_path --target original_path
"""

helps['storage file symbolic-link'] = """
type: group
short-summary: Manage storage file symbolic-link.
"""

helps['storage file symbolic-link create'] = """
type: command
short-summary: NFS only. Creates a symbolic link to the specified file.
examples:
- name: Create a symbolic link to an NFS file specified by path.
text: |
az storage file symbolic-link create --account-name MyAccount --share-name share --path link_path --target target_path --metadata meta1=value1 meta2=value2 --file-creation-time now --file-last-write-time now --owner 6 --group 7
"""

helps['storage file symbolic-link show'] = """
type: command
short-summary: NFS only. Gets the symbolic link for the file client.
examples:
- name: Show the symbolic link to an NFS file specified by path.
text: |
az storage file symbolic-link show --account-name MyAccount --share-name share --path link_path
"""
20 changes: 20 additions & 0 deletions src/azure-cli/azure/cli/command_modules/storage/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2798,3 +2798,23 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
'same share and the same storage account.')
c.extra('lease',
help='Lease id, required if the file has an active lease.')

with self.argument_context('storage file symbolic-link create') as c:
c.extra('share_name', share_name_type, required=True)
c.register_path_argument()
c.argument('target', required=True,
help='Specifies the file path the symbolic link will point to. '
'The file path can be either relative or absolute.')
c.extra('metadata', nargs='+',
help='Metadata in space-separated key=value pairs. This overwrites any existing metadata.',
validator=validate_metadata)
c.extra('file_creation_time', help='Creation time for the file.')
c.extra('file_last_write_time', help='Last write time for the file.')
c.extra('owner', help='The owner of the file.')
c.extra('group', help='The owning group of the file.')
c.extra('lease',
help='Lease id, required if the file has an active lease. ')

with self.argument_context('storage file symbolic-link show') as c:
c.extra('share_name', share_name_type, required=True)
c.register_path_argument()
2 changes: 2 additions & 0 deletions src/azure-cli/azure/cli/command_modules/storage/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ def get_custom_sdk(custom_module, client_factory, resource_type=ResourceType.MGM
transform=transform_file_show_result)
g.storage_custom_command_oauth('download-batch', 'storage_file_download_batch', client_factory=cf_share_client)
g.storage_command_oauth('hard-link create', 'create_hardlink')
g.storage_command_oauth('symbolic-link create', 'create_symlink')
g.storage_command_oauth('symbolic-link show', 'get_symlink')

with self.command_group('storage cors', get_custom_sdk('cors', multi_service_properties_factory)) as g:
from ._transformers import transform_cors_list_output
Expand Down
Loading