Skip to content

Commit 84e546f

Browse files
committed
Add warning message for Start-AzStorageAccountMigration
1 parent 5d2f4d3 commit 84e546f

File tree

181 files changed

+3460
-488
lines changed

Some content is hidden

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

181 files changed

+3460
-488
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Storage")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("8.0.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("8.0.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

src/Storage/Storage.Autorest/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ directive:
5555
set:
5656
verb: Start
5757
subject: AccountMigration
58+
- where:
59+
verb: Start
60+
subject: AccountMigration
61+
hide: true
5862
- where:
5963
variant: ^Customer$|^CustomerViaIdentity$
6064
remove: true
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
15+
# ----------------------------------------------------------------------------------
16+
17+
<#
18+
.Synopsis
19+
Account Migration request can be triggered for a storage account to change its redundancy level.
20+
The migration customer the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
21+
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
22+
.Description
23+
Account Migration request can be triggered for a storage account to change its redundancy level.
24+
The migration customer the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
25+
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
26+
.Example
27+
Start-AzStorageAccountMigration -AccountName myaccount -ResourceGroupName myresourcegroup -TargetSku Standard_LRS -Name migration1 -AsJob
28+
.Example
29+
Get-AzStorageAccount -ResourceGroupName myresourcegroup -Name myaccount | Start-AzStorageAccountMigration -TargetSku Standard_LRS -AsJob
30+
.Example
31+
$properties = '{
32+
"properties": {
33+
"targetSkuName": "Standard_ZRS"
34+
}
35+
}'
36+
Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonString $properties -AsJob
37+
.Example
38+
# Before executing the cmdlet, make sure you have a json file that contains {"properties": {"targetSkuName": <TargetSKU>}}
39+
Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonFilePath properties.json -AsJob
40+
41+
.Inputs
42+
Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
43+
.Outputs
44+
System.Boolean
45+
.Notes
46+
COMPLEX PARAMETER PROPERTIES
47+
48+
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
49+
50+
INPUTOBJECT <IStorageIdentity>: Identity Parameter
51+
[AccountName <String>]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
52+
[BlobInventoryPolicyName <String>]: The name of the storage account blob inventory policy. It should always be 'default'
53+
[DeletedAccountName <String>]: Name of the deleted storage account.
54+
[EncryptionScopeName <String>]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
55+
[Id <String>]: Resource identity path
56+
[Location <String>]: The location of the deleted storage account.
57+
[ManagementPolicyName <String>]: The name of the Storage Account Management Policy. It should always be 'default'
58+
[MigrationName <String>]: The name of the Storage Account Migration. It should always be 'default'
59+
[ObjectReplicationPolicyId <String>]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
60+
[PrivateEndpointConnectionName <String>]: The name of the private endpoint connection associated with the Azure resource
61+
[ResourceGroupName <String>]: The name of the resource group within the user's subscription. The name is case insensitive.
62+
[SubscriptionId <String>]: The ID of the target subscription.
63+
[Username <String>]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
64+
.Link
65+
https://learn.microsoft.com/powershell/module/az.storage/start-azstorageaccountmigration
66+
#>
67+
function Start-AzStorageAccountMigration {
68+
[OutputType([System.Boolean])]
69+
[CmdletBinding(DefaultParameterSetName='CustomerExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
70+
param(
71+
[Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
72+
[Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
73+
[Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
74+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
75+
[System.String]
76+
# The name of the storage account within the specified resource group.
77+
# Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
78+
${AccountName},
79+
80+
[Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
81+
[Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
82+
[Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
83+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
84+
[System.String]
85+
# The name of the resource group within the user's subscription.
86+
# The name is case insensitive.
87+
${ResourceGroupName},
88+
89+
[Parameter(ParameterSetName='CustomerExpanded')]
90+
[Parameter(ParameterSetName='CustomerViaJsonFilePath')]
91+
[Parameter(ParameterSetName='CustomerViaJsonString')]
92+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
93+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
94+
[System.String]
95+
# The ID of the target subscription.
96+
${SubscriptionId},
97+
98+
[Parameter(ParameterSetName='CustomerViaIdentityExpanded', Mandatory, ValueFromPipeline)]
99+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
100+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
101+
# Identity Parameter
102+
${InputObject},
103+
104+
[Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
105+
[Parameter(ParameterSetName='CustomerViaIdentityExpanded', Mandatory)]
106+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard_LRS", "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS", "Standard_GZRS", "Standard_RAGZRS")]
107+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
108+
[System.String]
109+
# Target sku name for the account
110+
${TargetSku},
111+
112+
[Parameter(ParameterSetName='CustomerExpanded')]
113+
[Parameter(ParameterSetName='CustomerViaIdentityExpanded')]
114+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
115+
[System.String]
116+
# current value is 'default' for customer initiated migration
117+
${Name},
118+
119+
[Parameter(ParameterSetName='CustomerExpanded')]
120+
[Parameter(ParameterSetName='CustomerViaIdentityExpanded')]
121+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
122+
[System.String]
123+
# SrpAccountMigrationType in ARM contract which is 'accountMigrations'
124+
${Type},
125+
126+
[Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
127+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
128+
[System.String]
129+
# Path of Json file supplied to the Customer operation
130+
${JsonFilePath},
131+
132+
[Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
133+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
134+
[System.String]
135+
# Json string supplied to the Customer operation
136+
${JsonString},
137+
138+
[Parameter()]
139+
[Alias('AzureRMContext', 'AzureCredential')]
140+
[ValidateNotNull()]
141+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
142+
[System.Management.Automation.PSObject]
143+
# The DefaultProfile parameter is not functional.
144+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
145+
${DefaultProfile},
146+
147+
[Parameter()]
148+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
149+
[System.Management.Automation.SwitchParameter]
150+
# Run the command as a job
151+
${AsJob},
152+
153+
[Parameter(DontShow)]
154+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
155+
[System.Management.Automation.SwitchParameter]
156+
# Wait for .NET debugger to attach
157+
${Break},
158+
159+
[Parameter(DontShow)]
160+
[ValidateNotNull()]
161+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
162+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
163+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
164+
${HttpPipelineAppend},
165+
166+
[Parameter(DontShow)]
167+
[ValidateNotNull()]
168+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
169+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
170+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
171+
${HttpPipelinePrepend},
172+
173+
[Parameter()]
174+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
175+
[System.Management.Automation.SwitchParameter]
176+
# Run the command asynchronously
177+
${NoWait},
178+
179+
[Parameter()]
180+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
181+
[System.Management.Automation.SwitchParameter]
182+
# Returns true when the command succeeds
183+
${PassThru},
184+
185+
[Parameter(DontShow)]
186+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
187+
[System.Uri]
188+
# The URI for the proxy server to use
189+
${Proxy},
190+
191+
[Parameter(DontShow)]
192+
[ValidateNotNull()]
193+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
194+
[System.Management.Automation.PSCredential]
195+
# Credentials for a proxy server to use for the remote call
196+
${ProxyCredential},
197+
198+
[Parameter(DontShow)]
199+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
200+
[System.Management.Automation.SwitchParameter]
201+
# Use the default credentials for the proxy
202+
${ProxyUseDefaultCredentials}
203+
)
204+
205+
process {
206+
Write-Warning("After your request to convert the account’s redundancy configuration is validated, the conversion will typically complete in a few days, but can take a few weeks depending on current resource demands in the region, account size, and other factors. The conversion can’t be stopped after being initiated, and for accounts with geo redundancy a failover can’t be initiated while conversion is in progress. The data within the storage account will continue to be accessible with no loss of durability or availability.")
207+
Az.Storage.internal\Start-AzStorageAccountMigration @PSBoundParameters
208+
}
209+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Storage
3-
Module Guid: 14995ab3-8dd3-4201-b5f5-9dc94eac60d4
3+
Module Guid: c1159bcc-028a-438a-a529-ceabb033ce19
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.storage
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -16,6 +16,6 @@ Gets the status of the ongoing migration for the specified storage account.
1616

1717
### [Start-AzStorageAccountMigration](Start-AzStorageAccountMigration.md)
1818
Account Migration request can be triggered for a storage account to change its redundancy level.
19-
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.
19+
The migration customer the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
2020
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
2121

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ schema: 2.0.0
99

1010
## SYNOPSIS
1111
Account Migration request can be triggered for a storage account to change its redundancy level.
12-
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.
12+
The migration customer the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
1313
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
1414

1515
## SYNTAX
@@ -44,7 +44,7 @@ Start-AzStorageAccountMigration -AccountName <String> -ResourceGroupName <String
4444

4545
## DESCRIPTION
4646
Account Migration request can be triggered for a storage account to change its redundancy level.
47-
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.
47+
The migration customer the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
4848
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
4949

5050
## EXAMPLES
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "48d0eebc-cb1a-4cf2-8001-f6b19e0550e8"
2+
"generate_Id": "390bb0ab-17ad-4fda-817e-dce7facd7e0b"
33
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Resources
2+
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder.
3+
4+
## Info
5+
- Modifiable: yes
6+
- Generated: no
7+
- Committed: yes
8+
- Packaged: no
9+
10+
## Purpose
11+
Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact.

src/Storage/Storage.Management/Az.Storage.psd1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 11/15/2024
6+
# Generated on: 11/29/2024
77
#
88

99
@{
@@ -74,10 +74,10 @@ RequiredAssemblies = 'Azure.Data.Tables.dll', 'Azure.Storage.Blobs.dll',
7474
'System.IO.Hashing.dll'
7575

7676
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
77-
# ScriptsToProcess = @()
77+
ScriptsToProcess = @()
7878

7979
# Type files (.ps1xml) to be loaded when importing this module
80-
# TypesToProcess = @()
80+
TypesToProcess = @()
8181

8282
# Format files (.ps1xml) to be loaded when importing this module
8383
FormatsToProcess = 'Storage.Autorest/Az.Storage.format.ps1xml',
@@ -231,7 +231,7 @@ PrivateData = @{
231231
PSData = @{
232232

233233
# Tags applied to this module. These help with module discovery in online galleries.
234-
Tags = 'Azure','ResourceManager','ARM','Storage','StorageAccount'
234+
Tags = 'Azure', 'ResourceManager', 'ARM', 'Storage', 'StorageAccount'
235235

236236
# A URL to the license for this module.
237237
LicenseUri = 'https://aka.ms/azps-license'
@@ -281,7 +281,7 @@ PrivateData = @{
281281

282282
} # End of PSData hashtable
283283

284-
} # End of PrivateData hashtable
284+
} # End of PrivateData hashtable
285285

286286
# HelpInfo URI of this module
287287
# HelpInfoURI = ''

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
-->
2020
## Upcoming Release
2121
* Upgraded Azure.Core to 1.44.1.
22+
* Added warning message for account migration cmdlet.
23+
- `Start-AzStorageAccountMigration`
2224

2325
## Version 8.0.0
2426
* When downloading blob with parameter AbsoluteUri (alias Uri, BlobUri), not allow input parameter Context together.

src/Storage/Storage.Management/help/Add-AzRmStorageContainerLegalHold.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ Adds legal hold tags to a Storage blob container
1616
```
1717
Add-AzRmStorageContainerLegalHold [-ResourceGroupName] <String> [-StorageAccountName] <String> -Name <String>
1818
-Tag <String[]> [-AllowProtectedAppendWriteAll <Boolean>] [-DefaultProfile <IAzureContextContainer>]
19-
[-WhatIf] [-Confirm] [<CommonParameters>]
19+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

2222
### AccountObject
2323
```
2424
Add-AzRmStorageContainerLegalHold -Name <String> -StorageAccount <PSStorageAccount> -Tag <String[]>
2525
[-AllowProtectedAppendWriteAll <Boolean>] [-DefaultProfile <IAzureContextContainer>]
26-
[-WhatIf] [-Confirm] [<CommonParameters>]
26+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2727
```
2828

2929
### ContainerObject
3030
```
3131
Add-AzRmStorageContainerLegalHold -Container <PSContainer> -Tag <String[]>
3232
[-AllowProtectedAppendWriteAll <Boolean>] [-DefaultProfile <IAzureContextContainer>]
33-
[-WhatIf] [-Confirm] [<CommonParameters>]
33+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
3434
```
3535

3636
## DESCRIPTION
@@ -123,6 +123,21 @@ Accept pipeline input: True (ByPropertyName, ByValue)
123123
Accept wildcard characters: False
124124
```
125125
126+
### -ProgressAction
127+
{{ Fill ProgressAction Description }}
128+
129+
```yaml
130+
Type: System.Management.Automation.ActionPreference
131+
Parameter Sets: (All)
132+
Aliases: proga
133+
134+
Required: False
135+
Position: Named
136+
Default value: None
137+
Accept pipeline input: False
138+
Accept wildcard characters: False
139+
```
140+
126141
### -ResourceGroupName
127142
Resource Group Name.
128143

0 commit comments

Comments
 (0)