Skip to content

Commit ef75f6b

Browse files
committed
add name as alias for fileworkspacename fileworkspacesnosubscription
1 parent 487bef6 commit ef75f6b

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

src/Support/Support.Autorest/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ directive:
6262
properties:
6363
- DisplayName
6464
- Name
65-
- SecondaryConsentEnabled # Do we need this?
65+
- SecondaryConsentEnabled
6666
- where:
6767
model-name: Service
6868
set:
6969
format-table:
7070
properties:
7171
- DisplayName
7272
- Name
73-
- ResourceType # Do we need this?
73+
- ResourceType
7474
- where:
7575
model-name: FileDetails
7676
set:
@@ -81,6 +81,12 @@ directive:
8181
- ChunkSize
8282
- FileSize
8383
- NumberOfChunks
84+
- where:
85+
verb: New
86+
subject: FileWorkspacesNoSubscription
87+
parameter-name: FileWorkspaceName
88+
set:
89+
alias: Name
8490
- where:
8591
verb: New
8692
subject: File

src/Support/Support.Autorest/custom/New-AzSupportFileAndUpload.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ process {
133133
$MaxChunkSize = 2.5 * 1024 * 1024 #2.5 MB
134134
$MaxFileSize = 5 * 1024 * 1024 #5 MB
135135
$FileContentBytes = Get-Content -Path $FilePath -Raw
136+
if($FileContentBytes -eq $Null){
137+
throw "File cannot be empty"
138+
}
136139
$FileContentByteArray = [System.Text.Encoding]::UTF8.GetBytes($FileContentBytes)
137140
$FileSize = $FileContentByteArray.Length
138141
if($FileSize -gt $MaxFileSize){

src/Support/Support.Autorest/custom/New-AzSupportFileAndUploadNoSubscription.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ process {
126126
$MaxChunkSize = 2.5 * 1024 * 1024 #2.5 MB
127127
$MaxFileSize = 5 * 1024 * 1024 #5 MB
128128
$FileContentBytes = Get-Content -Path $FilePath -Raw
129+
if($FileContentBytes -eq $Null){
130+
throw "File cannot be empty"
131+
}
129132
$FileContentByteArray = [System.Text.Encoding]::UTF8.GetBytes($FileContentBytes)
130133
$FileSize = $FileContentByteArray.Length
131134
if($FileSize -gt $MaxFileSize){

src/Support/Support.Autorest/docs/New-AzSupportFileWorkspacesNoSubscription.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ File workspace name.
6868
```yaml
6969
Type: System.String
7070
Parameter Sets: (All)
71-
Aliases:
71+
Aliases: Name
7272

7373
Required: True
7474
Position: Named

0 commit comments

Comments
 (0)