Conversation
️✔️AzureCLI-FullTest
|
|
Hi @calvinhzy, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| storage account create | cmd storage account create added parameter sas_expiration_action |
||
| storage account update | cmd storage account update added parameter sas_expiration_action |
|
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>
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new parameter, --sas-expiration-action, to the storage account create/update commands to allow specifying the SAS expiration behavior. Key changes include updated tests to validate the new parameter, modifications in the account operations to enforce that --sas-expiration-action is specified only together with --sas-expiration-period, and updated CLI parameter definitions.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/latest/test_storage_account_scenarios.py | Added tests verifying behavior for the new SAS expiration action parameter including error conditions. |
| azure/cli/command_modules/storage/operations/account.py | Updated create and update functions to accept the new --sas-expiration-action parameter and enforce its correct usage. |
| azure/cli/command_modules/storage/_params.py | Registered the new CLI argument with an appropriate help message and type definition. |
Comments suppressed due to low confidence (2)
src/azure-cli/azure/cli/command_modules/storage/operations/account.py:270
- Consider adding an inline comment here to clarify that providing --sas-expiration-action without --sas-expiration-period is invalid and will trigger an error.
if sas_expiration_period is None and sas_expiration_action is not None:
src/azure-cli/azure/cli/command_modules/storage/operations/account.py:662
- Consider adding a comment explaining the fallback logic for sas_expiration_action (defaulting to 'Log' or using the existing instance value) to improve clarity for future maintainers.
if sas_expiration_action is None:
Related command
az stroage account create/updateDescription
Add
--sas-expiration-actionto block expired sas policies.Testing Guide
History Notes
[Storage]
az storage account create/update: Add--sas-expiration-actionto sas policyThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.