Add fileshares extension for 2025-09-01-preview api version#9697
Add fileshares extension for 2025-09-01-preview api version#9697ankushbindlish2 wants to merge 1 commit intoAzure:mainfrom
Conversation
- Add Microsoft.FileShares CLI extension (2025-09-01-preview API) - 21 commands across 4 command groups (all Preview stage) - Command groups: file-shares, file-share, file-share-snapshot, private-endpoint-connection, private-link-resource - Generated from AAZ command models
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @ankushbindlish2, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
Adds a new Azure CLI extension (fileshares) for managing Microsoft.FileShares resources, with command implementations generated from AAZ models.
Changes:
- Introduces the
filesharesextension packaging scaffold (setup, metadata, README/HISTORY). - Adds AAZ-generated command groups and commands for file shares, snapshots, private endpoint connections, and private link resources, plus utility commands (name availability, limits, usage, recommendations).
- Adds initial test scaffolding under
azext_fileshares/tests.
Reviewed changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/fileshares/setup.py | Extension packaging metadata and wheel build configuration. |
| src/fileshares/setup.cfg | Setup config placeholder file (repository convention). |
| src/fileshares/README.md | Extension readme scaffold. |
| src/fileshares/HISTORY.rst | Changelog scaffold for initial beta version. |
| src/fileshares/azext_fileshares/init.py | Command loader wiring (loads AAZ command table + legacy hooks). |
| src/fileshares/azext_fileshares/azext_metadata.json | Extension metadata (preview flag, min CLI core version). |
| src/fileshares/azext_fileshares/_help.py | Help module scaffold (imports helps). |
| src/fileshares/azext_fileshares/_params.py | Argument loading hook scaffold. |
| src/fileshares/azext_fileshares/commands.py | Legacy command table hook scaffold. |
| src/fileshares/azext_fileshares/custom.py | Custom command module scaffold (logger). |
| src/fileshares/azext_fileshares/aaz/init.py | AAZ package root for generated commands. |
| src/fileshares/azext_fileshares/aaz/latest/init.py | AAZ “latest” namespace marker. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/__cmd_group.py | Registers top-level file-shares command group. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/init.py | Exposes file_shares command group + utility commands. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/_check_name_availability.py | Implements file-shares check-name-availability. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/_get_limit.py | Implements file-shares get-limit. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/_get_provisioning_recommendation.py | Implements file-shares get-provisioning-recommendation. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/_get_usage_datum.py | Implements file-shares get-usage-datum. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/__cmd_group.py | Registers file-shares file-share command group. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/init.py | Exposes file share CRUD + wait/list commands. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_create.py | Implements file-shares file-share create. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_delete.py | Implements file-shares file-share delete. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_list.py | Implements file-shares file-share list. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_show.py | Implements file-shares file-share show. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_update.py | Implements file-shares file-share update (generic update enabled). |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_wait.py | Implements file-shares file-share wait. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/__cmd_group.py | Registers file-shares file-share file-share-snapshot group. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/init.py | Exposes snapshot CRUD/list/update commands. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_create.py | Implements file-share-snapshot create. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_delete.py | Implements file-share-snapshot delete. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_list.py | Implements file-share-snapshot list. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_show.py | Implements file-share-snapshot show. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_update.py | Implements file-share-snapshot update. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/__cmd_group.py | Registers private-endpoint-connection subgroup. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/init.py | Exposes private endpoint connection commands. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_create.py | Implements private-endpoint-connection create. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_delete.py | Implements private-endpoint-connection delete. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_list.py | Implements private-endpoint-connection list. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_show.py | Implements private-endpoint-connection show. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_update.py | Implements private-endpoint-connection update (generic update enabled). |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_wait.py | Implements private-endpoint-connection wait. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/__cmd_group.py | Registers private-link-resource subgroup. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/init.py | Exposes private link resource commands. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/_list.py | Implements private-link-resource list. |
| src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/_show.py | Implements private-link-resource show. |
| src/fileshares/azext_fileshares/tests/init.py | Test package marker. |
| src/fileshares/azext_fileshares/tests/latest/init.py | Test version namespace marker. |
| src/fileshares/azext_fileshares/tests/latest/test_fileshares.py | Scenario test scaffold for the extension. |
| _aaz_info = { | ||
| "version": "2026-06-01", | ||
| "resources": [ | ||
| ["mgmt-plane", "/subscriptions/{}/providers/microsoft.fileshares/locations/{}/checknameavailability", "2026-06-01"], | ||
| ] | ||
| } | ||
|
|
| az file-shares file-share file-share-snapshot list --resource-group rgfileshares --resource-name fileshare | ||
|
|
||
| :example: FileShareSnapshot_List_MinimumSet | ||
| az file-shares file-share file-share-snapshot list --resource-group rgfileshares --resource-name fileshare --resource-group rgfileshares --resource-name testfileshare |
| az file-shares file-share list --resource-group rgfileshares | ||
|
|
||
| :example: FileShares_ListByParent_MinimumSet | ||
| az file-shares file-share list --resource-group rgfileshares --resource-group rgfileshares |
| az file-shares get-usage-datum --location westus | ||
|
|
||
| :example: FileShare_GetUsageData_MinimumSet | ||
| az file-shares get-usage-datum --location westus --location westus |
| from azure.cli.testsdk import * | ||
|
|
||
|
|
||
| class FilesharesScenario(ScenarioTest): | ||
| # TODO: add tests here | ||
| pass |
| # Azure CLI Fileshares Extension # | ||
| This is an extension to Azure CLI to manage Fileshares resources. | ||
|
|
||
| ## How to use ## | ||
| Please add commands usage here. No newline at end of file |
| az file-shares get-provisioning-recommendation --location westus --provisioned-storage-gi-b 7 | ||
|
|
||
| :example: FileShare_GetProvisioningRecommendation_MinimumSet | ||
| az file-shares get-provisioning-recommendation --location westus --provisioned-storage-gi-b 7 --location westus --provisioned-storage-gi-b 7 |
| az file-shares check-name-availability --location westus --name fvykqbgmd --type Microsoft.FileShares/fileShares | ||
|
|
||
| :example: FileShares_CheckNameAvailability_MinimumSet | ||
| az file-shares check-name-availability --location westus --name fvykqbgmd --type Microsoft.FileShares/fileShares --location westus |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.