Azure / Azure/azure-cli

Add parameter to specify SAS expiration as timespan

Open
#11,049 5 comments 0 reactions 1 assignee Claimed by @Juliehzl View on GitHub
act-codegen-extensibility-squad customer-reported feature-request Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**
The various commands to generate Shared Access Signatures, such as `az storage share generate-sas` only support specifying the signature expiration time using the `--expiry` argument, which takes an absolute date/time value in a specific format.

This is inconvenient many times when you're trying to quickly generate a SAS.

**Describe the solution you'd like**
It would be great to be able to specify expiration time as a timespan value, rather than an absolute time.

**Describe alternatives you've considered**
This could be done by either making the `--expiry` argument support timespan values, or by adding a separate `--expires-in` argument or similar.

For example:
`az storage share generate-sas ..... --expiry PT1H`

(or whatever other easy to parse timespan format is suitable here).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.