diff --git a/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.format.ps1xml b/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.format.ps1xml index ea9fbf940ebc..d1536a09c637 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.format.ps1xml +++ b/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.format.ps1xml @@ -101,28 +101,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachmentResponse - - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachmentResponse#Multiple - - - - - - - - - - - - EdgeActionId - - - - - - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionExecutionFilter diff --git a/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.psd1 b/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.psd1 index cbf3fd6e54a3..d83eda2b044d 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.psd1 +++ b/generated/EdgeAction/EdgeAction.Autorest/Az.EdgeAction.psd1 @@ -1,7 +1,7 @@ @{ GUID = 'f5a7ab85-ded8-4ed5-aa41-3c88ab00edb9' RootModule = './Az.EdgeAction.psm1' - ModuleVersion = '0.1.0' + ModuleVersion = '0.1.1' CompatiblePSEditions = 'Core', 'Desktop' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.EdgeAction.private.dll' FormatsToProcess = './Az.EdgeAction.format.ps1xml' - FunctionsToExport = 'Add-AzEdgeActionAttachment', 'Deploy-AzEdgeActionVersionCode', 'Get-AzEdgeAction', 'Get-AzEdgeActionExecutionFilter', 'Get-AzEdgeActionVersion', 'Get-AzEdgeActionVersionCode', 'New-AzEdgeAction', 'New-AzEdgeActionExecutionFilter', 'New-AzEdgeActionVersion', 'Remove-AzEdgeAction', 'Remove-AzEdgeActionAttachment', 'Remove-AzEdgeActionExecutionFilter', 'Remove-AzEdgeActionVersion', 'Switch-AzEdgeActionVersionDefault', 'Update-AzEdgeAction', 'Update-AzEdgeActionExecutionFilter', 'Update-AzEdgeActionVersion' + FunctionsToExport = 'Deploy-AzEdgeActionVersionCode', 'Get-AzEdgeAction', 'Get-AzEdgeActionExecutionFilter', 'Get-AzEdgeActionVersion', 'Get-AzEdgeActionVersionCode', 'New-AzEdgeAction', 'New-AzEdgeActionExecutionFilter', 'New-AzEdgeActionVersion', 'Remove-AzEdgeAction', 'Remove-AzEdgeActionExecutionFilter', 'Remove-AzEdgeActionVersion', 'Switch-AzEdgeActionVersionDefault', 'Update-AzEdgeAction', 'Update-AzEdgeActionExecutionFilter', 'Update-AzEdgeActionVersion' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'EdgeAction' diff --git a/generated/EdgeAction/EdgeAction.Autorest/Properties/AssemblyInfo.cs b/generated/EdgeAction/EdgeAction.Autorest/Properties/AssemblyInfo.cs index 9132b8b08f39..6cd3b4ed6acd 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/Properties/AssemblyInfo.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/Properties/AssemblyInfo.cs @@ -26,7 +26,3 @@ [assembly: System.CLSCompliantAttribute(false)] - - - - diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Add-AzEdgeActionAttachment.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Add-AzEdgeActionAttachment.ps1 deleted file mode 100644 index 4fe5fdc2a17b..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Add-AzEdgeActionAttachment.ps1 +++ /dev/null @@ -1,279 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -A long-running resource action. -.Description -A long-running resource action. -.Example -Add-AzEdgeActionAttachment -EdgeActionName "myEdgeAction" -ResourceGroupName "myResourceGroup" -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" -.Example -Get-AzEdgeAction -Name "myEdgeAction" -ResourceGroupName "myResourceGroup" | Add-AzEdgeActionAttachment -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -BODY : Edge action attachment information - AttachedResourceId : The attached resource Id - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version -.Link -https://learn.microsoft.com/powershell/module/az.edgeaction/add-azedgeactionattachment -#> -function Add-AzEdgeActionAttachment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse])] -[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Add', Mandatory)] - [Parameter(ParameterSetName='AddExpanded', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action - ${EdgeActionName}, - - [Parameter(ParameterSetName='Add', Mandatory)] - [Parameter(ParameterSetName='AddExpanded', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Add')] - [Parameter(ParameterSetName='AddExpanded')] - [Parameter(ParameterSetName='AddViaJsonFilePath')] - [Parameter(ParameterSetName='AddViaJsonString')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, - - [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment] - # Edge action attachment information - ${Body}, - - [Parameter(ParameterSetName='AddExpanded', Mandatory)] - [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The attached resource Id - ${AttachedResourceId}, - - [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Path of Json file supplied to the Add operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Json string supplied to the Add operation - ${JsonString}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - - $context = Get-AzContext - if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit - } - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Add = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_Add'; - AddExpanded = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddExpanded'; - AddViaIdentity = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaIdentity'; - AddViaIdentityExpanded = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaIdentityExpanded'; - AddViaJsonFilePath = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaJsonFilePath'; - AddViaJsonString = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaJsonString'; - } - if (('Add', 'AddExpanded', 'AddViaJsonFilePath', 'AddViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - if ($wrappedCmd -eq $null) { - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) - } - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Deploy-AzEdgeActionVersionCode.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Deploy-AzEdgeActionVersionCode.ps1 index 49afeb168186..322f21f94aef 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Deploy-AzEdgeActionVersionCode.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Deploy-AzEdgeActionVersionCode.ps1 @@ -158,8 +158,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeAction.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeAction.ps1 index 29782cf23b7b..6937ec654848 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeAction.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeAction.ps1 @@ -140,8 +140,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionExecutionFilter.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionExecutionFilter.ps1 index 0fbe78c702e2..921c4e6f2b59 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionExecutionFilter.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionExecutionFilter.ps1 @@ -22,7 +22,7 @@ Get a EdgeActionExecutionFilter .Example Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" .Example -Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "filter1" +Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "filter1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity @@ -160,8 +160,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersion.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersion.ps1 index f854cd4f2a6c..d41dfb3c5fb1 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersion.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersion.ps1 @@ -160,8 +160,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersionCode.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersionCode.ps1 index b71832e6c78c..d7e1d37bc470 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersionCode.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Get-AzEdgeActionVersionCode.ps1 @@ -16,92 +16,56 @@ <# .Synopsis -A long-running resource action. +Get Edge Action version code and optionally save to file. .Description -A long-running resource action. +A long-running resource action that retrieves the version code for an Edge Action version. +When the -OutputPath parameter is specified, the base64-encoded content is decoded and saved +as a zip file to the specified directory. +Otherwise, returns the raw response with base64 content. .Example Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" .Example Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -OutputPath "C:\Downloads" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode .Outputs System.Management.Automation.PSCustomObject -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version .Link https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversioncode #> function Get-AzEdgeActionVersionCode { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode], [System.Management.Automation.PSCustomObject])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='GetCustom', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetAndSave', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetAndSave', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='GetAndSave')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] - [Parameter(ParameterSetName='GetAndSave', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action version ${Version}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, - [Parameter(ParameterSetName='GetAndSave', Mandatory)] + [Parameter(ParameterSetName='GetAndSaveCustom', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [System.String] # Output directory to save the decoded version code as a zip file. @@ -112,8 +76,7 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] @@ -181,8 +144,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -203,12 +165,10 @@ begin { } $mapping = @{ - Get = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_Get'; - GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentity'; - GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentityEdgeAction'; - GetAndSave = 'Az.EdgeAction.custom\Get-AzEdgeActionVersionCode'; + GetCustom = 'Az.EdgeAction.custom\Get-AzEdgeActionVersionCode'; + GetAndSaveCustom = 'Az.EdgeAction.custom\Get-AzEdgeActionVersionCode'; } - if (('Get', 'GetAndSave') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('GetCustom', 'GetAndSaveCustom') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeAction.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeAction.ps1 index add8fac2b1e0..aaed76ff972f 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeAction.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeAction.ps1 @@ -166,8 +166,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionExecutionFilter.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionExecutionFilter.ps1 index 411bcd003f13..8dbf64d2a8c6 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionExecutionFilter.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionExecutionFilter.ps1 @@ -20,7 +20,7 @@ Create a EdgeActionExecutionFilter .Description Create a EdgeActionExecutionFilter .Example -New-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "myFilter" -Location "global" -Order 1 +New-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "myFilter" -Location "global" -VersionId "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Cdn/edgeActions/myEdgeAction/versions/v1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter @@ -223,8 +223,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionVersion.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionVersion.ps1 index 55c84f8d2f21..a5ed211f777f 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionVersion.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/New-AzEdgeActionVersion.ps1 @@ -219,8 +219,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/ProxyCmdletDefinitions.ps1 index 7eeaa3568bc6..1dfff8663eda 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -16,27 +16,30 @@ <# .Synopsis -A long-running resource action. +Get a EdgeActionExecutionFilter .Description -A long-running resource action. +Get a EdgeActionExecutionFilter .Example -Add-AzEdgeActionAttachment -EdgeActionName "myEdgeAction" -ResourceGroupName "myResourceGroup" -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" +Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" .Example -Get-AzEdgeAction -Name "myEdgeAction" -ResourceGroupName "myResourceGroup" | Add-AzEdgeActionAttachment -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" +Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "filter1" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter .Notes COMPLEX PARAMETER PROPERTIES 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. -BODY : Edge action attachment information - AttachedResourceId : The attached resource Id +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version INPUTOBJECT : Identity Parameter [EdgeActionName ]: The name of the Edge Action @@ -46,74 +49,54 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/add-azedgeactionattachment +https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionexecutionfilter #> -function Add-AzEdgeActionAttachment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse])] -[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzEdgeActionExecutionFilter { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Add', Mandatory)] - [Parameter(ParameterSetName='AddExpanded', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Add', Mandatory)] - [Parameter(ParameterSetName='AddExpanded', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the execution filter + ${ExecutionFilter}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Add')] - [Parameter(ParameterSetName='AddExpanded')] - [Parameter(ParameterSetName='AddViaJsonFilePath')] - [Parameter(ParameterSetName='AddViaJsonString')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment] - # Edge action attachment information - ${Body}, - - [Parameter(ParameterSetName='AddExpanded', Mandatory)] - [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The attached resource Id - ${AttachedResourceId}, - - [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Path of Json file supplied to the Add operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Json string supplied to the Add operation - ${JsonString}, + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -124,12 +107,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -150,12 +127,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Uri] @@ -189,8 +160,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -211,14 +181,12 @@ begin { } $mapping = @{ - Add = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_Add'; - AddExpanded = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddExpanded'; - AddViaIdentity = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaIdentity'; - AddViaIdentityExpanded = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaIdentityExpanded'; - AddViaJsonFilePath = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaJsonFilePath'; - AddViaJsonString = 'Az.EdgeAction.private\Add-AzEdgeActionAttachment_AddViaJsonString'; + Get = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_Get'; + GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_GetViaIdentity'; + GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_GetViaIdentityEdgeAction'; + List = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_List'; } - if (('Add', 'AddExpanded', 'AddViaJsonFilePath', 'AddViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -280,18 +248,18 @@ end { <# .Synopsis -Get a EdgeActionExecutionFilter +Get a EdgeActionVersion .Description -Get a EdgeActionExecutionFilter +Get a EdgeActionVersion .Example -Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" +Get-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" .Example -Get-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "filter1" +Get-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -313,10 +281,10 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionexecutionfilter +https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversion #> -function Get-AzEdgeActionExecutionFilter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter])] +function Get-AzEdgeActionVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -326,13 +294,6 @@ param( # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the execution filter - ${ExecutionFilter}, - [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] @@ -350,6 +311,13 @@ param( # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version + ${Version}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] @@ -424,8 +392,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -446,10 +413,10 @@ begin { } $mapping = @{ - Get = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_Get'; - GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_GetViaIdentity'; - GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_GetViaIdentityEdgeAction'; - List = 'Az.EdgeAction.private\Get-AzEdgeActionExecutionFilter_List'; + Get = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_Get'; + GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_GetViaIdentity'; + GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_GetViaIdentityEdgeAction'; + List = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -513,33 +480,23 @@ end { <# .Synopsis -A long-running resource action. +Get a EdgeAction .Description -A long-running resource action. +Get a EdgeAction .Example -Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" +Get-AzEdgeAction -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" .Example -Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -OutputPath "C:\Downloads" +Get-AzEdgeAction -ResourceGroupName "myResourceGroup" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode -.Outputs -System.Management.Automation.PSCustomObject +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction .Notes COMPLEX PARAMETER PROPERTIES 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. -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - INPUTOBJECT : Identity Parameter [EdgeActionName ]: The name of the Edge Action [ExecutionFilter ]: The name of the execution filter @@ -548,21 +505,21 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversioncode +https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeaction #> -function Get-AzEdgeActionVersionCode { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode], [System.Management.Automation.PSCustomObject])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzEdgeAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetAndSave', Mandatory)] + [Alias('EdgeActionName')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action - ${EdgeActionName}, + ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetAndSave', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. @@ -570,7 +527,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='GetAndSave')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -578,32 +536,12 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] - [Parameter(ParameterSetName='GetAndSave', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action version - ${Version}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, - - [Parameter(ParameterSetName='GetAndSave', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Output directory to save the decoded version code as a zip file. - ${OutputPath}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -613,12 +551,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -639,12 +571,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Uri] @@ -678,8 +604,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -700,12 +625,12 @@ begin { } $mapping = @{ - Get = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_Get'; - GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentity'; - GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentityEdgeAction'; - GetAndSave = 'Az.EdgeAction.custom\Get-AzEdgeActionVersionCode'; + Get = 'Az.EdgeAction.private\Get-AzEdgeAction_Get'; + GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeAction_GetViaIdentity'; + List = 'Az.EdgeAction.private\Get-AzEdgeAction_List'; + List1 = 'Az.EdgeAction.private\Get-AzEdgeAction_List1'; } - if (('Get', 'GetAndSave') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -767,18 +692,18 @@ end { <# .Synopsis -Get a EdgeActionVersion +Create a EdgeActionExecutionFilter .Description -Get a EdgeActionVersion -.Example -Get-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" +Create a EdgeActionExecutionFilter .Example -Get-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" +New-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "myFilter" -Location "global" -VersionId "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Cdn/edgeActions/myEdgeAction/versions/v1" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter .Notes COMPLEX PARAMETER PROPERTIES @@ -792,512 +717,66 @@ EDGEACTIONINPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version +RESOURCE : Concrete tracked resource types can be created by aliasing this type using a specific property type. + [Location ]: The geo-location where the resource lives + [Tag ]: Resource tags. + [(Any) ]: This indicates any property can be added to this object. + [ExecutionFilterIdentifierHeaderName ]: Custom Header Key associated with the execution filter + [ExecutionFilterIdentifierHeaderValue ]: Custom Header Value associated with the execution filter + [VersionId ]: The referenced versionId of the edgeaction version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversion +https://learn.microsoft.com/powershell/module/az.edgeaction/new-azedgeactionexecutionfilter #> -function Get-AzEdgeActionVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function New-AzEdgeActionExecutionFilter { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the execution filter + ${ExecutionFilter}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] + [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action version - ${Version}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityEdgeActionExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter ${EdgeActionInputObject}, - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - - $context = Get-AzContext - if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit - } - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Get = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_Get'; - GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_GetViaIdentity'; - GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_GetViaIdentityEdgeAction'; - List = 'Az.EdgeAction.private\Get-AzEdgeActionVersion_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - if ($wrappedCmd -eq $null) { - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) - } - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} - -<# -.Synopsis -Get a EdgeAction -.Description -Get a EdgeAction -.Example -Get-AzEdgeAction -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -.Example -Get-AzEdgeAction -ResourceGroupName "myResourceGroup" - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version -.Link -https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeaction -#> -function Get-AzEdgeAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] -param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('EdgeActionName')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action - ${Name}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='List1')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - - $context = Get-AzContext - if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit - } - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Get = 'Az.EdgeAction.private\Get-AzEdgeAction_Get'; - GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeAction_GetViaIdentity'; - List = 'Az.EdgeAction.private\Get-AzEdgeAction_List'; - List1 = 'Az.EdgeAction.private\Get-AzEdgeAction_List1'; - } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - if ($wrappedCmd -eq $null) { - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) - } - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} - -<# -.Synopsis -Create a EdgeActionExecutionFilter -.Description -Create a EdgeActionExecutionFilter -.Example -New-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "myFilter" -Location "global" -Order 1 - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - -RESOURCE : Concrete tracked resource types can be created by aliasing this type using a specific property type. - [Location ]: The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [ExecutionFilterIdentifierHeaderName ]: Custom Header Key associated with the execution filter - [ExecutionFilterIdentifierHeaderValue ]: Custom Header Value associated with the execution filter - [VersionId ]: The referenced versionId of the edgeaction version -.Link -https://learn.microsoft.com/powershell/module/az.edgeaction/new-azedgeactionexecutionfilter -#> -function New-AzEdgeActionExecutionFilter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the execution filter - ${ExecutionFilter}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action - ${EdgeActionName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaJsonFilePath')] - [Parameter(ParameterSetName='CreateViaJsonString')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, - - [Parameter(ParameterSetName='CreateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityEdgeActionExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityEdgeActionExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityEdgeActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityEdgeActionExpanded')] @@ -1420,8 +899,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1713,8 +1191,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -1953,8 +1430,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2041,16 +1517,12 @@ end { <# .Synopsis -A long-running resource action. +Delete a EdgeActionExecutionFilter .Description -A long-running resource action. -.Example -Remove-AzEdgeActionAttachment -EdgeActionName "myEdgeAction" -ResourceGroupName "myResourceGroup" -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" +Delete a EdgeActionExecutionFilter .Example -Get-AzEdgeAction -Name "myEdgeAction" -ResourceGroupName "myResourceGroup" | Remove-AzEdgeActionAttachment -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" +Remove-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "myFilter" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs @@ -2060,8 +1532,13 @@ COMPLEX PARAMETER PROPERTIES 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. -BODY : Edge action attachment information - AttachedResourceId : The attached resource Id +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version INPUTOBJECT : Identity Parameter [EdgeActionName ]: The name of the Edge Action @@ -2071,25 +1548,26 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeactionattachment +https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeactionexecutionfilter #> -function Remove-AzEdgeActionAttachment { +function Remove-AzEdgeActionExecutionFilter { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='DeleteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action ${EdgeActionName}, [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the execution filter + ${ExecutionFilter}, + + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. @@ -2097,9 +1575,6 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] - [Parameter(ParameterSetName='DeleteExpanded')] - [Parameter(ParameterSetName='DeleteViaJsonFilePath')] - [Parameter(ParameterSetName='DeleteViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2108,37 +1583,16 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='Delete', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment] - # Edge action attachment information - ${Body}, - - [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The attached resource Id - ${AttachedResourceId}, - - [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Path of Json file supplied to the Delete operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Json string supplied to the Delete operation - ${JsonString}, + [Parameter(ParameterSetName='DeleteViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2220,8 +1674,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2242,14 +1695,11 @@ begin { } $mapping = @{ - Delete = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_Delete'; - DeleteExpanded = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteExpanded'; - DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaIdentity'; - DeleteViaIdentityExpanded = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaIdentityExpanded'; - DeleteViaJsonFilePath = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaJsonFilePath'; - DeleteViaJsonString = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaJsonString'; + Delete = 'Az.EdgeAction.private\Remove-AzEdgeActionExecutionFilter_Delete'; + DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeActionExecutionFilter_DeleteViaIdentity'; + DeleteViaIdentityEdgeAction = 'Az.EdgeAction.private\Remove-AzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction'; } - if (('Delete', 'DeleteExpanded', 'DeleteViaJsonFilePath', 'DeleteViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2311,11 +1761,11 @@ end { <# .Synopsis -Delete a EdgeActionExecutionFilter +Delete a EdgeActionVersion .Description -Delete a EdgeActionExecutionFilter +Delete a EdgeActionVersion .Example -Remove-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "myFilter" +Remove-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity @@ -2342,9 +1792,9 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeactionexecutionfilter +https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeactionversion #> -function Remove-AzEdgeActionExecutionFilter { +function Remove-AzEdgeActionVersion { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( @@ -2354,13 +1804,6 @@ param( # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityEdgeAction', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the execution filter - ${ExecutionFilter}, - [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] @@ -2376,6 +1819,13 @@ param( # The value must be an UUID. ${SubscriptionId}, + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version + ${Version}, + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] @@ -2468,8 +1918,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2490,9 +1939,9 @@ begin { } $mapping = @{ - Delete = 'Az.EdgeAction.private\Remove-AzEdgeActionExecutionFilter_Delete'; - DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeActionExecutionFilter_DeleteViaIdentity'; - DeleteViaIdentityEdgeAction = 'Az.EdgeAction.private\Remove-AzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction'; + Delete = 'Az.EdgeAction.private\Remove-AzEdgeActionVersion_Delete'; + DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeActionVersion_DeleteViaIdentity'; + DeleteViaIdentityEdgeAction = 'Az.EdgeAction.private\Remove-AzEdgeActionVersion_DeleteViaIdentityEdgeAction'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -2556,11 +2005,11 @@ end { <# .Synopsis -Delete a EdgeActionVersion +Delete a EdgeAction .Description -Delete a EdgeActionVersion +Delete a EdgeAction .Example -Remove-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" +Remove-AzEdgeAction -ResourceGroupName "myResourceGroup" -Name "myEdgeAction" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity @@ -2571,14 +2020,6 @@ COMPLEX PARAMETER PROPERTIES 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. -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - INPUTOBJECT : Identity Parameter [EdgeActionName ]: The name of the Edge Action [ExecutionFilter ]: The name of the execution filter @@ -2587,17 +2028,18 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeactionversion +https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeaction #> -function Remove-AzEdgeActionVersion { +function Remove-AzEdgeAction { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('EdgeActionName')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action - ${EdgeActionName}, + ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] @@ -2614,25 +2056,12 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityEdgeAction', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action version - ${Version}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='DeleteViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2713,8 +2142,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2735,9 +2163,8 @@ begin { } $mapping = @{ - Delete = 'Az.EdgeAction.private\Remove-AzEdgeActionVersion_Delete'; - DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeActionVersion_DeleteViaIdentity'; - DeleteViaIdentityEdgeAction = 'Az.EdgeAction.private\Remove-AzEdgeActionVersion_DeleteViaIdentityEdgeAction'; + Delete = 'Az.EdgeAction.private\Remove-AzEdgeAction_Delete'; + DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeAction_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -2801,21 +2228,31 @@ end { <# .Synopsis -Delete a EdgeAction +Update a EdgeActionExecutionFilter .Description -Delete a EdgeAction +Update a EdgeActionExecutionFilter .Example -Remove-AzEdgeAction -ResourceGroupName "myResourceGroup" -Name "myEdgeAction" +Update-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "myFilter" -Tag @{ Environment = "Production" } +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter .Notes COMPLEX PARAMETER PROPERTIES 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. +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version + INPUTOBJECT : Identity Parameter [EdgeActionName ]: The name of the Edge Action [ExecutionFilter ]: The name of the execution filter @@ -2823,40 +2260,96 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version + +PROPERTY : Concrete tracked resource types can be created by aliasing this type using a specific property type. + [Tag ]: Resource tags. + [(Any) ]: This indicates any property can be added to this object. + [ExecutionFilterIdentifierHeaderName ]: Custom Header Key associated with the execution filter + [ExecutionFilterIdentifierHeaderValue ]: Custom Header Value associated with the execution filter + [VersionId ]: The referenced versionId of the edgeaction version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeaction +https://learn.microsoft.com/powershell/module/az.edgeaction/update-azedgeactionexecutionfilter #> -function Remove-AzEdgeAction { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzEdgeActionExecutionFilter { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('EdgeActionName')] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action - ${Name}, + ${EdgeActionName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the execution filter + ${ExecutionFilter}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IAzureResourceManagerCommonTypesTrackedResourceUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate] + # Concrete tracked resource types can be created by aliasing this type using a specific property type. + ${Property}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [System.String] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, + # Path of Json file supplied to the Update operation + ${JsonFilePath}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2899,12 +2392,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Uri] @@ -2938,8 +2425,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -2960,10 +2446,14 @@ begin { } $mapping = @{ - Delete = 'Az.EdgeAction.private\Remove-AzEdgeAction_Delete'; - DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeAction_DeleteViaIdentity'; + UpdateExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateExpanded'; + UpdateViaIdentityEdgeAction = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction'; + UpdateViaIdentityEdgeActionExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded'; + UpdateViaIdentityExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaJsonString'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3025,16 +2515,18 @@ end { <# .Synopsis -A long-running resource action. +Update a EdgeActionVersion .Description -A long-running resource action. +Update a EdgeActionVersion .Example -Switch-AzEdgeActionVersionDefault -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v2" +Update-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -Tag @{ Environment = "Production"; Team = "Platform" } .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -3055,27 +2547,39 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version + +PROPERTY : Concrete tracked resource types can be created by aliasing this type using a specific property type. + [Tag ]: Resource tags. + [(Any) ]: This indicates any property can be added to this object. + [DeploymentType ]: The deployment type + [IsDefaultVersion ]: The active state .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/switch-azedgeactionversiondefault +https://learn.microsoft.com/powershell/module/az.edgeaction/update-azedgeactionversion #> -function Switch-AzEdgeActionVersionDefault { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Swap', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzEdgeActionVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Swap', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Swap', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Swap')] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3083,24 +2587,55 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Swap', Mandatory)] - [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action version ${Version}, - [Parameter(ParameterSetName='SwapViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter - ${InputObject}, + ${EdgeActionInputObject}, - [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] # Identity Parameter - ${EdgeActionInputObject}, + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IAzureResourceManagerCommonTypesTrackedResourceUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate] + # Concrete tracked resource types can be created by aliasing this type using a specific property type. + ${Property}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -3143,12 +2678,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Uri] @@ -3182,8 +2711,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3204,11 +2732,14 @@ begin { } $mapping = @{ - Swap = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_Swap'; - SwapViaIdentity = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentity'; - SwapViaIdentityEdgeAction = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentityEdgeAction'; + UpdateExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateExpanded'; + UpdateViaIdentityEdgeAction = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaIdentityEdgeAction'; + UpdateViaIdentityEdgeActionExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded'; + UpdateViaIdentityExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaJsonString'; } - if (('Swap') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3270,31 +2801,21 @@ end { <# .Synopsis -Update a EdgeActionExecutionFilter +Update a EdgeAction .Description -Update a EdgeActionExecutionFilter +Update a EdgeAction .Example -Update-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "myFilter" -Tag @{ Environment = "Production" } +Update-AzEdgeAction -ResourceGroupName "myResourceGroup" -Name "myEdgeAction" -Tag @{ Environment = "Production"; Team = "Platform" } -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction .Notes COMPLEX PARAMETER PROPERTIES 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. -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - INPUTOBJECT : Identity Parameter [EdgeActionName ]: The name of the Edge Action [ExecutionFilter ]: The name of the execution filter @@ -3302,37 +2823,21 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. [Version ]: The name of the Edge Action version - -PROPERTY : Concrete tracked resource types can be created by aliasing this type using a specific property type. - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [ExecutionFilterIdentifierHeaderName ]: Custom Header Key associated with the execution filter - [ExecutionFilterIdentifierHeaderValue ]: Custom Header Value associated with the execution filter - [VersionId ]: The referenced versionId of the edgeaction version .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/update-azedgeactionexecutionfilter +https://learn.microsoft.com/powershell/module/az.edgeaction/update-azedgeaction #> -function Update-AzEdgeActionExecutionFilter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter])] +function Update-AzEdgeAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('EdgeActionName')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action - ${EdgeActionName}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory)] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the execution filter - ${ExecutionFilter}, + ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] @@ -3353,13 +2858,6 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] @@ -3367,7 +2865,20 @@ param( ${InputObject}, [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [System.String] + # The name of the SKU + ${SkuName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] + [System.String] + # The tier of the SKU + ${SkuTier}, + + [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IAzureResourceManagerCommonTypesTrackedResourceUpdateTags]))] @@ -3375,12 +2886,6 @@ param( # Resource tags. ${Tag}, - [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate] - # Concrete tracked resource types can be created by aliasing this type using a specific property type. - ${Property}, - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [System.String] @@ -3467,8 +2972,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3489,12 +2993,10 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateExpanded'; - UpdateViaIdentityEdgeAction = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction'; - UpdateViaIdentityEdgeActionExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded'; - UpdateViaIdentityExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.EdgeAction.private\Update-AzEdgeActionExecutionFilter_UpdateViaJsonString'; + UpdateExpanded = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -3558,135 +3060,81 @@ end { <# .Synopsis -Update a EdgeActionVersion +Deploy Edge Action version code from a file. .Description -Update a EdgeActionVersion +Deploy Edge Action version code from a JavaScript or zip file. +This command handles file reading, +automatic zipping (for JavaScript files when using zip deployment), and base64 encoding. .Example -Update-AzEdgeActionVersion -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -Tag @{ Environment = "Production"; Team = "Platform" } - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - -PROPERTY : Concrete tracked resource types can be created by aliasing this type using a specific property type. - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [DeploymentType ]: The deployment type - [IsDefaultVersion ]: The active state -.Link -https://learn.microsoft.com/powershell/module/az.edgeaction/update-azedgeactionversion -#> -function Update-AzEdgeActionVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action - ${EdgeActionName}, +Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\handler.js" +.Example +Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\handler.js" -DeploymentType "zip" +.Example +Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\package.zip" +.Example +Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\handler.js" -Name "production-deploy-001" - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] +.Outputs +System.Object +.Link +https://learn.microsoft.com/powershell/module/az.edgeaction/deploy-azedgeactionversioncode +#> +function Deploy-AzEdgeActionVersionCode { +[OutputType([System.Object])] +[CmdletBinding(DefaultParameterSetName='DeployFromFile', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, + # The name of the Edge Action + ${EdgeActionName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory)] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] - # The name of the Edge Action version + # The version name ${Version}, - [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, - - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityEdgeActionExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IAzureResourceManagerCommonTypesTrackedResourceUpdateTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate] - # Concrete tracked resource types can be created by aliasing this type using a specific property type. - ${Property}, + [System.String] + # Path to JavaScript (.js) or zip (.zip) file + ${FilePath}, - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, + # Deployment type: 'file' for JavaScript files, 'zip' for zip archives. + # Auto-detected if not specified. + ${DeploymentType}, - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [System.String] - # Json string supplied to the Update operation - ${JsonString}, + # The version code deployment name. + # Defaults to the version name if not specified. + ${Name}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] @@ -3754,8 +3202,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -3776,14 +3223,9 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateExpanded'; - UpdateViaIdentityEdgeAction = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaIdentityEdgeAction'; - UpdateViaIdentityEdgeActionExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded'; - UpdateViaIdentityExpanded = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.EdgeAction.private\Update-AzEdgeActionVersion_UpdateViaJsonString'; + DeployFromFile = 'Az.EdgeAction.custom\Deploy-AzEdgeActionVersionCode'; } - if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('DeployFromFile') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3845,110 +3287,67 @@ end { <# .Synopsis -Update a EdgeAction +Get Edge Action version code and optionally save to file. .Description -Update a EdgeAction +A long-running resource action that retrieves the version code for an Edge Action version. +When the -OutputPath parameter is specified, the base64-encoded content is decoded and saved +as a zip file to the specified directory. +Otherwise, returns the raw response with base64 content. .Example -Update-AzEdgeAction -ResourceGroupName "myResourceGroup" -Name "myEdgeAction" -Tag @{ Environment = "Production"; Team = "Platform" } +Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" +.Example +Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -OutputPath "C:\Downloads" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode +.Outputs +System.Management.Automation.PSCustomObject .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/update-azedgeaction +https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversioncode #> -function Update-AzEdgeAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzEdgeActionVersionCode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode], [System.Management.Automation.PSCustomObject])] +[CmdletBinding(DefaultParameterSetName='GetCustom', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Alias('EdgeActionName')] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action - ${Name}, + ${EdgeActionName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] + # The name of the Edge Action version + ${Version}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The name of the SKU - ${SkuName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The tier of the SKU - ${SkuTier}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IAzureResourceManagerCommonTypesTrackedResourceUpdateTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='GetAndSaveCustom', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] [System.String] - # Json string supplied to the Update operation - ${JsonString}, + # Output directory to save the decoded version code as a zip file. + ${OutputPath}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] @@ -4016,8 +3415,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4038,12 +3436,10 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.EdgeAction.private\Update-AzEdgeAction_UpdateViaJsonString'; + GetCustom = 'Az.EdgeAction.custom\Get-AzEdgeActionVersionCode'; + GetAndSaveCustom = 'Az.EdgeAction.custom\Get-AzEdgeActionVersionCode'; } - if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('GetCustom', 'GetAndSaveCustom') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4105,46 +3501,39 @@ end { <# .Synopsis -Deploy Edge Action version code from a file. +Swap the default version for an Edge Action. .Description -Deploy Edge Action version code from a JavaScript or zip file. -This command handles file reading, -automatic zipping (for JavaScript files when using zip deployment), and base64 encoding. -.Example -Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\handler.js" -.Example -Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\handler.js" -DeploymentType "zip" -.Example -Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\package.zip" +A long-running resource action that swaps the default version for an Edge Action. +This operation makes the specified version the new default version. .Example -Deploy-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -FilePath "C:\code\handler.js" -Name "production-deploy-001" +Switch-AzEdgeActionVersionDefault -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v2" .Outputs -System.Object +System.Boolean .Link -https://learn.microsoft.com/powershell/module/az.edgeaction/deploy-azedgeactionversioncode +https://learn.microsoft.com/powershell/module/az.edgeaction/switch-azedgeactionversiondefault #> -function Deploy-AzEdgeActionVersionCode { -[OutputType([System.Object])] -[CmdletBinding(DefaultParameterSetName='DeployFromFile', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Switch-AzEdgeActionVersionDefault { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='SwapCustom', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, + # The name of the Edge Action + ${EdgeActionName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] - # The name of the Edge Action - ${EdgeActionName}, + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] - # The version name + # The name of the Edge Action version to make the default ${Version}, [Parameter()] @@ -4152,28 +3541,9 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. + # The value must be an UUID. ${SubscriptionId}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Path to JavaScript (.js) or zip (.zip) file - ${FilePath}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Deployment type: 'file' for JavaScript files, 'zip' for zip archives. - # Auto-detected if not specified. - ${DeploymentType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The version code deployment name. - # Defaults to the version name if not specified. - ${Name}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4214,6 +3584,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] [System.Uri] @@ -4247,8 +3623,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -4269,9 +3644,9 @@ begin { } $mapping = @{ - DeployFromFile = 'Az.EdgeAction.custom\Deploy-AzEdgeActionVersionCode'; + SwapCustom = 'Az.EdgeAction.custom\Switch-AzEdgeActionVersionDefault'; } - if (('DeployFromFile') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('SwapCustom') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeAction.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeAction.ps1 index 5b39801164b2..a1c38cc089b3 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeAction.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeAction.ps1 @@ -153,8 +153,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionAttachment.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionAttachment.ps1 deleted file mode 100644 index 5402f5d6784e..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionAttachment.ps1 +++ /dev/null @@ -1,285 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -A long-running resource action. -.Description -A long-running resource action. -.Example -Remove-AzEdgeActionAttachment -EdgeActionName "myEdgeAction" -ResourceGroupName "myResourceGroup" -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" -.Example -Get-AzEdgeAction -Name "myEdgeAction" -ResourceGroupName "myResourceGroup" | Remove-AzEdgeActionAttachment -AttachedResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myAfdProfile/rulesets/myRuleSet/rules/myRule" - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity -.Outputs -System.Boolean -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -BODY : Edge action attachment information - AttachedResourceId : The attached resource Id - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version -.Link -https://learn.microsoft.com/powershell/module/az.edgeaction/remove-azedgeactionattachment -#> -function Remove-AzEdgeActionAttachment { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='DeleteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action - ${EdgeActionName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Delete')] - [Parameter(ParameterSetName='DeleteExpanded')] - [Parameter(ParameterSetName='DeleteViaJsonFilePath')] - [Parameter(ParameterSetName='DeleteViaJsonString')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - # The value must be an UUID. - ${SubscriptionId}, - - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='Delete', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment] - # Edge action attachment information - ${Body}, - - [Parameter(ParameterSetName='DeleteExpanded', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # The attached resource Id - ${AttachedResourceId}, - - [Parameter(ParameterSetName='DeleteViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Path of Json file supplied to the Delete operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='DeleteViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Body')] - [System.String] - # Json string supplied to the Delete operation - ${JsonString}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - - $context = Get-AzContext - if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit - } - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Delete = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_Delete'; - DeleteExpanded = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteExpanded'; - DeleteViaIdentity = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaIdentity'; - DeleteViaIdentityExpanded = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaIdentityExpanded'; - DeleteViaJsonFilePath = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaJsonFilePath'; - DeleteViaJsonString = 'Az.EdgeAction.private\Remove-AzEdgeActionAttachment_DeleteViaJsonString'; - } - if (('Delete', 'DeleteExpanded', 'DeleteViaJsonFilePath', 'DeleteViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - if ($wrappedCmd -eq $null) { - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) - } - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionExecutionFilter.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionExecutionFilter.ps1 index e601df28e816..fccff2aa7844 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionExecutionFilter.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionExecutionFilter.ps1 @@ -20,7 +20,7 @@ Delete a EdgeActionExecutionFilter .Description Delete a EdgeActionExecutionFilter .Example -Remove-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "myFilter" +Remove-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "myFilter" .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionVersion.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionVersion.ps1 index 944268605c4c..a13c69e8947e 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionVersion.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Remove-AzEdgeActionVersion.ps1 @@ -173,8 +173,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Switch-AzEdgeActionVersionDefault.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Switch-AzEdgeActionVersionDefault.ps1 index 27f690b579b7..92ffb21be6ac 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Switch-AzEdgeActionVersionDefault.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Switch-AzEdgeActionVersionDefault.ps1 @@ -16,57 +16,42 @@ <# .Synopsis -A long-running resource action. +Swap the default version for an Edge Action. .Description -A long-running resource action. +A long-running resource action that swaps the default version for an Edge Action. +This operation makes the specified version the new default version. .Example Switch-AzEdgeActionVersionDefault -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v2" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity .Outputs System.Boolean -.Notes -COMPLEX PARAMETER PROPERTIES - -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. - -EDGEACTIONINPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version - -INPUTOBJECT : Identity Parameter - [EdgeActionName ]: The name of the Edge Action - [ExecutionFilter ]: The name of the execution filter - [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [Version ]: The name of the Edge Action version .Link https://learn.microsoft.com/powershell/module/az.edgeaction/switch-azedgeactionversiondefault #> function Switch-AzEdgeActionVersionDefault { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Swap', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='SwapCustom', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Swap', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the Edge Action ${EdgeActionName}, - [Parameter(ParameterSetName='Swap', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Swap')] + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version to make the default + ${Version}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -74,32 +59,12 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Swap', Mandatory)] - [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [System.String] - # The name of the Edge Action version - ${Version}, - - [Parameter(ParameterSetName='SwapViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${InputObject}, - - [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] - # Identity Parameter - ${EdgeActionInputObject}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] @@ -173,8 +138,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { @@ -195,11 +159,9 @@ begin { } $mapping = @{ - Swap = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_Swap'; - SwapViaIdentity = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentity'; - SwapViaIdentityEdgeAction = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentityEdgeAction'; + SwapCustom = 'Az.EdgeAction.custom\Switch-AzEdgeActionVersionDefault'; } - if (('Swap') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('SwapCustom') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeAction.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeAction.ps1 index d9b2b7e91ee3..7b69f30baf73 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeAction.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeAction.ps1 @@ -187,8 +187,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionExecutionFilter.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionExecutionFilter.ps1 index 6a3f1601968d..476eb74c581c 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionExecutionFilter.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionExecutionFilter.ps1 @@ -20,7 +20,7 @@ Update a EdgeActionExecutionFilter .Description Update a EdgeActionExecutionFilter .Example -Update-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Name "myFilter" -Tag @{ Environment = "Production" } +Update-AzEdgeActionExecutionFilter -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -ExecutionFilter "myFilter" -Tag @{ Environment = "Production" } .Inputs Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate @@ -213,8 +213,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionVersion.ps1 b/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionVersion.ps1 index 622db72d8757..7a17b95fced1 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionVersion.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/exports/Update-AzEdgeActionVersion.ps1 @@ -212,8 +212,7 @@ begin { $context = Get-AzContext if (-not $context -and -not $testPlayback) { - Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." - exit + throw "No Azure login detected. Please run 'Connect-AzAccount' to log in." } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/generate-info.json b/generated/EdgeAction/EdgeAction.Autorest/generate-info.json index f053f7cc2a03..5e83ec1afcee 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generate-info.json +++ b/generated/EdgeAction/EdgeAction.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "9072b342-800a-4c15-9e5e-0295d0db4460" + "generate_Id": "e0c3553a-d09f-42c0-8162-fd878decc211" } diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/api/EdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/api/EdgeAction.cs index c872f45d9a1f..2b0ac58cf929 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/api/EdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/api/EdgeAction.cs @@ -30,7 +30,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersCreate(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -79,7 +79,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -139,7 +139,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -203,7 +203,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersCreateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -252,7 +252,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -302,7 +302,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersCreateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -682,7 +682,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersDelete(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -726,7 +726,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -965,7 +965,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersGet(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1008,7 +1008,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1062,7 +1062,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1119,7 +1119,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersGetWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1306,7 +1306,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersListByEdgeAction(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1348,7 +1348,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersListByEdgeActionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1400,7 +1400,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersListByEdgeActionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1454,7 +1454,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersListByEdgeActionWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1641,7 +1641,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersUpdate(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1690,7 +1690,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1750,7 +1750,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1814,7 +1814,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersUpdateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1863,7 +1863,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1913,7 +1913,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionExecutionFiltersUpdateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string executionFilter, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2296,7 +2296,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsCreate(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2345,7 +2345,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2405,7 +2405,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2469,7 +2469,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsCreateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2518,7 +2518,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2568,7 +2568,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsCreateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2946,7 +2946,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDelete(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2990,7 +2990,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3231,7 +3231,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeployVersionCode(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3281,7 +3281,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeployVersionCodeViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3342,7 +3342,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeployVersionCodeViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3407,7 +3407,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeployVersionCodeViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3457,7 +3457,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeployVersionCodeViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3508,7 +3508,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsDeployVersionCodeWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3892,7 +3892,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGet(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3938,7 +3938,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetVersionCode(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3982,7 +3982,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetVersionCodeViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4037,7 +4037,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetVersionCodeViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4095,7 +4095,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetVersionCodeWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4467,7 +4467,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4521,7 +4521,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4578,7 +4578,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsGetWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4763,7 +4763,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsListByEdgeAction(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4805,7 +4805,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsListByEdgeActionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4857,7 +4857,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsListByEdgeActionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4911,7 +4911,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsListByEdgeActionWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5095,7 +5095,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsSwapDefault(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5140,7 +5140,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsSwapDefaultViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5382,7 +5382,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsUpdate(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5431,7 +5431,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5491,7 +5491,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5555,7 +5555,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5604,7 +5604,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5654,7 +5654,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionVersionsUpdateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, string version, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6018,11 +6018,11 @@ public partial class EdgeAction } } - /// A long-running resource action. + /// create a EdgeAction /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Edge Action - /// The content of the action request + /// Resource create parameters. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -6032,9 +6032,9 @@ public partial class EdgeAction /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsAddAttachment(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task EdgeActionsCreate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6046,7 +6046,6 @@ public partial class EdgeAction + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Cdn/edgeActions/" + global::System.Uri.EscapeDataString(edgeActionName) - + "/addAttachment" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6055,7 +6054,7 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6064,13 +6063,13 @@ public partial class EdgeAction request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EdgeActionsAddAttachment_Call (request, onOk,onDefault,eventListener,sender); + await this.EdgeActionsCreate_Call (request, onOk,onDefault,eventListener,sender); } } - /// A long-running resource action. + /// create a EdgeAction /// - /// The content of the action request + /// Resource create parameters. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -6080,9 +6079,9 @@ public partial class EdgeAction /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsAddAttachmentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task EdgeActionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6106,7 +6105,6 @@ public partial class EdgeAction + resourceGroupName + "/providers/Microsoft.Cdn/edgeActions/" + edgeActionName - + "/addAttachment" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6115,7 +6113,7 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6124,23 +6122,23 @@ public partial class EdgeAction request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EdgeActionsAddAttachment_Call (request, onOk,onDefault,eventListener,sender); + await this.EdgeActionsCreate_Call (request, onOk,onDefault,eventListener,sender); } } - /// A long-running resource action. + /// create a EdgeAction /// - /// The content of the action request + /// Resource create parameters. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsAddAttachmentViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task EdgeActionsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6164,7 +6162,6 @@ public partial class EdgeAction + resourceGroupName + "/providers/Microsoft.Cdn/edgeActions/" + edgeActionName - + "/addAttachment" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6173,7 +6170,7 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -6182,15 +6179,15 @@ public partial class EdgeAction request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.EdgeActionsAddAttachmentWithResult_Call (request, eventListener,sender); + return await this.EdgeActionsCreateWithResult_Call (request, eventListener,sender); } } - /// A long-running resource action. + /// create a EdgeAction /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Edge Action - /// Json string supplied to the EdgeActionsAddAttachment operation + /// Json string supplied to the EdgeActionsCreate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -6199,9 +6196,9 @@ public partial class EdgeAction /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsAddAttachmentViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EdgeActionsCreateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6213,7 +6210,6 @@ public partial class EdgeAction + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Cdn/edgeActions/" + global::System.Uri.EscapeDataString(edgeActionName) - + "/addAttachment" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6222,7 +6218,7 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6231,24 +6227,24 @@ public partial class EdgeAction request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EdgeActionsAddAttachment_Call (request, onOk,onDefault,eventListener,sender); + await this.EdgeActionsCreate_Call (request, onOk,onDefault,eventListener,sender); } } - /// A long-running resource action. + /// create a EdgeAction /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Edge Action - /// Json string supplied to the EdgeActionsAddAttachment operation + /// Json string supplied to the EdgeActionsCreate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsAddAttachmentViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EdgeActionsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6260,7 +6256,6 @@ public partial class EdgeAction + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Cdn/edgeActions/" + global::System.Uri.EscapeDataString(edgeActionName) - + "/addAttachment" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6269,7 +6264,7 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -6278,25 +6273,25 @@ public partial class EdgeAction request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.EdgeActionsAddAttachmentWithResult_Call (request, eventListener,sender); + return await this.EdgeActionsCreateWithResult_Call (request, eventListener,sender); } } - /// A long-running resource action. + /// create a EdgeAction /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Edge Action - /// The content of the action request + /// Resource create parameters. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsAddAttachmentWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task EdgeActionsCreateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6308,7 +6303,6 @@ public partial class EdgeAction + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.Cdn/edgeActions/" + global::System.Uri.EscapeDataString(edgeActionName) - + "/addAttachment" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6317,7 +6311,7 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -6326,19 +6320,19 @@ public partial class EdgeAction request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.EdgeActionsAddAttachmentWithResult_Call (request, eventListener,sender); + return await this.EdgeActionsCreateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EdgeActionsAddAttachmentWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EdgeActionsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6352,8 +6346,7 @@ public partial class EdgeAction await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); + // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); var operationLocation = _response.GetFirstHeader(@"Operation-Location"); @@ -6432,7 +6425,7 @@ public partial class EdgeAction } // we are done polling, do a request on final target? // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -6450,7 +6443,7 @@ public partial class EdgeAction case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachmentResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -6483,7 +6476,7 @@ public partial class EdgeAction } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -6493,7 +6486,7 @@ public partial class EdgeAction /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EdgeActionsAddAttachment_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EdgeActionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6507,8 +6500,7 @@ public partial class EdgeAction await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); + // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); var operationLocation = _response.GetFirstHeader(@"Operation-Location"); @@ -6587,7 +6579,7 @@ public partial class EdgeAction } // we are done polling, do a request on final target? // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -6605,7 +6597,7 @@ public partial class EdgeAction case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachmentResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -6627,18 +6619,18 @@ public partial class EdgeAction } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Edge Action - /// The content of the action request + /// Resource create parameters. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EdgeActionsAddAttachment_Validate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EdgeActionsCreate_Validate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6655,176 +6647,11 @@ public partial class EdgeAction } } - /// create a EdgeAction - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// Resource create parameters. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsCreate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Cdn/edgeActions/" - + global::System.Uri.EscapeDataString(edgeActionName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EdgeActionsCreate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// create a EdgeAction - /// - /// Resource create parameters. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/edgeActions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var edgeActionName = _match.Groups["edgeActionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Cdn/edgeActions/" - + edgeActionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EdgeActionsCreate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// create a EdgeAction - /// - /// Resource create parameters. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A - /// that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/edgeActions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var edgeActionName = _match.Groups["edgeActionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Cdn/edgeActions/" - + edgeActionName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.EdgeActionsCreateWithResult_Call (request, eventListener,sender); - } - } - - /// create a EdgeAction + /// Delete a EdgeAction /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Edge Action - /// Json string supplied to the EdgeActionsCreate operation + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -6833,9 +6660,9 @@ public partial class EdgeAction /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EdgeActionsCreateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EdgeActionsDelete(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6855,817 +6682,12 @@ public partial class EdgeAction // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EdgeActionsCreate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// create a EdgeAction - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// Json string supplied to the EdgeActionsCreate operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A - /// that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Cdn/edgeActions/" - + global::System.Uri.EscapeDataString(edgeActionName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.EdgeActionsCreateWithResult_Call (request, eventListener,sender); - } - } - - /// create a EdgeAction - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// Resource create parameters. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A - /// that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsCreateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Cdn/edgeActions/" - + global::System.Uri.EscapeDataString(edgeActionName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.EdgeActionsCreateWithResult_Call (request, eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A - /// that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task EdgeActionsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - break; - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) ); - return await _result; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) ); - // Error Response : default - var code = (await _result)?.Code; - var message = (await _result)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(_response, await _result); - throw ex; - } - else - { - throw new global::System.Exception($"[{code}] : {message}"); - } - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task EdgeActionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// Resource create parameters. - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task EdgeActionsCreate_Validate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(edgeActionName),edgeActionName); - await eventListener.AssertMaximumLength(nameof(edgeActionName),edgeActionName,50); - await eventListener.AssertRegEx(nameof(edgeActionName), edgeActionName, @"[a-zA-Z0-9]+"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Delete a EdgeAction - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsDelete(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Cdn/edgeActions/" - + global::System.Uri.EscapeDataString(edgeActionName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EdgeActionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); - } - } - - /// A long-running resource action. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// The content of the action request - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsDeleteAttachment(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Cdn/edgeActions/" - + global::System.Uri.EscapeDataString(edgeActionName) - + "/deleteAttachment" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EdgeActionsDeleteAttachment_Call (request, onNoContent,onOk,onDefault,eventListener,sender); - } - } - - /// A long-running resource action. - /// - /// The content of the action request - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsDeleteAttachmentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/edgeActions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var edgeActionName = _match.Groups["edgeActionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.Cdn/edgeActions/" - + edgeActionName - + "/deleteAttachment" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EdgeActionsDeleteAttachment_Call (request, onNoContent,onOk,onDefault,eventListener,sender); - } - } - - /// A long-running resource action. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// Json string supplied to the EdgeActionsDeleteAttachment operation - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task EdgeActionsDeleteAttachmentViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) - { - var apiVersion = @"2025-09-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.Cdn/edgeActions/" - + global::System.Uri.EscapeDataString(edgeActionName) - + "/deleteAttachment" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EdgeActionsDeleteAttachment_Call (request, onNoContent,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task EdgeActionsDeleteAttachment_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the Edge Action - /// The content of the action request - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task EdgeActionsDeleteAttachment_Validate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(edgeActionName),edgeActionName); - await eventListener.AssertMaximumLength(nameof(edgeActionName),edgeActionName,50); - await eventListener.AssertRegEx(nameof(edgeActionName), edgeActionName, @"[a-zA-Z0-9]+"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await this.EdgeActionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } @@ -7682,7 +6704,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7913,7 +6935,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsGet(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7954,7 +6976,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8005,7 +7027,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8058,7 +7080,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsGetWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8236,7 +7258,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8276,7 +7298,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8325,7 +7347,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8375,7 +7397,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8549,7 +7571,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8587,7 +7609,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8633,7 +7655,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8679,7 +7701,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8851,7 +7873,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsUpdate(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8898,7 +7920,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8955,7 +7977,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9015,7 +8037,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9061,7 +8083,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9108,7 +8130,7 @@ public partial class EdgeAction /// public async global::System.Threading.Tasks.Task EdgeActionsUpdateWithResult(string subscriptionId, string resourceGroupName, string edgeActionName, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-09-01-preview"; + var apiVersion = @"2025-12-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.PowerShell.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.PowerShell.cs deleted file mode 100644 index b495d3d93747..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.PowerShell.cs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - - /// Edge action attachment response - [System.ComponentModel.TypeConverter(typeof(EdgeActionAttachmentResponseTypeConverter))] - public partial class EdgeActionAttachmentResponse - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EdgeActionAttachmentResponse(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EdgeActionAttachmentResponse(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EdgeActionAttachmentResponse(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("EdgeActionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponseInternal)this).EdgeActionId = (string) content.GetValueForProperty("EdgeActionId",((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponseInternal)this).EdgeActionId, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EdgeActionAttachmentResponse(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("EdgeActionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponseInternal)this).EdgeActionId = (string) content.GetValueForProperty("EdgeActionId",((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponseInternal)this).EdgeActionId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Edge action attachment response - [System.ComponentModel.TypeConverter(typeof(EdgeActionAttachmentResponseTypeConverter))] - public partial interface IEdgeActionAttachmentResponse - - { - - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.TypeConverter.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.TypeConverter.cs deleted file mode 100644 index e25a0327e798..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.TypeConverter.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EdgeActionAttachmentResponseTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EdgeActionAttachmentResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EdgeActionAttachmentResponse.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EdgeActionAttachmentResponse.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.cs deleted file mode 100644 index 54656c235bc7..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - - /// Edge action attachment response - public partial class EdgeActionAttachmentResponse : - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponseInternal - { - - /// Backing field for property. - private string _edgeActionId; - - /// Non changing guid to identity edge action - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Origin(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.PropertyOrigin.Owned)] - public string EdgeActionId { get => this._edgeActionId; set => this._edgeActionId = value; } - - /// Creates an new instance. - public EdgeActionAttachmentResponse() - { - - } - } - /// Edge action attachment response - public partial interface IEdgeActionAttachmentResponse : - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IJsonSerializable - { - /// Non changing guid to identity edge action - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Non changing guid to identity edge action", - SerializedName = @"edgeActionId", - PossibleTypes = new [] { typeof(string) })] - string EdgeActionId { get; set; } - - } - /// Edge action attachment response - internal partial interface IEdgeActionAttachmentResponseInternal - - { - /// Non changing guid to identity edge action - string EdgeActionId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.json.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.json.cs deleted file mode 100644 index fe8c509bd9c8..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/api/Models/EdgeActionAttachmentResponse.json.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - - /// Edge action attachment response - public partial class EdgeActionAttachmentResponse - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject instance to deserialize from. - internal EdgeActionAttachmentResponse(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_edgeActionId = If( json?.PropertyT("edgeActionId"), out var __jsonEdgeActionId) ? (string)__jsonEdgeActionId : (string)_edgeActionId;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject json ? new EdgeActionAttachmentResponse(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._edgeActionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Json.JsonString(this._edgeActionId.ToString()) : null, "edgeActionId" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_Add.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_Add.cs deleted file mode 100644 index 822d5a2191e6..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_Add.cs +++ /dev/null @@ -1,573 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] AddAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzEdgeActionAttachment_Add", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment", ApiVersion = "2025-09-01-preview")] - public partial class AddAzEdgeActionAttachment_Add : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body; - - /// Edge action attachment information - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Edge action attachment information", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Edge action attachment information", - SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment Body { get => this._body; set => this._body = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// Initializes a new instance of the cmdlet class. - /// - public AddAzEdgeActionAttachment_Add() - { - - } - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of AddAzEdgeActionAttachment_Add - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.AddAzEdgeActionAttachment_Add Clone() - { - var clone = new AddAzEdgeActionAttachment_Add(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - clone.Body = this.Body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsAddAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsAddAttachment(SubscriptionId, ResourceGroupName, EdgeActionName, Body, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - var result = (await response); - WriteObject(result, false); - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddExpanded.cs deleted file mode 100644 index 452e824b777a..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddExpanded.cs +++ /dev/null @@ -1,573 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] AddAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzEdgeActionAttachment_AddExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment", ApiVersion = "2025-09-01-preview")] - public partial class AddAzEdgeActionAttachment_AddExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// Edge action attachment information - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachment(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// The attached resource Id - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The attached resource Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The attached resource Id", - SerializedName = @"attachedResourceId", - PossibleTypes = new [] { typeof(string) })] - public string AttachedResourceId { get => _body.AttachedResourceId ?? null; set => _body.AttachedResourceId = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// Initializes a new instance of the cmdlet class. - /// - public AddAzEdgeActionAttachment_AddExpanded() - { - - } - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of AddAzEdgeActionAttachment_AddExpanded - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.AddAzEdgeActionAttachment_AddExpanded Clone() - { - var clone = new AddAzEdgeActionAttachment_AddExpanded(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._body = this._body; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsAddAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsAddAttachment(SubscriptionId, ResourceGroupName, EdgeActionName, _body, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - var result = (await response); - WriteObject(result, false); - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaIdentity.cs deleted file mode 100644 index c671df7380b9..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaIdentity.cs +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] AddAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzEdgeActionAttachment_AddViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment", ApiVersion = "2025-09-01-preview")] - public partial class AddAzEdgeActionAttachment_AddViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body; - - /// Edge action attachment information - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Edge action attachment information", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Edge action attachment information", - SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment Body { get => this._body; set => this._body = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// Initializes a new instance of the cmdlet class. - /// - public AddAzEdgeActionAttachment_AddViaIdentity() - { - - } - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of AddAzEdgeActionAttachment_AddViaIdentity - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.AddAzEdgeActionAttachment_AddViaIdentity Clone() - { - var clone = new AddAzEdgeActionAttachment_AddViaIdentity(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.Body = this.Body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsAddAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.EdgeActionsAddAttachmentViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.EdgeActionName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EdgeActionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EdgeActionsAddAttachment(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.EdgeActionName ?? null, Body, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - var result = (await response); - WriteObject(result, false); - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaIdentityExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaIdentityExpanded.cs deleted file mode 100644 index fbb54a67e6ba..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaIdentityExpanded.cs +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] AddAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzEdgeActionAttachment_AddViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment", ApiVersion = "2025-09-01-preview")] - public partial class AddAzEdgeActionAttachment_AddViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// Edge action attachment information - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachment(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// The attached resource Id - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The attached resource Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The attached resource Id", - SerializedName = @"attachedResourceId", - PossibleTypes = new [] { typeof(string) })] - public string AttachedResourceId { get => _body.AttachedResourceId ?? null; set => _body.AttachedResourceId = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// Initializes a new instance of the cmdlet class. - /// - public AddAzEdgeActionAttachment_AddViaIdentityExpanded() - { - - } - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of AddAzEdgeActionAttachment_AddViaIdentityExpanded - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.AddAzEdgeActionAttachment_AddViaIdentityExpanded Clone() - { - var clone = new AddAzEdgeActionAttachment_AddViaIdentityExpanded(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._body = this._body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsAddAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.EdgeActionsAddAttachmentViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.EdgeActionName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EdgeActionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EdgeActionsAddAttachment(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.EdgeActionName ?? null, _body, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - var result = (await response); - WriteObject(result, false); - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaJsonFilePath.cs deleted file mode 100644 index 38749ede7cb6..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaJsonFilePath.cs +++ /dev/null @@ -1,575 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] AddAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzEdgeActionAttachment_AddViaJsonFilePath", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment", ApiVersion = "2025-09-01-preview")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] - public partial class AddAzEdgeActionAttachment_AddViaJsonFilePath : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - public global::System.String _jsonString; - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonFilePath; - - /// Path of Json file supplied to the Add operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Add operation")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Path of Json file supplied to the Add operation", - SerializedName = @"JsonFilePath", - PossibleTypes = new [] { typeof(string) })] - public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// Initializes a new instance of the cmdlet class. - /// - public AddAzEdgeActionAttachment_AddViaJsonFilePath() - { - - } - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of AddAzEdgeActionAttachment_AddViaJsonFilePath - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.AddAzEdgeActionAttachment_AddViaJsonFilePath Clone() - { - var clone = new AddAzEdgeActionAttachment_AddViaJsonFilePath(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - clone.JsonFilePath = this.JsonFilePath; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsAddAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsAddAttachmentViaJsonString(SubscriptionId, ResourceGroupName, EdgeActionName, _jsonString, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - var result = (await response); - WriteObject(result, false); - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaJsonString.cs deleted file mode 100644 index 5f192f871a99..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/AddAzEdgeActionAttachment_AddViaJsonString.cs +++ /dev/null @@ -1,573 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] AddAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzEdgeActionAttachment_AddViaJsonString", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/addAttachment", ApiVersion = "2025-09-01-preview")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] - public partial class AddAzEdgeActionAttachment_AddViaJsonString : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonString; - - /// Json string supplied to the Add operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Add operation")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Json string supplied to the Add operation", - SerializedName = @"JsonString", - PossibleTypes = new [] { typeof(string) })] - public string JsonString { get => this._jsonString; set => this._jsonString = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// Initializes a new instance of the cmdlet class. - /// - public AddAzEdgeActionAttachment_AddViaJsonString() - { - - } - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of AddAzEdgeActionAttachment_AddViaJsonString - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.AddAzEdgeActionAttachment_AddViaJsonString Clone() - { - var clone = new AddAzEdgeActionAttachment_AddViaJsonString(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - clone.JsonString = this.JsonString; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsAddAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsAddAttachmentViaJsonString(SubscriptionId, ResourceGroupName, EdgeActionName, _jsonString, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachmentResponse - var result = (await response); - WriteObject(result, false); - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_Deploy.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_Deploy.cs index a5f91206487c..9cdd0cb40c42 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_Deploy.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_Deploy.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] public partial class DeployAzEdgeActionVersionCode_Deploy : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployExpanded.cs index de14b38e33ea..83a7728a1657 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] public partial class DeployAzEdgeActionVersionCode_DeployExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentity.cs index 6dd79be32019..914d68805313 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] public partial class DeployAzEdgeActionVersionCode_DeployViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeAction.cs index 7e080b5aea2e..de6e5108aa2b 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeAction.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] public partial class DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeActionExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeActionExpanded.cs index 4b0dd23ed4db..5581a8464a33 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeActionExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeActionExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] public partial class DeployAzEdgeActionVersionCode_DeployViaIdentityEdgeActionExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityExpanded.cs index 5410ff3945c4..3de0daab16cb 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] public partial class DeployAzEdgeActionVersionCode_DeployViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonFilePath.cs index aac2b25819f5..64ce33bc0917 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonFilePath.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class DeployAzEdgeActionVersionCode_DeployViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonString.cs index 21fc00a31d76..77e097a98486 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/DeployAzEdgeActionVersionCode_DeployViaJsonString.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersionProperties))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/deployVersionCode", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class DeployAzEdgeActionVersionCode_DeployViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_Get.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_Get.cs index f04f0fdbf972..d57b88dcd537 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_Get.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionExecutionFilter_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentity.cs index 7d4cddb2a375..b35b334a0494 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionExecutionFilter_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentityEdgeAction.cs index 7a1016a88f2a..862429166b28 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_GetViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionExecutionFilter_GetViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_List.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_List.cs index a911ca089211..43495128297e 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_List.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionExecutionFilter_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"List EdgeActionExecutionFilter resources by EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionExecutionFilter_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_Get.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_Get.cs index 06c72bde9185..20e4de5d311a 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_Get.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_Get.cs @@ -14,11 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets /// /// [OpenAPI] GetVersionCode=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeActionVersionCode_Get", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersionCode_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentity.cs index e207b306b2d5..69860679374b 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentity.cs @@ -14,11 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets /// /// [OpenAPI] GetVersionCode=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeActionVersionCode_GetViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersionCode_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentityEdgeAction.cs index 979628f1a3cc..37489b4b5cc9 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersionCode_GetViaIdentityEdgeAction.cs @@ -14,11 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets /// /// [OpenAPI] GetVersionCode=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzEdgeActionVersionCode_GetViaIdentityEdgeAction", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/getVersionCode", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersionCode_GetViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_Get.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_Get.cs index 7ee57efb6743..949af9bb26ff 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_Get.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersion_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentity.cs index 73f02f7f05e0..b21f31b1103e 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentityEdgeAction.cs index 75311dc4783f..2851cccd326a 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_GetViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersion_GetViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_List.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_List.cs index eac295833b8f..8fbc7603cdaa 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_List.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeActionVersion_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"List EdgeActionVersion resources by EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeActionVersion_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_Get.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_Get.cs index 81dc911fc54b..b1ad4c406845 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_Get.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeAction_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_GetViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_GetViaIdentity.cs index 06c62ec26c59..0fc7f8357be0 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_GetViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Get a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeAction_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List.cs index 83892d69a3dd..e96894be213c 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"List EdgeAction resources by subscription ID")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/edgeActions", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/edgeActions", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeAction_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List1.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List1.cs index b48e2cc0d61e..8c9ab5e8f427 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List1.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/GetAzEdgeAction_List1.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"List EdgeAction resources by resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions", ApiVersion = "2025-12-01-preview")] public partial class GetAzEdgeAction_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateExpanded.cs index c9429d5ba6d5..e4e8b82d4989 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeActionExecutionFilter_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeAction.cs index 035ae0768969..94255127ebbb 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeActionExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeActionExpanded.cs index 36c3a9aedf43..c707f6c6a787 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeActionExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeActionExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeActionExecutionFilter_CreateViaIdentityEdgeActionExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonFilePath.cs index 22dbc46fc72b..8b21b1b40ec3 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class NewAzEdgeActionExecutionFilter_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonString.cs index efc290c06926..469e578b4059 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionExecutionFilter_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class NewAzEdgeActionExecutionFilter_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateExpanded.cs index 5a1d4d49a323..4fcb3182c386 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeActionVersion_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeAction.cs index 9271f740a9e0..891c3fd93551 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeActionVersion_CreateViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeActionExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeActionExpanded.cs index 7c162dd9c3bd..2f340eb67e2d 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeActionExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaIdentityEdgeActionExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeActionVersion_CreateViaIdentityEdgeActionExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonFilePath.cs index fc33021c4e80..5a5f05eead78 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class NewAzEdgeActionVersion_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonString.cs index e8374088f8b2..646bf851df28 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeActionVersion_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class NewAzEdgeActionVersion_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateExpanded.cs index 38294da27507..a3405f5fbaf9 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class NewAzEdgeAction_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonFilePath.cs index c3ea88684577..c03a86fa9725 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class NewAzEdgeAction_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonString.cs index 0f90f4414ce3..7b30ff1863db 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/NewAzEdgeAction_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"create a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class NewAzEdgeAction_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_Delete.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_Delete.cs deleted file mode 100644 index d3ab8092b40d..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_Delete.cs +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] DeleteAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEdgeActionAttachment_Delete", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment", ApiVersion = "2025-09-01-preview")] - public partial class RemoveAzEdgeActionAttachment_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body; - - /// Edge action attachment information - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Edge action attachment information", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Edge action attachment information", - SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment Body { get => this._body; set => this._body = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzEdgeActionAttachment_Delete - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.RemoveAzEdgeActionAttachment_Delete Clone() - { - var clone = new RemoveAzEdgeActionAttachment_Delete(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - clone.Body = this.Body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsDeleteAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsDeleteAttachment(SubscriptionId, ResourceGroupName, EdgeActionName, Body, onNoContent, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public RemoveAzEdgeActionAttachment_Delete() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteExpanded.cs deleted file mode 100644 index c31041f2ae4a..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteExpanded.cs +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] DeleteAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEdgeActionAttachment_DeleteExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment", ApiVersion = "2025-09-01-preview")] - public partial class RemoveAzEdgeActionAttachment_DeleteExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// Edge action attachment information - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachment(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// The attached resource Id - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The attached resource Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The attached resource Id", - SerializedName = @"attachedResourceId", - PossibleTypes = new [] { typeof(string) })] - public string AttachedResourceId { get => _body.AttachedResourceId ?? null; set => _body.AttachedResourceId = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzEdgeActionAttachment_DeleteExpanded - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.RemoveAzEdgeActionAttachment_DeleteExpanded Clone() - { - var clone = new RemoveAzEdgeActionAttachment_DeleteExpanded(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._body = this._body; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsDeleteAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsDeleteAttachment(SubscriptionId, ResourceGroupName, EdgeActionName, _body, onNoContent, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public RemoveAzEdgeActionAttachment_DeleteExpanded() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaIdentity.cs deleted file mode 100644 index a4bda2275124..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaIdentity.cs +++ /dev/null @@ -1,589 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] DeleteAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEdgeActionAttachment_DeleteViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment", ApiVersion = "2025-09-01-preview")] - public partial class RemoveAzEdgeActionAttachment_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body; - - /// Edge action attachment information - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Edge action attachment information", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Edge action attachment information", - SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment Body { get => this._body; set => this._body = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzEdgeActionAttachment_DeleteViaIdentity - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.RemoveAzEdgeActionAttachment_DeleteViaIdentity Clone() - { - var clone = new RemoveAzEdgeActionAttachment_DeleteViaIdentity(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.Body = this.Body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsDeleteAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.EdgeActionsDeleteAttachmentViaIdentity(InputObject.Id, Body, onNoContent, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.EdgeActionName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EdgeActionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EdgeActionsDeleteAttachment(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.EdgeActionName ?? null, Body, onNoContent, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public RemoveAzEdgeActionAttachment_DeleteViaIdentity() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded.cs deleted file mode 100644 index 3cf1e4d7ce73..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded.cs +++ /dev/null @@ -1,589 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] DeleteAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEdgeActionAttachment_DeleteViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment", ApiVersion = "2025-09-01-preview")] - public partial class RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// Edge action attachment information - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionAttachment _body = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.EdgeActionAttachment(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// The attached resource Id - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The attached resource Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The attached resource Id", - SerializedName = @"attachedResourceId", - PossibleTypes = new [] { typeof(string) })] - public string AttachedResourceId { get => _body.AttachedResourceId ?? null; set => _body.AttachedResourceId = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded Clone() - { - var clone = new RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone._body = this._body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsDeleteAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.EdgeActionsDeleteAttachmentViaIdentity(InputObject.Id, _body, onNoContent, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.EdgeActionName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EdgeActionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.EdgeActionsDeleteAttachment(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.EdgeActionName ?? null, _body, onNoContent, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public RemoveAzEdgeActionAttachment_DeleteViaIdentityExpanded() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath.cs deleted file mode 100644 index 5578af8853ee..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath.cs +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] DeleteAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEdgeActionAttachment_DeleteViaJsonFilePath", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment", ApiVersion = "2025-09-01-preview")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] - public partial class RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - public global::System.String _jsonString; - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonFilePath; - - /// Path of Json file supplied to the Delete operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Delete operation")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Path of Json file supplied to the Delete operation", - SerializedName = @"JsonFilePath", - PossibleTypes = new [] { typeof(string) })] - public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath Clone() - { - var clone = new RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - clone.JsonFilePath = this.JsonFilePath; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsDeleteAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsDeleteAttachmentViaJsonString(SubscriptionId, ResourceGroupName, EdgeActionName, _jsonString, onNoContent, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public RemoveAzEdgeActionAttachment_DeleteViaJsonFilePath() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaJsonString.cs deleted file mode 100644 index 5dd615787eef..000000000000 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionAttachment_DeleteViaJsonString.cs +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Cmdlets; - using System; - - /// A long-running resource action. - /// - /// [OpenAPI] DeleteAttachment=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzEdgeActionAttachment_DeleteViaJsonString", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/deleteAttachment", ApiVersion = "2025-09-01-preview")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] - public partial class RemoveAzEdgeActionAttachment_DeleteViaJsonString : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter AsJob { get; set; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.EdgeAction Client => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Backing field for property. - private string _edgeActionName; - - /// The name of the Edge Action - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Edge Action")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Edge Action", - SerializedName = @"edgeActionName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string EdgeActionName { get => this._edgeActionName; set => this._edgeActionName = value; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonString; - - /// Json string supplied to the Delete operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Delete operation")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Json string supplied to the Delete operation", - SerializedName = @"JsonString", - PossibleTypes = new [] { typeof(string) })] - public string JsonString { get => this._jsonString; set => this._jsonString = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue - /// asynchronously. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. The value must be an UUID. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription. The value must be an UUID.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category(global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of - /// what happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onNoContent method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzEdgeActionAttachment_DeleteViaJsonString - public Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets.RemoveAzEdgeActionAttachment_DeleteViaJsonString Clone() - { - var clone = new RemoveAzEdgeActionAttachment_DeleteViaJsonString(); - clone.__correlationId = this.__correlationId; - clone.__processRecordId = this.__processRecordId; - clone.DefaultProfile = this.DefaultProfile; - clone.InvocationInformation = this.InvocationInformation; - clone.Proxy = this.Proxy; - clone.Pipeline = this.Pipeline; - clone.AsJob = this.AsJob; - clone.Break = this.Break; - clone.ProxyCredential = this.ProxyCredential; - clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; - clone.HttpPipelinePrepend = this.HttpPipelinePrepend; - clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.EdgeActionName = this.EdgeActionName; - clone.JsonString = this.JsonString; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); - if (telemetryInfo != null) - { - telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); - telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); - telemetryInfo.TryGetValue("InvocationName", out var invocationName); - if (showSecretsWarning == "true") - { - if (string.IsNullOrEmpty(sanitizedProperties)) - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - else - { - WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); - } - } - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.DelayBeforePolling: - { - var data = messageData(); - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = response.GetFirstHeader(@"Location"); - var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; - WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - else - { - if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) - { - int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - WriteDebug($"Delaying {delay} seconds before polling."); - for (var now = 0; now < delay; ++now) - { - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") - { - PercentComplete = now * 100 / delay - }); - await global::System.Threading.Tasks.Task.Delay(1000, token); - } - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'EdgeActionsDeleteAttachment' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); - JobRepository.Add(job); - var task = instance.ProcessRecordAsync(); - job.Monitor(task); - WriteObject(job); - } - else - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token); - } - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EdgeActionsDeleteAttachmentViaJsonString(SubscriptionId, ResourceGroupName, EdgeActionName, _jsonString, onNoContent, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,EdgeActionName=EdgeActionName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public RemoveAzEdgeActionAttachment_DeleteViaJsonString() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 204 (NoContent). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnNoContent(responseMessage, ref _returnNow); - // if overrideOnNoContent has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onNoContent - response for 204 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / - if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_Delete.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_Delete.cs index 07fae3355db8..b998cfe84641 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_Delete.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeActionExecutionFilter_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentity.cs index c5c94bb43dfd..514bde5aae26 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeActionExecutionFilter_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction.cs index aa7e26a532e5..daf51ee1cd5f 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeActionExecutionFilter_DeleteViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_Delete.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_Delete.cs index 3b26046736ac..97167e0e8b30 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_Delete.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeActionVersion_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentity.cs index 519e1e1070e6..ffb8efa4bec6 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeActionVersion_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentityEdgeAction.cs index 99c2b83ac3f0..4877f198b6a8 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeActionVersion_DeleteViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeActionVersion_DeleteViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_Delete.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_Delete.cs index cdbb2987dc63..0bd504983816 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_Delete.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeAction_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_DeleteViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_DeleteViaIdentity.cs index 6383f8c4bfd9..ca909f37c4ab 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_DeleteViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/RemoveAzEdgeAction_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"Delete a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class RemoveAzEdgeAction_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_Swap.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_Swap.cs index 3b0b26e0cd1c..8047562f4cb9 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_Swap.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_Swap.cs @@ -14,11 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets /// /// [OpenAPI] SwapDefault=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Switch, @"AzEdgeActionVersionDefault_Swap", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault", ApiVersion = "2025-12-01-preview")] public partial class SwitchAzEdgeActionVersionDefault_Swap : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentity.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentity.cs index 5cfa7f40acf1..b156e2cd21de 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentity.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentity.cs @@ -14,11 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets /// /// [OpenAPI] SwapDefault=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Switch, @"AzEdgeActionVersionDefault_SwapViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault", ApiVersion = "2025-12-01-preview")] public partial class SwitchAzEdgeActionVersionDefault_SwapViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentityEdgeAction.cs index eded2a826508..1febc335aa1e 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/SwitchAzEdgeActionVersionDefault_SwapViaIdentityEdgeAction.cs @@ -14,11 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets /// /// [OpenAPI] SwapDefault=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Switch, @"AzEdgeActionVersionDefault_SwapViaIdentityEdgeAction", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"A long-running resource action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}/swapDefault", ApiVersion = "2025-12-01-preview")] public partial class SwitchAzEdgeActionVersionDefault_SwapViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateExpanded.cs index ecfa47d41150..28af355b399a 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionExecutionFilter_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction.cs index a68669e49571..5c70f2a23062 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded.cs index eddf460d0af6..77e8f77a0125 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityEdgeActionExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityExpanded.cs index 55791c8773db..819b31ce7e28 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionExecutionFilter_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonFilePath.cs index fd9539a2b04d..51f414eba00b 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class UpdateAzEdgeActionExecutionFilter_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonString.cs index 20ccae3e5e4e..4d20505a861a 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionExecutionFilter_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionExecutionFilter))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionExecutionFilter")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/executionFilters/{executionFilter}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class UpdateAzEdgeActionExecutionFilter_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateExpanded.cs index 217c73483f0f..d011a030bbcb 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionVersion_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeAction.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeAction.cs index 5abdf7aa4322..9babc528db8f 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeAction.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeAction.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeAction : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded.cs index bc4499b0bb61..1b16012267e9 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionVersion_UpdateViaIdentityEdgeActionExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityExpanded.cs index 24d9e010c23f..da3459141bbc 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeActionVersion_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonFilePath.cs index b1e05afdd446..b5f8205a18a3 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class UpdateAzEdgeActionVersion_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonString.cs index 65fcc018b8ad..df4c8a510fa1 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeActionVersion_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeActionVersion")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}/versions/{version}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class UpdateAzEdgeActionVersion_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateExpanded.cs index 0825024e5b93..a3c5f7d801a0 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeAction_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaIdentityExpanded.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaIdentityExpanded.cs index bb0c4db5a33c..5c19df1164ca 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaIdentityExpanded.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] public partial class UpdateAzEdgeAction_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IContext diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonFilePath.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonFilePath.cs index 33bc82e3aa85..85a1818c2f1b 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonFilePath.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class UpdateAzEdgeAction_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonString.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonString.cs index 2ef570e16427..e74867dc98d5 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonString.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/cmdlets/UpdateAzEdgeAction_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Description(@"update a EdgeAction")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-09-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/edgeActions/{edgeActionName}", ApiVersion = "2025-12-01-preview")] [global::Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.NotSuggestDefaultParameterSet] public partial class UpdateAzEdgeAction_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.IEventListener, diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 621947609bad..a383c6c0863e 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -51,7 +51,7 @@ protected override void ProcessRecord() throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); } - string version = Convert.ToString(@"0.1.0"); + string version = Convert.ToString(@"0.1.1"); // Validate the module version should be semantic version // Following regex is official from https://semver.org/ Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); diff --git a/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index acfe32191bea..fcac5d536ad3 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/EdgeAction/EdgeAction.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -218,13 +218,12 @@ public string GetProcessCustomAttributesAtRuntime() private string GetLoginVerification() { - if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) { return $@" {Indent}{Indent}$context = Get-AzContext {Indent}{Indent}if (-not $context -and -not $testPlayback) {{ -{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" -{Indent}{Indent}{Indent}exit +{Indent}{Indent}{Indent}throw ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" {Indent}{Indent}}} "; } diff --git a/generated/EdgeAction/EdgeAction.Autorest/internal/Get-AzEdgeActionVersionCode.ps1 b/generated/EdgeAction/EdgeAction.Autorest/internal/Get-AzEdgeActionVersionCode.ps1 new file mode 100644 index 000000000000..1d2eab0cebe1 --- /dev/null +++ b/generated/EdgeAction/EdgeAction.Autorest/internal/Get-AzEdgeActionVersionCode.ps1 @@ -0,0 +1,214 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +A long-running resource action. +.Description +A long-running resource action. +.Example +Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" +.Example +Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -OutputPath "C:\Downloads" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode +.Notes +COMPLEX PARAMETER PROPERTIES + +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. + +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version + +INPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version +.Link +https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversioncode +#> +function Get-AzEdgeActionVersionCode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action + ${EdgeActionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version + ${Version}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + Get = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_Get'; + GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentity'; + GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentityEdgeAction'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/generated/EdgeAction/EdgeAction.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/EdgeAction/EdgeAction.Autorest/internal/ProxyCmdletDefinitions.ps1 index 74a2e4575f37..123de52a5d1c 100644 --- a/generated/EdgeAction/EdgeAction.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/EdgeAction/EdgeAction.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -278,3 +278,405 @@ end { } } } + +<# +.Synopsis +A long-running resource action. +.Description +A long-running resource action. +.Example +Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" +.Example +Get-AzEdgeActionVersionCode -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v1" -OutputPath "C:\Downloads" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode +.Notes +COMPLEX PARAMETER PROPERTIES + +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. + +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version + +INPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version +.Link +https://learn.microsoft.com/powershell/module/az.edgeaction/get-azedgeactionversioncode +#> +function Get-AzEdgeActionVersionCode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IVersionCode])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action + ${EdgeActionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version + ${Version}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + Get = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_Get'; + GetViaIdentity = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentity'; + GetViaIdentityEdgeAction = 'Az.EdgeAction.private\Get-AzEdgeActionVersionCode_GetViaIdentityEdgeAction'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +A long-running resource action. +.Description +A long-running resource action. +.Example +Switch-AzEdgeActionVersionDefault -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v2" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +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. + +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version + +INPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version +.Link +https://learn.microsoft.com/powershell/module/az.edgeaction/switch-azedgeactionversiondefault +#> +function Switch-AzEdgeActionVersionDefault { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Swap', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Swap', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action + ${EdgeActionName}, + + [Parameter(ParameterSetName='Swap', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Swap')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Swap', Mandatory)] + [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version + ${Version}, + + [Parameter(ParameterSetName='SwapViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + Swap = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_Swap'; + SwapViaIdentity = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentity'; + SwapViaIdentityEdgeAction = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentityEdgeAction'; + } + if (('Swap') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/generated/EdgeAction/EdgeAction.Autorest/internal/Switch-AzEdgeActionVersionDefault.ps1 b/generated/EdgeAction/EdgeAction.Autorest/internal/Switch-AzEdgeActionVersionDefault.ps1 new file mode 100644 index 000000000000..72f91349fe2f --- /dev/null +++ b/generated/EdgeAction/EdgeAction.Autorest/internal/Switch-AzEdgeActionVersionDefault.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +A long-running resource action. +.Description +A long-running resource action. +.Example +Switch-AzEdgeActionVersionDefault -ResourceGroupName "myResourceGroup" -EdgeActionName "myEdgeAction" -Version "v2" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +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. + +EDGEACTIONINPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version + +INPUTOBJECT : Identity Parameter + [EdgeActionName ]: The name of the Edge Action + [ExecutionFilter ]: The name of the execution filter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Version ]: The name of the Edge Action version +.Link +https://learn.microsoft.com/powershell/module/az.edgeaction/switch-azedgeactionversiondefault +#> +function Switch-AzEdgeActionVersionDefault { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Swap', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Swap', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action + ${EdgeActionName}, + + [Parameter(ParameterSetName='Swap', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Swap')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Swap', Mandatory)] + [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [System.String] + # The name of the Edge Action version + ${Version}, + + [Parameter(ParameterSetName='SwapViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='SwapViaIdentityEdgeAction', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Models.IEdgeActionIdentity] + # Identity Parameter + ${EdgeActionInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.EdgeAction.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + Swap = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_Swap'; + SwapViaIdentity = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentity'; + SwapViaIdentityEdgeAction = 'Az.EdgeAction.private\Switch-AzEdgeActionVersionDefault_SwapViaIdentityEdgeAction'; + } + if (('Swap') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +}