Skip to content

Commit 7e66806

Browse files
[skip ci] Archive cea80ab (#27974)
1 parent cea80ab commit 7e66806

File tree

110 files changed

+30287
-34
lines changed

Some content is hidden

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

110 files changed

+30287
-34
lines changed

generated/Storage/Storage.Autorest/Az.Storage.format.ps1xml

Lines changed: 394 additions & 0 deletions
Large diffs are not rendered by default.

generated/Storage/Storage.Autorest/Az.Storage.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Storage.private.dll'
1313
FormatsToProcess = './Az.Storage.format.ps1xml'
14-
FunctionsToExport = 'Get-AzStorageAccountMigration', 'Get-AzStorageFileServiceUsage', 'Start-AzStorageAccountMigration'
14+
FunctionsToExport = 'Get-AzStorageAccountMigration', 'Get-AzStorageFileServiceUsage', 'Get-AzStorageTaskAssignment', 'Get-AzStorageTaskAssignmentInstancesReport', 'New-AzStorageTaskAssignment', 'Remove-AzStorageTaskAssignment', 'Start-AzStorageAccountMigration', 'Update-AzStorageTaskAssignment'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Storage'

generated/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+

generated/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ INPUTOBJECT <IStorageIdentity>: Identity Parameter
4646
[PrivateEndpointConnectionName <String>]: The name of the private endpoint connection associated with the Azure resource
4747
[ResourceGroupName <String>]: The name of the resource group within the user's subscription. The name is case insensitive.
4848
[ShareName <String>]: The name of the file share within the specified storage account. File share 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.
49+
[StorageTaskAssignmentName <String>]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
4950
[SubscriptionId <String>]: The ID of the target subscription.
5051
[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.
5152
.Link

generated/Storage/Storage.Autorest/exports/Get-AzStorageFileServiceUsage.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ INPUTOBJECT <IStorageIdentity>: Identity Parameter
4646
[PrivateEndpointConnectionName <String>]: The name of the private endpoint connection associated with the Azure resource
4747
[ResourceGroupName <String>]: The name of the resource group within the user's subscription. The name is case insensitive.
4848
[ShareName <String>]: The name of the file share within the specified storage account. File share 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.
49+
[StorageTaskAssignmentName <String>]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
4950
[SubscriptionId <String>]: The ID of the target subscription.
5051
[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.
5152
.Link

generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1

Lines changed: 278 additions & 0 deletions
Large diffs are not rendered by default.

generated/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1

Lines changed: 285 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 311 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,311 @@
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+
Asynchronously create a new storage task assignment sub-resource with the specified parameters.
20+
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.
21+
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.
22+
.Description
23+
Asynchronously create a new storage task assignment sub-resource with the specified parameters.
24+
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.
25+
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.
26+
.Example
27+
$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
28+
New-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -name mytaskassignment -TaskId $taskid -ReportPrefix "test" -TriggerType RunOnce -StartOn (Get-Date).ToUniversalTime() -Description "task assignment" -Enabled:$false
29+
.Example
30+
$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
31+
$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
32+
$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
33+
New-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -TaskId $taskid -ReportPrefix test -StartFrom $start.ToUniversalTime() -TriggerType OnSchedule -Interval 10 -IntervalUnit Days -Description "my task assignment" -Enabled:$false -EndBy $end.ToUniversalTime()
34+
35+
.Outputs
36+
Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
37+
.Link
38+
https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment
39+
#>
40+
function New-AzStorageTaskAssignment {
41+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])]
42+
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
43+
param(
44+
[Parameter(Mandatory)]
45+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
46+
[System.String]
47+
# The name of the storage account within the specified resource group.
48+
# Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
49+
${AccountName},
50+
51+
[Parameter(Mandatory)]
52+
[Alias('StorageTaskAssignmentName')]
53+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
54+
[System.String]
55+
# The name of the storage task assignment within the specified resource group.
56+
# Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
57+
${Name},
58+
59+
[Parameter(Mandatory)]
60+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
61+
[System.String]
62+
# The name of the resource group.
63+
# The name is case insensitive.
64+
${ResourceGroupName},
65+
66+
[Parameter()]
67+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
68+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
69+
[System.String]
70+
# The ID of the target subscription.
71+
${SubscriptionId},
72+
73+
[Parameter(Mandatory)]
74+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
75+
[System.String]
76+
# Text that describes the purpose of the storage task assignment
77+
${Description},
78+
79+
[Parameter(Mandatory)]
80+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
81+
[System.Management.Automation.SwitchParameter]
82+
# Whether the storage task assignment is enabled or not
83+
${Enabled},
84+
85+
[Parameter(Mandatory)]
86+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
87+
[System.String]
88+
# The container prefix for the location of storage task assignment report
89+
${ReportPrefix},
90+
91+
[Parameter(Mandatory)]
92+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
93+
[System.String]
94+
# Id of the corresponding storage task
95+
${TaskId},
96+
97+
[Parameter(Mandatory)]
98+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")]
99+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
100+
[System.String]
101+
# The trigger type of the storage task assignment execution
102+
${TriggerType},
103+
104+
[Parameter()]
105+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
106+
[System.DateTime]
107+
# When to end task execution.
108+
# This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
109+
${EndBy},
110+
111+
[Parameter()]
112+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
113+
[System.Int32]
114+
# Run interval of task execution.
115+
# This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
116+
${Interval},
117+
118+
[Parameter()]
119+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")]
120+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
121+
[System.String]
122+
# Run interval unit of task execution.
123+
# This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
124+
${IntervalUnit},
125+
126+
[Parameter()]
127+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
128+
[System.DateTime]
129+
# When to start task execution.
130+
# This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
131+
${StartFrom},
132+
133+
[Parameter()]
134+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
135+
[System.DateTime]
136+
# When to start task execution.
137+
# This is a required field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'
138+
${StartOn},
139+
140+
[Parameter()]
141+
[AllowEmptyCollection()]
142+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
143+
[System.String[]]
144+
# List of object prefixes to be excluded from task execution.
145+
# If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor
146+
${TargetExcludePrefix},
147+
148+
[Parameter()]
149+
[AllowEmptyCollection()]
150+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
151+
[System.String[]]
152+
# Required list of object prefixes to be included for task execution
153+
${TargetPrefix},
154+
155+
[Parameter()]
156+
[Alias('AzureRMContext', 'AzureCredential')]
157+
[ValidateNotNull()]
158+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
159+
[System.Management.Automation.PSObject]
160+
# The DefaultProfile parameter is not functional.
161+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
162+
${DefaultProfile},
163+
164+
[Parameter()]
165+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
166+
[System.Management.Automation.SwitchParameter]
167+
# Run the command as a job
168+
${AsJob},
169+
170+
[Parameter(DontShow)]
171+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
172+
[System.Management.Automation.SwitchParameter]
173+
# Wait for .NET debugger to attach
174+
${Break},
175+
176+
[Parameter(DontShow)]
177+
[ValidateNotNull()]
178+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
179+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
180+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
181+
${HttpPipelineAppend},
182+
183+
[Parameter(DontShow)]
184+
[ValidateNotNull()]
185+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
186+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
187+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
188+
${HttpPipelinePrepend},
189+
190+
[Parameter()]
191+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
192+
[System.Management.Automation.SwitchParameter]
193+
# Run the command asynchronously
194+
${NoWait},
195+
196+
[Parameter(DontShow)]
197+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
198+
[System.Uri]
199+
# The URI for the proxy server to use
200+
${Proxy},
201+
202+
[Parameter(DontShow)]
203+
[ValidateNotNull()]
204+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
205+
[System.Management.Automation.PSCredential]
206+
# Credentials for a proxy server to use for the remote call
207+
${ProxyCredential},
208+
209+
[Parameter(DontShow)]
210+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
211+
[System.Management.Automation.SwitchParameter]
212+
# Use the default credentials for the proxy
213+
${ProxyUseDefaultCredentials}
214+
)
215+
216+
begin {
217+
try {
218+
$outBuffer = $null
219+
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
220+
$PSBoundParameters['OutBuffer'] = 1
221+
}
222+
$parameterSet = $PSCmdlet.ParameterSetName
223+
224+
$testPlayback = $false
225+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
226+
227+
$context = Get-AzContext
228+
if (-not $context -and -not $testPlayback) {
229+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
230+
exit
231+
}
232+
233+
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
234+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
235+
}
236+
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
237+
if ($preTelemetryId -eq '') {
238+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
239+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
240+
} else {
241+
$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
242+
if ($internalCalledCmdlets -eq '') {
243+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
244+
} else {
245+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
246+
}
247+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
248+
}
249+
250+
$mapping = @{
251+
CreateExpanded = 'Az.Storage.private\New-AzStorageTaskAssignment_CreateExpanded';
252+
}
253+
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
254+
if ($testPlayback) {
255+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
256+
} else {
257+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
258+
}
259+
}
260+
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
261+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
262+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
263+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
264+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
265+
}
266+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
267+
if ($wrappedCmd -eq $null) {
268+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
269+
}
270+
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
271+
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
272+
$steppablePipeline.Begin($PSCmdlet)
273+
} catch {
274+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
275+
throw
276+
}
277+
}
278+
279+
process {
280+
try {
281+
$steppablePipeline.Process($_)
282+
} catch {
283+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
284+
throw
285+
}
286+
287+
finally {
288+
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
289+
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
290+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
291+
}
292+
293+
}
294+
end {
295+
try {
296+
$steppablePipeline.End()
297+
298+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
299+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
300+
if ($preTelemetryId -eq '') {
301+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
302+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
303+
}
304+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
305+
306+
} catch {
307+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
308+
throw
309+
}
310+
}
311+
}

0 commit comments

Comments
 (0)