File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed
Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -514,15 +514,17 @@ Generates new temporary
514514[Shared Access Signature](https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview)
515515for a file share, attached to a storage account.
516516
517- **NOTES**:
518- 1) The generated SAS is valid for 5 minutes.
519-
520517# ## Inputs
521- | Name | Description | Optional |
522- |----------------|:-----------------------------------------|----------|
523- | directory_name | Path within file share | False |
524- | account_key | Name of the storage account of the share | False |
525- | account_name | Key of the storage account of the share | False |
518+ | Name | Description | Optional | Default Value |
519+ |-----------------|:-----------------------------------------------------------------|----------|---------------|
520+ | directory_name | Path within file share | False | |
521+ | account_key | Name of the storage account of the share | False | |
522+ | account_name | Key of the storage account of the share | False | |
523+ | expiration_date | Expiration date in format that can be used by the `date` command | True | +10 minutes |
524+
525+
526+ **NOTES**:
527+ 1) For the expiration date format see [man 1 date](https://man7.org/linux/man-pages/man1/date.1.html)
526528
527529# ## Outputs
528530| Name | Description |
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ inputs:
1818 description : Storage account name
1919 required : true
2020
21+ expiration_date :
22+ description : Expiration date in format that can be used by date command
23+ required : false
24+ default : " +10 minutes"
25+
2126
2227outputs :
2328 authorized_destination :
3439 DIRECTORY_NAME : ${{ inputs.directory_name }}
3540 ACCOUNT_KEY : ${{ inputs.account_key }}
3641 ACCOUNT_NAME : ${{ inputs.account_name }}
42+ EXPIRATION_DATE : ${{ inputs.expiration_date }}
3743 id : sas
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ set -Eeuo pipefail
1818
1919destination=" https://$ACCOUNT_NAME .file.core.windows.net/$DIRECTORY_NAME "
2020
21- echo " Generating SAS for upload to $destination "
22- end= $( date -d ' +5 minutes ' ' +%Y-%m-%dT%H:%MZ ' )
21+ end= $( date -d " $EXPIRATION_DATE " ' +%Y-%m-%dT%H:%MZ ' )
22+ echo " Generating SAS for $destination with expiration date $end "
2323sas=$(
2424 az storage account generate-sas \
2525 --account-key " $ACCOUNT_KEY " \
You can’t perform that action at this time.
0 commit comments