You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Storage/Storage.Management.Test/SessionRecords/Microsoft.Azure.Commands.Management.Storage.Test.ScenarioTests.StorageAccountTests/TestAzureStorageAccountKeySASPolicy.json
Copy file name to clipboardExpand all lines: src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -466,6 +466,12 @@ public TimeSpan SasExpirationPeriod
466
466
}
467
467
privateTimeSpan?sasExpirationPeriod=null;
468
468
469
+
[Parameter(Mandatory=false,HelpMessage="The action to be performed when SasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period. The default value is 'Log'.")]
Copy file name to clipboardExpand all lines: src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccount.cs
+31-2Lines changed: 31 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -470,6 +470,12 @@ public TimeSpan SasExpirationPeriod
470
470
}
471
471
privateTimeSpan?sasExpirationPeriod=null;
472
472
473
+
[Parameter(Mandatory=false,HelpMessage="The action to be performed when SasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.")]
474
+
[PSArgumentCompleter("Log","Block")]
475
+
[ValidateNotNullOrEmpty]
476
+
publicstringSasExpirationAction{get;set;}
477
+
478
+
473
479
[Parameter(Mandatory=false,HelpMessage="The Key expiration period of this account, it is accurate to days.")]
474
480
publicintKeyExpirationPeriodInDay
475
481
{
@@ -883,10 +889,33 @@ public override void ExecuteCmdlet()
This command creates a Storage account with EdgeZone as "microsoftlosangeles1" and AllowCrossTenantReplication as false, then show the created account related properties.
241
241
242
-
### Example 12: Create a Storage account with KeyExpirationPeriod and SasExpirationPeriod
242
+
### Example 12: Create a Storage account with KeyExpirationPeriod and SasExpirationPeriod with SasExpirationAction
243
243
<!-- Skip: Output cannot be splitted from code -->
This command creates a Storage account with KeyExpirationPeriod and SasExpirationPeriod, then show the created account related properties.
259
+
This command creates a Storage account with KeyExpirationPeriod and SasExpirationPeriod with SasExpirationAction, then show the created account related properties.
257
260
258
261
### Example 12: Create a Storage account with Keyvault encryption (access Keyvault with user assigned identity)
259
262
<!-- Skip: Output cannot be splitted from code -->
The action to be performed when SasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period. The default value is 'Log'.
1204
+
1205
+
```yaml
1206
+
Type: System.String
1207
+
Parameter Sets: (All)
1208
+
Aliases:
1209
+
1210
+
Required: False
1211
+
Position: Named
1212
+
Default value: None
1213
+
Accept pipeline input: False
1214
+
Accept wildcard characters: False
1215
+
```
1216
+
1199
1217
### -SasExpirationPeriod
1200
1218
The SAS expiration period of this account, it is a timespan and accurate to seconds.
0 commit comments