Skip to content

Commit 6d4fdbc

Browse files
[skip ci] Archive 344f808 (#27172)
Co-authored-by: azure-powershell-bot <[email protected]>
1 parent 344f808 commit 6d4fdbc

File tree

189 files changed

+30452
-428
lines changed

Some content is hidden

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

189 files changed

+30452
-428
lines changed

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

Lines changed: 992 additions & 28 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', 'Start-AzStorageAccountMigration'
14+
FunctionsToExport = 'Get-AzStorageAccountMigration', 'Get-AzStorageFileServiceUsage', 'Start-AzStorageAccountMigration'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Storage'
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
4-
// Licensed under the Apache License, Version 2.0 (the "License");
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
53
// you may not use this file except in compliance with the License.
64
// You may obtain a copy of the License at
75
// http://www.apache.org/licenses/LICENSE-2.0
86
// Unless required by applicable law or agreed to in writing, software
9-
// distributed under the License is distributed on an "AS IS" BASIS,
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
108
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
// See the License for the specific language governing permissions and
1210
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
1413

1514
using System;
1615
using System.Reflection;
16+
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices;
1818

19-
[assembly: AssemblyTitle("Microsoft Azure Powershell - Storage")]
20-
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
21-
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
22-
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
23-
24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("88ce5e76-b817-4949-b354-bec022eb6e77")]
27-
[assembly: AssemblyVersion("8.1.0")]
28-
[assembly: AssemblyFileVersion("8.1.0")]
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.1.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("8.1.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ INPUTOBJECT <IStorageIdentity>: Identity Parameter
3636
[BlobInventoryPolicyName <String>]: The name of the storage account blob inventory policy. It should always be 'default'
3737
[DeletedAccountName <String>]: Name of the deleted storage account.
3838
[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.
39+
[FileServiceUsagesName <String>]: The name of the file service usage. File Service Usage Name must be "default"
40+
[FileServicesName <String>]: The name of the file Service within the specified storage account. File Service Name must be "default"
3941
[Id <String>]: Resource identity path
4042
[Location <String>]: The location of the deleted storage account.
4143
[ManagementPolicyName <String>]: The name of the Storage Account Management Policy. It should always be 'default'
4244
[MigrationName <String>]: The name of the Storage Account Migration. It should always be 'default'
4345
[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.
4446
[PrivateEndpointConnectionName <String>]: The name of the private endpoint connection associated with the Azure resource
4547
[ResourceGroupName <String>]: The name of the resource group within the user's subscription. The name is case insensitive.
48+
[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.
4649
[SubscriptionId <String>]: The ID of the target subscription.
4750
[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.
4851
.Link
@@ -173,6 +176,9 @@ begin {
173176
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
174177
}
175178
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
179+
if ($wrappedCmd -eq $null) {
180+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
181+
}
176182
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
177183
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
178184
$steppablePipeline.Begin($PSCmdlet)
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
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+
Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.
20+
.Description
21+
Gets the usage of file service in storage account including account limits, file share limits and constants used in recommendations and bursting formula.
22+
.Example
23+
Get-AzStorageFileServiceUsage -StorageAccountName myaccount -ResourceGroupName myresroucegroup
24+
25+
.Inputs
26+
Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
27+
.Outputs
28+
Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IFileServiceUsage
29+
.Notes
30+
COMPLEX PARAMETER PROPERTIES
31+
32+
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.
33+
34+
INPUTOBJECT <IStorageIdentity>: Identity Parameter
35+
[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.
36+
[BlobInventoryPolicyName <String>]: The name of the storage account blob inventory policy. It should always be 'default'
37+
[DeletedAccountName <String>]: Name of the deleted storage account.
38+
[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.
39+
[FileServiceUsagesName <String>]: The name of the file service usage. File Service Usage Name must be "default"
40+
[FileServicesName <String>]: The name of the file Service within the specified storage account. File Service Name must be "default"
41+
[Id <String>]: Resource identity path
42+
[Location <String>]: The location of the deleted storage account.
43+
[ManagementPolicyName <String>]: The name of the Storage Account Management Policy. It should always be 'default'
44+
[MigrationName <String>]: The name of the Storage Account Migration. It should always be 'default'
45+
[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.
46+
[PrivateEndpointConnectionName <String>]: The name of the private endpoint connection associated with the Azure resource
47+
[ResourceGroupName <String>]: The name of the resource group within the user's subscription. The name is case insensitive.
48+
[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+
[SubscriptionId <String>]: The ID of the target subscription.
50+
[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.
51+
.Link
52+
https://learn.microsoft.com/powershell/module/az.storage/get-azstoragefileserviceusage
53+
#>
54+
function Get-AzStorageFileServiceUsage {
55+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IFileServiceUsage])]
56+
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
57+
param(
58+
[Parameter(ParameterSetName='Get', Mandatory)]
59+
[Parameter(ParameterSetName='List', Mandatory)]
60+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
61+
[System.String]
62+
# The name of the resource group within the user's subscription.
63+
# The name is case insensitive.
64+
${ResourceGroupName},
65+
66+
[Parameter(ParameterSetName='Get', Mandatory)]
67+
[Parameter(ParameterSetName='List', Mandatory)]
68+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
69+
[System.String]
70+
# The name of the storage account within the specified resource group.
71+
# Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
72+
${StorageAccountName},
73+
74+
[Parameter(ParameterSetName='Get')]
75+
[Parameter(ParameterSetName='List')]
76+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
77+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
78+
[System.String[]]
79+
# The ID of the target subscription.
80+
${SubscriptionId},
81+
82+
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
83+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
84+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
85+
# Identity Parameter
86+
${InputObject},
87+
88+
[Parameter(ParameterSetName='List')]
89+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
90+
[System.Int32]
91+
# Optional, specifies the maximum number of file service usages to be included in the list response.
92+
${Maxpagesize},
93+
94+
[Parameter()]
95+
[Alias('AzureRMContext', 'AzureCredential')]
96+
[ValidateNotNull()]
97+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
98+
[System.Management.Automation.PSObject]
99+
# The DefaultProfile parameter is not functional.
100+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
101+
${DefaultProfile},
102+
103+
[Parameter(DontShow)]
104+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
105+
[System.Management.Automation.SwitchParameter]
106+
# Wait for .NET debugger to attach
107+
${Break},
108+
109+
[Parameter(DontShow)]
110+
[ValidateNotNull()]
111+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
112+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
113+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
114+
${HttpPipelineAppend},
115+
116+
[Parameter(DontShow)]
117+
[ValidateNotNull()]
118+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
119+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
120+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
121+
${HttpPipelinePrepend},
122+
123+
[Parameter(DontShow)]
124+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
125+
[System.Uri]
126+
# The URI for the proxy server to use
127+
${Proxy},
128+
129+
[Parameter(DontShow)]
130+
[ValidateNotNull()]
131+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
132+
[System.Management.Automation.PSCredential]
133+
# Credentials for a proxy server to use for the remote call
134+
${ProxyCredential},
135+
136+
[Parameter(DontShow)]
137+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
138+
[System.Management.Automation.SwitchParameter]
139+
# Use the default credentials for the proxy
140+
${ProxyUseDefaultCredentials}
141+
)
142+
143+
begin {
144+
try {
145+
$outBuffer = $null
146+
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
147+
$PSBoundParameters['OutBuffer'] = 1
148+
}
149+
$parameterSet = $PSCmdlet.ParameterSetName
150+
151+
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
152+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
153+
}
154+
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
155+
if ($preTelemetryId -eq '') {
156+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
157+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
158+
} else {
159+
$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
160+
if ($internalCalledCmdlets -eq '') {
161+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
162+
} else {
163+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
164+
}
165+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
166+
}
167+
168+
$mapping = @{
169+
Get = 'Az.Storage.private\Get-AzStorageFileServiceUsage_Get';
170+
GetViaIdentity = 'Az.Storage.private\Get-AzStorageFileServiceUsage_GetViaIdentity';
171+
List = 'Az.Storage.private\Get-AzStorageFileServiceUsage_List';
172+
}
173+
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
174+
$testPlayback = $false
175+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
176+
if ($testPlayback) {
177+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
178+
} else {
179+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
180+
}
181+
}
182+
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
183+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
184+
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)){
185+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
186+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
187+
}
188+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
189+
if ($wrappedCmd -eq $null) {
190+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
191+
}
192+
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
193+
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
194+
$steppablePipeline.Begin($PSCmdlet)
195+
} catch {
196+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
197+
throw
198+
}
199+
}
200+
201+
process {
202+
try {
203+
$steppablePipeline.Process($_)
204+
} catch {
205+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
206+
throw
207+
}
208+
209+
finally {
210+
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
211+
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
212+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
213+
}
214+
215+
}
216+
end {
217+
try {
218+
$steppablePipeline.End()
219+
220+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
221+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
222+
if ($preTelemetryId -eq '') {
223+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
224+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
225+
}
226+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
227+
228+
} catch {
229+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
230+
throw
231+
}
232+
}
233+
}

0 commit comments

Comments
 (0)