Skip to content

Commit 6a9d296

Browse files
[skip ci] Archive aa8e500 (Azure#27673)
1 parent 8d6dea7 commit 6a9d296

File tree

238 files changed

+6330
-2079
lines changed

Some content is hidden

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

238 files changed

+6330
-2079
lines changed

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/Az.RedisEnterpriseCache.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>RedisEnterpriseCache</PsModuleName>
44
<PsRootModuleName>RedisEnterpriseCache</PsRootModuleName>
5+
<PsModuleFolder>RedisEnterpriseCache.Autorest</PsModuleFolder>
56
</PropertyGroup>
67

78
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
89
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
9-
1010
</Project>

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/Az.RedisEnterpriseCache.format.ps1xml

Lines changed: 116 additions & 48 deletions
Large diffs are not rendered by default.

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/Az.RedisEnterpriseCache.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.RedisEnterpriseCache.private.dll'
1313
FormatsToProcess = './Az.RedisEnterpriseCache.format.ps1xml'
14-
FunctionsToExport = 'Export-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCacheAccessPolicyAssignment', 'Get-AzRedisEnterpriseCacheDatabase', 'Get-AzRedisEnterpriseCacheKey', 'Get-AzRedisEnterpriseCacheOperationStatus', 'Import-AzRedisEnterpriseCache', 'Invoke-AzRedisEnterpriseCacheDatabaseFlush', 'Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup', 'Invoke-AzRedisEnterpriseCacheForceDatabaseUnlink', 'New-AzRedisEnterpriseCache', 'New-AzRedisEnterpriseCacheAccessPolicyAssignment', 'New-AzRedisEnterpriseCacheDatabase', 'New-AzRedisEnterpriseCacheKey', 'Remove-AzRedisEnterpriseCache', 'Remove-AzRedisEnterpriseCacheAccessPolicyAssignment', 'Remove-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCache', 'Update-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion', '*'
14+
FunctionsToExport = 'Export-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCacheAccessPolicyAssignment', 'Get-AzRedisEnterpriseCacheDatabase', 'Get-AzRedisEnterpriseCacheKey', 'Get-AzRedisEnterpriseCacheOperationStatus', 'Get-AzRedisEnterpriseCacheSku', 'Import-AzRedisEnterpriseCache', 'Invoke-AzRedisEnterpriseCacheDatabaseFlush', 'Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup', 'Invoke-AzRedisEnterpriseCacheForceDatabaseUnlink', 'New-AzRedisEnterpriseCache', 'New-AzRedisEnterpriseCacheAccessPolicyAssignment', 'New-AzRedisEnterpriseCacheDatabase', 'New-AzRedisEnterpriseCacheKey', 'Remove-AzRedisEnterpriseCache', 'Remove-AzRedisEnterpriseCacheAccessPolicyAssignment', 'Remove-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCache', 'Update-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion', '*'
1515
AliasesToExport = 'Export-AzRedisEnterpriseCacheDatabase', 'Get-AzRedisEnterpriseCacheDatabaseKey', 'Get-AzRedisEnterpriseCacheAccessKey', 'Import-AzRedisEnterpriseCacheDatabase', 'New-AzRedisEnterpriseCacheDatabaseKey', 'New-AzRedisEnterpriseCacheAccessKey', '*'
1616
PrivateData = @{
1717
PSData = @{
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 - RedisEnterpriseCache")]
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("f28a193d-f71c-4fc8-89bf-70c8cfe9981f")]
27-
[assembly: AssemblyVersion("1.4.1")]
28-
[assembly: AssemblyFileVersion("1.4.1")]
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 - RedisEnterpriseCache")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.4.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("1.4.1")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/exports/Get-AzRedisEnterpriseCache.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Get-AzRedisEnterpriseCache -ResourceGroupName "MyGroup"
2727
Get-AzRedisEnterpriseCache
2828
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ICluster
30+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.ICluster
3131
.Link
3232
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecache
3333
#>
3434
function Get-AzRedisEnterpriseCache {
35-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ICluster])]
35+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.ICluster])]
3636
[CmdletBinding(DefaultParameterSetName='ListBySubscriptionId', PositionalBinding=$false)]
3737
param(
3838
[Parameter()]

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/exports/Get-AzRedisEnterpriseCacheAccessPolicyAssignment.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,21 @@ Gets information about access policy assignment for database.
2525
Get-AzRedisEnterpriseCacheAccessPolicyAssignment -ClusterName "MyCache" -DatabaseName "default" -ResourceGroupName "MyGroup"
2626
2727
.Outputs
28-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IAccessPolicyAssignment
28+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IAccessPolicyAssignment
2929
.Link
3030
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecacheaccesspolicyassignment
3131
#>
3232
function Get-AzRedisEnterpriseCacheAccessPolicyAssignment {
33-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IAccessPolicyAssignment])]
33+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IAccessPolicyAssignment])]
3434
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
3535
param(
3636
[Parameter(Mandatory)]
3737
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Path')]
3838
[System.String]
3939
# The name of the Redis Enterprise cluster.
40+
# Name must be 1-60 characters long.
41+
# Allowed characters(A-Z, a-z, 0-9) and hyphen(-).
42+
# There can be no leading nor trailing nor consecutive hyphens
4043
${ClusterName},
4144

4245
[Parameter(Mandatory)]

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/exports/Get-AzRedisEnterpriseCacheDatabase.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Gets information about a database in a Redis Enterprise cluster.
2323
Get-AzRedisEnterpriseCacheDatabase -Name "MyCache" -ResourceGroupName "MyGroup"
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IDatabase
26+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IDatabase
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecachedatabase
2929
#>
3030
function Get-AzRedisEnterpriseCacheDatabase {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IDatabase])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IDatabase])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
3333
param(
3434
[Parameter(Mandatory)]

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/exports/Get-AzRedisEnterpriseCacheKey.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Retrieves all access keys for a Redis Enterprise database.
2323
Get-AzRedisEnterpriseCacheKey -Name "MyCache" -ResourceGroupName "MyGroup"
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IAccessKeys
26+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IAccessKeys
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecachekey
2929
#>
3030
function Get-AzRedisEnterpriseCacheKey {
3131
[Alias('Get-AzRedisEnterpriseCacheDatabaseKey', 'Get-AzRedisEnterpriseCacheAccessKey')]
32-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IAccessKeys])]
32+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IAccessKeys])]
3333
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3434
param(
3535
[Parameter(Mandatory)]

generated/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/exports/Get-AzRedisEnterpriseCacheOperationStatus.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Gets the status of operation.
2323
Get-AzRedisEnterpriseCacheOperationStatus -Location "East US" -OperationId "6432a8f9-0fe6-4339-9303-772c92f35d02"
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IOperationStatus
26+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IOperationStatus
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecacheoperationstatus
2929
#>
3030
function Get-AzRedisEnterpriseCacheOperationStatus {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IOperationStatus])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.IOperationStatus])]
3232
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
3333
param(
3434
[Parameter(Mandatory)]
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
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+
Lists the available SKUs for scaling the Redis Enterprise cluster.
20+
.Description
21+
Lists the available SKUs for scaling the Redis Enterprise cluster.
22+
.Example
23+
Get-AzRedisEnterpriseCacheSku -ClusterName "MyCache" -ResourceGroupName "MyGroup"
24+
25+
.Outputs
26+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.ISkuDetails
27+
.Link
28+
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecachesku
29+
#>
30+
function Get-AzRedisEnterpriseCacheSku {
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20250501Preview.ISkuDetails])]
32+
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
33+
param(
34+
[Parameter(Mandatory)]
35+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Path')]
36+
[System.String]
37+
# The name of the Redis Enterprise cluster.
38+
# Name must be 1-60 characters long.
39+
# Allowed characters(A-Z, a-z, 0-9) and hyphen(-).
40+
# There can be no leading nor trailing nor consecutive hyphens
41+
${ClusterName},
42+
43+
[Parameter(Mandatory)]
44+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Path')]
45+
[System.String]
46+
# The name of the resource group.
47+
# The name is case insensitive.
48+
${ResourceGroupName},
49+
50+
[Parameter()]
51+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Path')]
52+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
53+
[System.String[]]
54+
# The ID of the target subscription.
55+
${SubscriptionId},
56+
57+
[Parameter()]
58+
[Alias('AzureRMContext', 'AzureCredential')]
59+
[ValidateNotNull()]
60+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Azure')]
61+
[System.Management.Automation.PSObject]
62+
# The DefaultProfile parameter is not functional.
63+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
64+
${DefaultProfile},
65+
66+
[Parameter(DontShow)]
67+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Runtime')]
68+
[System.Management.Automation.SwitchParameter]
69+
# Wait for .NET debugger to attach
70+
${Break},
71+
72+
[Parameter(DontShow)]
73+
[ValidateNotNull()]
74+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Runtime')]
75+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.SendAsyncStep[]]
76+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
77+
${HttpPipelineAppend},
78+
79+
[Parameter(DontShow)]
80+
[ValidateNotNull()]
81+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Runtime')]
82+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.SendAsyncStep[]]
83+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
84+
${HttpPipelinePrepend},
85+
86+
[Parameter(DontShow)]
87+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Runtime')]
88+
[System.Uri]
89+
# The URI for the proxy server to use
90+
${Proxy},
91+
92+
[Parameter(DontShow)]
93+
[ValidateNotNull()]
94+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Runtime')]
95+
[System.Management.Automation.PSCredential]
96+
# Credentials for a proxy server to use for the remote call
97+
${ProxyCredential},
98+
99+
[Parameter(DontShow)]
100+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Runtime')]
101+
[System.Management.Automation.SwitchParameter]
102+
# Use the default credentials for the proxy
103+
${ProxyUseDefaultCredentials}
104+
)
105+
106+
begin {
107+
try {
108+
$outBuffer = $null
109+
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
110+
$PSBoundParameters['OutBuffer'] = 1
111+
}
112+
$parameterSet = $PSCmdlet.ParameterSetName
113+
114+
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
115+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
116+
}
117+
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
118+
if ($preTelemetryId -eq '') {
119+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
120+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
121+
} else {
122+
$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
123+
if ($internalCalledCmdlets -eq '') {
124+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
125+
} else {
126+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
127+
}
128+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
129+
}
130+
131+
$mapping = @{
132+
List = 'Az.RedisEnterpriseCache.private\Get-AzRedisEnterpriseCacheSku_List';
133+
}
134+
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
135+
$testPlayback = $false
136+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
137+
if ($testPlayback) {
138+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
139+
} else {
140+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
141+
}
142+
}
143+
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
144+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
145+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
146+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
147+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
148+
}
149+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
150+
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
151+
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
152+
$steppablePipeline.Begin($PSCmdlet)
153+
} catch {
154+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
155+
throw
156+
}
157+
}
158+
159+
process {
160+
try {
161+
$steppablePipeline.Process($_)
162+
} catch {
163+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
164+
throw
165+
}
166+
167+
finally {
168+
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
169+
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
170+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
171+
}
172+
173+
}
174+
end {
175+
try {
176+
$steppablePipeline.End()
177+
178+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
179+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
180+
if ($preTelemetryId -eq '') {
181+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
182+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
183+
}
184+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
185+
186+
} catch {
187+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
188+
throw
189+
}
190+
}
191+
}

0 commit comments

Comments
 (0)