Skip to content

Commit cea80ab

Browse files
authored
[Storage] Storage TaskAssignment (for StorageAction GA) (#27969)
1 parent 34484d2 commit cea80ab

36 files changed

+6104
-50
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
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("8.4.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("8.4.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("9.0.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("9.0.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]
27+

src/Storage/Storage.Autorest/README.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ 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: ae38b76a7e681922a05b0b1e4d44cc725eb94802
31+
commit: 2219e4e4e0409bcb88a2b82e8febe1a3baecaf18
3232
require:
3333
# readme.azure.noprofile.md is the common configuration file
3434
- $(this-folder)/../../readme.azure.noprofile.md
3535
input-file:
3636
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/storage.json
3737
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/file.json
38+
- $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/storageTaskAssignments.json
3839

3940
# For new RP, the version is 0.1.0
4041
module-version: 5.9.1
@@ -50,6 +51,12 @@ use-extension:
5051

5152

5253
directive:
54+
- where:
55+
variant: ^(Create|Update)(?!.*?Expanded|JsonFilePath|JsonString)
56+
remove: true
57+
- where:
58+
variant: ^CreateViaIdentity.*$
59+
remove: true
5360
- from: swagger-document
5461
where: $.paths.["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration"].post.operationId
5562
transform: return "StartAccountMigration"
@@ -106,4 +113,61 @@ directive:
106113
- where:
107114
subject: ^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Sku$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$|^FileShare$|^FileServiceProperty$|^FileService$
108115
remove: true
116+
- where:
117+
parameter-name: ParameterEndBy
118+
set:
119+
parameter-name: EndBy
120+
- where:
121+
parameter-name: ParameterInterval
122+
set:
123+
parameter-name: Interval
124+
- where:
125+
parameter-name: ParameterIntervalUnit
126+
set:
127+
parameter-name: IntervalUnit
128+
- where:
129+
parameter-name: ParameterStartFrom
130+
set:
131+
parameter-name: StartFrom
132+
- where:
133+
parameter-name: ParameterStartOn
134+
set:
135+
parameter-name: StartOn
136+
- where:
137+
property-name: ParameterEndBy
138+
set:
139+
property-name: EndBy
140+
- where:
141+
property-name: ParameterInterval
142+
set:
143+
property-name: Interval
144+
- where:
145+
property-name: ParameterIntervalUnit
146+
set:
147+
property-name: IntervalUnit
148+
- where:
149+
property-name: ParameterStartFrom
150+
set:
151+
property-name: StartFrom
152+
- where:
153+
property-name: ParameterStartOn
154+
set:
155+
property-name: StartOn
156+
- from: storageTaskAssignments.json
157+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports"].get
158+
transform: >
159+
$["operationId"] = "StorageTaskAssignmentInstancesReport_List"
160+
# Renaming the operationId to StorageTaskAssignmentInstancesReport_Get, but the operation actually lists all the reports under a specific storage task assignment.
161+
- from: storageTaskAssignments.json
162+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
163+
transform: >
164+
$["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
165+
- from: storageTaskAssignments.json
166+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
167+
transform: >
168+
$["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
169+
- where:
170+
model-name: StorageTaskReportInstance
171+
set:
172+
suppress-format: true
109173
```
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"resourceType": "storageAccounts/storageTaskAssignments",
3+
"apiVersion": "2024-01-01",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.storage"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzStorageTaskAssignment",
10+
"description": "Get the storage task assignment properties",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-AccountName <String>",
20+
"-Name <String>",
21+
"-ResourceGroupName <String>",
22+
"[-SubscriptionId <String[]>]"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"description": "Get the storage task assignment properties",
30+
"parameters": [
31+
{
32+
"name": "-AccountName",
33+
"value": "[Path.accountName]"
34+
},
35+
{
36+
"name": "-Name",
37+
"value": "[Path.storageTaskAssignmentName]"
38+
},
39+
{
40+
"name": "-ResourceGroupName",
41+
"value": "[Path.resourceGroupName]"
42+
},
43+
{
44+
"name": "-SubscriptionId",
45+
"value": "[Path.subscriptionId]"
46+
}
47+
]
48+
}
49+
]
50+
},
51+
{
52+
"name": "Remove-AzStorageTaskAssignment",
53+
"description": "Delete the storage task assignment sub-resource",
54+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}",
55+
"help": {
56+
"learnMore": {
57+
"url": "https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment"
58+
},
59+
"parameterSets": [
60+
{
61+
"parameters": [
62+
"-AccountName <String>",
63+
"-Name <String>",
64+
"-ResourceGroupName <String>",
65+
"[-SubscriptionId <String>]"
66+
]
67+
}
68+
]
69+
},
70+
"examples": [
71+
{
72+
"description": "Delete the storage task assignment sub-resource",
73+
"parameters": [
74+
{
75+
"name": "-AccountName",
76+
"value": "[Path.accountName]"
77+
},
78+
{
79+
"name": "-Name",
80+
"value": "[Path.storageTaskAssignmentName]"
81+
},
82+
{
83+
"name": "-ResourceGroupName",
84+
"value": "[Path.resourceGroupName]"
85+
},
86+
{
87+
"name": "-SubscriptionId",
88+
"value": "[Path.subscriptionId]"
89+
}
90+
]
91+
}
92+
]
93+
}
94+
]
95+
}

src/Storage/Storage.Autorest/docs/Az.Storage.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Storage
3-
Module Guid: 8b39ba81-b0f4-4b9c-9df6-33bdf050e6e1
3+
Module Guid: f586bd97-8cde-45be-883a-cf5716cc062d
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.storage
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -17,8 +17,25 @@ Gets the status of the ongoing migration for the specified storage account.
1717
### [Get-AzStorageFileServiceUsage](Get-AzStorageFileServiceUsage.md)
1818
Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.
1919

20+
### [Get-AzStorageTaskAssignment](Get-AzStorageTaskAssignment.md)
21+
Get the storage task assignment properties
22+
23+
### [Get-AzStorageTaskAssignmentInstancesReport](Get-AzStorageTaskAssignmentInstancesReport.md)
24+
Fetch the report summary of a single storage task assignment's instances
25+
26+
### [New-AzStorageTaskAssignment](New-AzStorageTaskAssignment.md)
27+
Asynchronously create a new storage task assignment sub-resource with the specified parameters.
28+
If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated.
29+
If a storage task assignment is already created and a subsequent create request is issued with the exact same set of properties, the request will succeed.
30+
31+
### [Remove-AzStorageTaskAssignment](Remove-AzStorageTaskAssignment.md)
32+
Delete the storage task assignment sub-resource
33+
2034
### [Start-AzStorageAccountMigration](Start-AzStorageAccountMigration.md)
2135
Account Migration request can be triggered for a storage account to change its redundancy level.
2236
The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
2337
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
2438

39+
### [Update-AzStorageTaskAssignment](Update-AzStorageTaskAssignment.md)
40+
update storage task assignment properties
41+

0 commit comments

Comments
 (0)