[Storage] az storage account create/update: Support sas&key policy#17815
Merged
[Storage] az storage account create/update: Support sas&key policy#17815
az storage account create/update: Support sas&key policy#17815Conversation
… key policy expiration
az storage account create/update: Support sas&key policy expirationaz storage account create/update: Support sas&key policy
Collaborator
|
Storage |
Juliehzl
reviewed
Apr 26, 2021
| ) | ||
|
|
||
| key_expiration_period_in_days_type = CLIArgumentType( | ||
| options_list=['--key-expiration-period-in-days', '--key-exp-days'], min_api='2021-02-01', type=int, |
Contributor
There was a problem hiding this comment.
Could I set the parameter with any int value? Typically days related parameter needs to be non-negative values. And is there a upper bound for the days?
Member
Author
There was a problem hiding this comment.
No detail info from SDK or swagger. So I left value check for server side.
Juliehzl
reviewed
Apr 26, 2021
|
|
||
| @api_version_constraint(ResourceType.MGMT_STORAGE, min_api='2021-02-01') | ||
| @ResourceGroupPreparer(location='eastus', name_prefix='cli_storage_account') | ||
| def test_storage_account_with_key_and_sas_policy(self, resource_group): |
Contributor
There was a problem hiding this comment.
could you add test with 100000 days because it is a workaround to disable as e-mail mentioned?
Juliehzl
approved these changes
Apr 27, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Support set
KeyPolicyandSASPolicywhen creating or updating storage accountTesting Guide
az storage create/update -n mystorageaccount -g myresourcegroup --key-exp-days 3 --sas-exp 5.23:59:59This 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.