Skip to content

Commit e98d3c0

Browse files
yifanz7wyunchi-ms
andauthored
[Storage] Migrate Storage to base on swagger generated by TSP (#28984)
Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com>
1 parent 086c18a commit e98d3c0

File tree

225 files changed

+21577
-5535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+21577
-5535
lines changed

src/Storage/Storage.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Storage")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("9.2.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("9.2.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("9.4.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("9.4.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Storage/Storage.Autorest/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ For information on how to develop for `Az.Storage`, see [how-to.md](how-to.md).
2828
2929
``` yaml
3030
# Please specify the commit id that includes your features to make sure generated codes stable.
31-
commit: 04b87408ba3b8afed159b3d3059bd1594c7f2dd3
31+
commit: ec3df311a63c6e653824b4018bb1a39d483bf9fc
3232
require:
3333
# readme.azure.noprofile.md is the common configuration file
3434
- $(this-folder)/../../readme.azure.noprofile.md
3535
input-file:
36-
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/storage.json
37-
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/file.json
38-
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/storageTaskAssignments.json
39-
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/networkSecurityPerimeter.json
36+
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/openapi.json
37+
# - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/storage.json
38+
# - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/file.json
39+
# - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/storageTaskAssignments.json
40+
# - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/networkSecurityPerimeter.json
4041

4142
# For new RP, the version is 0.1.0
4243
module-version: 5.9.1
@@ -113,7 +114,7 @@ directive:
113114
set:
114115
property-name: StorageAccountLimitMaxProvisionedIops
115116
- where:
116-
subject: ^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$|^FileShare$|^FileServiceProperty$|^FileService$
117+
subject: .*Blob.*|.*Table.*|.*Queue.*|^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$|^FileShare$|^FileServiceProperty$|^FileService$
117118
remove: true
118119
- where:
119120
parameter-name: ParameterEndBy
@@ -155,16 +156,16 @@ directive:
155156
property-name: ParameterStartOn
156157
set:
157158
property-name: StartOn
158-
- from: storageTaskAssignments.json
159+
- from: openapi.json
159160
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports"].get
160161
transform: >
161162
$["operationId"] = "StorageTaskAssignmentInstancesReport_List"
162163
# Renaming the operationId to StorageTaskAssignmentInstancesReport_Get, but the operation actually lists all the reports under a specific storage task assignment.
163-
- from: storageTaskAssignments.json
164+
- from: openapi.json
164165
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
165166
transform: >
166167
$["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
167-
- from: storageTaskAssignments.json
168+
- from: openapi.json
168169
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
169170
transform: >
170171
$["operationId"] = "StorageTaskAssignmentInstancesReport_Get"

src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-accountMigrations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "storageAccounts/accountMigrations",
3-
"apiVersion": "2025-01-01",
3+
"apiVersion": "2025-06-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.storage"
66
},

src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-networkSecurityPerimeterConfigurations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "storageAccounts/networkSecurityPerimeterConfigurations",
3-
"apiVersion": "2025-01-01",
3+
"apiVersion": "2025-06-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.storage"
66
},

src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-storageTaskAssignments.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "storageAccounts/storageTaskAssignments",
3-
"apiVersion": "2025-01-01",
3+
"apiVersion": "2025-06-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.storage"
66
},

src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-fileServices-usages.json renamed to src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"resourceType": "storageAccounts/fileServices/usages",
3-
"apiVersion": "2025-01-01",
2+
"resourceType": "storageAccounts",
3+
"apiVersion": "2025-06-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.storage"
66
},
77
"commands": [
88
{
99
"name": "Get-AzStorageFileServiceUsage",
1010
"description": "Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.",
11-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/usages/default",
1212
"help": {
1313
"learnMore": {
1414
"url": "https://learn.microsoft.com/powershell/module/az.storage/get-azstoragefileserviceusage"

src/Storage/Storage.Autorest/docs/Get-AzStorageAccountMigration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Accept wildcard characters: False
9797
```
9898
9999
### -ResourceGroupName
100-
The name of the resource group within the user's subscription.
100+
The name of the resource group.
101101
The name is case insensitive.
102102
103103
```yaml
@@ -114,6 +114,7 @@ Accept wildcard characters: False
114114
115115
### -SubscriptionId
116116
The ID of the target subscription.
117+
The value must be an UUID.
117118
118119
```yaml
119120
Type: System.String[]

src/Storage/Storage.Autorest/docs/Get-AzStorageFileServiceUsage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Accept wildcard characters: False
123123
```
124124
125125
### -ResourceGroupName
126-
The name of the resource group within the user's subscription.
126+
The name of the resource group.
127127
The name is case insensitive.
128128
129129
```yaml
@@ -156,6 +156,7 @@ Accept wildcard characters: False
156156
157157
### -SubscriptionId
158158
The ID of the target subscription.
159+
The value must be an UUID.
159160
160161
```yaml
161162
Type: System.String[]

src/Storage/Storage.Autorest/docs/Get-AzStorageNetworkSecurityPerimeterConfiguration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Accept wildcard characters: False
170170
```
171171
172172
### -ResourceGroupName
173-
The name of the resource group within the user's subscription.
173+
The name of the resource group.
174174
The name is case insensitive.
175175
176176
```yaml
@@ -202,6 +202,7 @@ Accept wildcard characters: False
202202
203203
### -SubscriptionId
204204
The ID of the target subscription.
205+
The value must be an UUID.
205206
206207
```yaml
207208
Type: System.String[]

src/Storage/Storage.Autorest/docs/Get-AzStorageSku.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Accept wildcard characters: False
7474
7575
### -SubscriptionId
7676
The ID of the target subscription.
77+
The value must be an UUID.
7778
7879
```yaml
7980
Type: System.String[]

0 commit comments

Comments
 (0)