Chaos.Autorest/exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # 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 Get a Capability Type resource for given Target Type and location. .Description Get a Capability Type resource for given Target Type and location. .Example Get-AzChaosCapabilityType -LocationName eastus -TargetTypeName microsoft-virtualmachine .Example Get-AzChaosCapabilityType -LocationName eastus -TargetTypeName microsoft-virtualmachine -Name Shutdown-1.0 .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapabilityType .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. LOCATIONINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. TARGETTYPEINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaoscapabilitytype #> function Get-AzChaosCapabilityType { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapabilityType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Location resource name. ${LocationName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityTargetType', Mandatory)] [Alias('CapabilityTypeName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Capability Type resource name. ${Name}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target Type resource name. ${TargetTypeName}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${LocationInputObject}, [Parameter(ParameterSetName='GetViaIdentityTargetType', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${TargetTypeInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Query')] [System.String] # String that sets the continuation token. ${ContinuationToken}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Get-AzChaosCapabilityType_Get'; GetViaIdentity = 'Az.Chaos.private\Get-AzChaosCapabilityType_GetViaIdentity'; GetViaIdentityLocation = 'Az.Chaos.private\Get-AzChaosCapabilityType_GetViaIdentityLocation'; GetViaIdentityTargetType = 'Az.Chaos.private\Get-AzChaosCapabilityType_GetViaIdentityTargetType'; List = 'Az.Chaos.private\Get-AzChaosCapabilityType_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Capability resource that extends a Target resource. .Description Get a Capability resource that extends a Target resource. .Example Get-AzChaosCapability -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -TargetName microsoft-virtualmachine .Example Get-AzChaosCapability -Name Shutdown-1.0 -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -TargetName microsoft-virtualmachine .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapability .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. TARGETINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaoscapability #> function Get-AzChaosCapability { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapability])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityTarget', Mandatory)] [Alias('CapabilityName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Capability resource name. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${TargetName}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityTarget', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${TargetInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Query')] [System.String] # String that sets the continuation token. ${ContinuationToken}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Get-AzChaosCapability_Get'; GetViaIdentity = 'Az.Chaos.private\Get-AzChaosCapability_GetViaIdentity'; GetViaIdentityTarget = 'Az.Chaos.private\Get-AzChaosCapability_GetViaIdentityTarget'; List = 'Az.Chaos.private\Get-AzChaosCapability_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Execution details of an experiment resource. .Description Execution details of an experiment resource. .Example Get-AzChaosExecutionExperimentDetail -ExperimentName experiment-test -ResourceGroupName azps_test_group_chaos -ExecutionId 13E31E28-45F4-402E-99B4-DF19A78E457E .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperimentExecutionDetails .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. EXPERIMENTINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. INPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaosexecutionexperimentdetail #> function Get-AzChaosExecutionExperimentDetail { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperimentExecutionDetails])] [CmdletBinding(DefaultParameterSetName='Execution', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Execution', Mandatory)] [Parameter(ParameterSetName='ExecutionViaIdentityExperiment', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # GUID that represents a Experiment execution detail. ${ExecutionId}, [Parameter(ParameterSetName='Execution', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${ExperimentName}, [Parameter(ParameterSetName='Execution', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Execution')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='ExecutionViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='ExecutionViaIdentityExperiment', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${ExperimentInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ Execution = 'Az.Chaos.private\Get-AzChaosExecutionExperimentDetail_Execution'; ExecutionViaIdentity = 'Az.Chaos.private\Get-AzChaosExecutionExperimentDetail_ExecutionViaIdentity'; ExecutionViaIdentityExperiment = 'Az.Chaos.private\Get-AzChaosExecutionExperimentDetail_ExecutionViaIdentityExperiment'; } if (('Execution') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 an execution of an Experiment resource. .Description Get an execution of an Experiment resource. .Example Get-AzChaosExperimentExecution -ExperimentName experiment-test -ResourceGroupName azps_test_group_chaos .Example Get-AzChaosExperimentExecution -ExperimentName experiment-test -ResourceGroupName azps_test_group_chaos -ExecutionId 13E31E28-45F4-402E-99B4-DF19A78E457E .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperimentExecution .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. EXPERIMENTINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. INPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaosexperimentexecution #> function Get-AzChaosExperimentExecution { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperimentExecution])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityExperiment', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # GUID that represents a Experiment execution detail. ${ExecutionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${ExperimentName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityExperiment', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${ExperimentInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Get-AzChaosExperimentExecution_Get'; GetViaIdentity = 'Az.Chaos.private\Get-AzChaosExperimentExecution_GetViaIdentity'; GetViaIdentityExperiment = 'Az.Chaos.private\Get-AzChaosExperimentExecution_GetViaIdentityExperiment'; List = 'Az.Chaos.private\Get-AzChaosExperimentExecution_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Experiment resource. .Description Get a Experiment resource. .Example Get-AzChaosExperiment .Example Get-AzChaosExperiment -ResourceGroupName azps_test_group_chaos .Example Get-AzChaosExperiment -ResourceGroupName azps_test_group_chaos -Name experiment-test .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaosexperiment #> function Get-AzChaosExperiment { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('ExperimentName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Query')] [System.String] # String that sets the continuation token. ${ContinuationToken}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Query')] [System.Management.Automation.SwitchParameter] # Optional value that indicates whether to filter results based on if the Experiment is currently running. # If null, then the results will not be filtered. ${Running}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Get-AzChaosExperiment_Get'; GetViaIdentity = 'Az.Chaos.private\Get-AzChaosExperiment_GetViaIdentity'; List = 'Az.Chaos.private\Get-AzChaosExperiment_List'; List1 = 'Az.Chaos.private\Get-AzChaosExperiment_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Target Type resources for given location. .Description Get a Target Type resources for given location. .Example Get-AzChaosTargetType -LocationName eastus .Example Get-AzChaosTargetType -LocationName eastus -Name Microsoft-KeyVault .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITargetType .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. LOCATIONINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaostargettype #> function Get-AzChaosTargetType { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITargetType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Location resource name. ${LocationName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Alias('TargetTypeName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target Type resource name. ${Name}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${LocationInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Query')] [System.String] # String that sets the continuation token. ${ContinuationToken}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Get-AzChaosTargetType_Get'; GetViaIdentity = 'Az.Chaos.private\Get-AzChaosTargetType_GetViaIdentity'; GetViaIdentityLocation = 'Az.Chaos.private\Get-AzChaosTargetType_GetViaIdentityLocation'; List = 'Az.Chaos.private\Get-AzChaosTargetType_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Target resource that extends a tracked regional resource. .Description Get a Target resource that extends a tracked regional resource. .Example Get-AzChaosTarget -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos .Example Get-AzChaosTarget -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -Name microsoft-virtualmachine .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITarget .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/get-azchaostarget #> function Get-AzChaosTarget { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITarget])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('TargetName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Query')] [System.String] # String that sets the continuation token. ${ContinuationToken}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Get-AzChaosTarget_Get'; GetViaIdentity = 'Az.Chaos.private\Get-AzChaosTarget_GetViaIdentity'; List = 'Az.Chaos.private\Get-AzChaosTarget_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Capability resource that extends a Target resource. .Description Create a Capability resource that extends a Target resource. .Example New-AzChaosCapability -Name Shutdown-1.0 -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -TargetName microsoft-virtualmachine .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapability .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. TARGETINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/new-azchaoscapability #> function New-AzChaosCapability { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapability])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityTargetExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('CapabilityName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Capability resource name. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${TargetName}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityTargetExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${TargetInputObject}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ CreateExpanded = 'Az.Chaos.private\New-AzChaosCapability_CreateExpanded'; CreateViaIdentityExpanded = 'Az.Chaos.private\New-AzChaosCapability_CreateViaIdentityExpanded'; CreateViaIdentityTargetExpanded = 'Az.Chaos.private\New-AzChaosCapability_CreateViaIdentityTargetExpanded'; CreateViaJsonFilePath = 'Az.Chaos.private\New-AzChaosCapability_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.Chaos.private\New-AzChaosCapability_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Experiment resource. .Description Create a Experiment resource. .Example New-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos -JsonFilePath "C:\Users\abc\Desktop\jsonStr.json" .Example $jsonStr = ' { "location": "eastus", "identity": { "type": "SystemAssigned" }, "properties": { "steps": [ { "name": "step1", "branches": [ { "name": "branch1", "actions": [ { "type": "continuous", "name": "urn:csci:microsoft:virtualMachine:shutdown/1.0", "selectorId": "selector1", "duration": "PT10M", "parameters": [ { "key": "abruptShutdown", "value": "false" } ] } ] } ] } ], "selectors": [ { "type": "List", "id": "selector1", "targets": [ { "type": "ChaosTarget", "id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/azps_test_group_chaos/providers/Microsoft.Compute/virtualMachines/azpstest1/providers/Microsoft.Chaos/targets/microsoft-virtualmachine" } ] } ] } }' New-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos -JsonString $jsonStr .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment .Link https://learn.microsoft.com/powershell/module/az.chaos/new-azchaosexperiment #> function New-AzChaosExperiment { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment])] [CmdletBinding(DefaultParameterSetName='CreateViaJsonFilePath', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('ExperimentName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ CreateViaJsonFilePath = 'Az.Chaos.private\New-AzChaosExperiment_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.Chaos.private\New-AzChaosExperiment_CreateViaJsonString'; } if (('CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Target resource that extends a tracked regional resource. .Description Create a Target resource that extends a tracked regional resource. .Example $property = @{"type"="CertificateSubjectIssuer";"subject"="CN=example.subject"} $propertyArr = @($property) $identities = @{"identities"=$propertyArr} New-AzChaosTarget -Name microsoft-virtualmachine -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -Location eastus -Property $identities .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITarget .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/new-azchaostarget #> function New-AzChaosTarget { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITarget])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('TargetName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Location of the target resource. ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITargetProperties]))] [System.Collections.Hashtable] # The properties of the target resource. ${Property}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ CreateExpanded = 'Az.Chaos.private\New-AzChaosTarget_CreateExpanded'; CreateViaIdentityExpanded = 'Az.Chaos.private\New-AzChaosTarget_CreateViaIdentityExpanded'; CreateViaJsonFilePath = 'Az.Chaos.private\New-AzChaosTarget_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.Chaos.private\New-AzChaosTarget_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Delete a Capability that extends a Target resource. .Description Delete a Capability that extends a Target resource. .Example Remove-AzChaosCapability -Name Shutdown-1.0 -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -TargetName microsoft-virtualmachine .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .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. INPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. TARGETINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/remove-azchaoscapability #> function Remove-AzChaosCapability { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityTarget', Mandatory)] [Alias('CapabilityName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Capability resource name. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${TargetName}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityTarget', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${TargetInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Remove-AzChaosCapability_Delete'; DeleteViaIdentity = 'Az.Chaos.private\Remove-AzChaosCapability_DeleteViaIdentity'; DeleteViaIdentityTarget = 'Az.Chaos.private\Remove-AzChaosCapability_DeleteViaIdentityTarget'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Delete a Experiment resource. .Description Delete a Experiment resource. .Example Remove-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .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. INPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/remove-azchaosexperiment #> function Remove-AzChaosExperiment { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('ExperimentName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Remove-AzChaosExperiment_Delete'; DeleteViaIdentity = 'Az.Chaos.private\Remove-AzChaosExperiment_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Delete a Target resource that extends a tracked regional resource. .Description Delete a Target resource that extends a tracked regional resource. .Example Remove-AzChaosTarget -Name microsoft-virtualmachine -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .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. INPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/remove-azchaostarget #> function Remove-AzChaosTarget { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('TargetName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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.Chaos.private\Remove-AzChaosTarget_Delete'; DeleteViaIdentity = 'Az.Chaos.private\Remove-AzChaosTarget_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Start a Experiment resource. .Description Start a Experiment resource. .Example Start-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/start-azchaosexperiment #> function Start-AzChaosExperiment { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory)] [Alias('ExperimentName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${Name}, [Parameter(ParameterSetName='Start', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Start')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ Start = 'Az.Chaos.private\Start-AzChaosExperiment_Start'; StartViaIdentity = 'Az.Chaos.private\Start-AzChaosExperiment_StartViaIdentity'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Cancel a running Experiment resource. .Description Cancel a running Experiment resource. .Example Stop-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/stop-azchaosexperiment #> function Stop-AzChaosExperiment { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment])] [CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Cancel', Mandatory)] [Alias('ExperimentName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${Name}, [Parameter(ParameterSetName='Cancel', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Cancel')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ Cancel = 'Az.Chaos.private\Stop-AzChaosExperiment_Cancel'; CancelViaIdentity = 'Az.Chaos.private\Stop-AzChaosExperiment_CancelViaIdentity'; } if (('Cancel') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Update a Capability resource that extends a Target resource. .Description Update a Capability resource that extends a Target resource. .Example Update-AzChaosCapability -Name Shutdown-1.0 -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -TargetName microsoft-virtualmachine .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapability .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. TARGETINPUTOBJECT <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/update-azchaoscapability #> function Update-AzChaosCapability { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ICapability])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityTargetExpanded', Mandatory)] [Alias('CapabilityName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Capability resource name. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${TargetName}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityTargetExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${TargetInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ UpdateExpanded = 'Az.Chaos.private\Update-AzChaosCapability_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Chaos.private\Update-AzChaosCapability_UpdateViaIdentityExpanded'; UpdateViaIdentityTargetExpanded = 'Az.Chaos.private\Update-AzChaosCapability_UpdateViaIdentityTargetExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Update a Experiment resource. .Description Update a Experiment resource. .Example Update-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos -Location eastus -Tag @{"a"="1"} .Example Update-AzChaosExperiment -Name experiment-test -ResourceGroupName azps_test_group_chaos -Location eastus -UserAssignedIdentity "/subscriptions/{subId}/resourcegroups/azps_test_group_chaos/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami" -EnableSystemAssignedIdentity:$false .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. SELECTOR <ISelector[]>: List of selectors. Id <String>: String of the selector ID. Type <String>: Enum of the selector type. STEP <IStep[]>: List of steps. Branch <List<IBranch>>: List of branches. Action <List<IAction>>: List of actions. Name <String>: String that represents a Capability URN. Type <String>: Enum that discriminates between action models. Name <String>: String of the branch name. Name <String>: String of the step name. .Link https://learn.microsoft.com/powershell/module/az.chaos/update-azchaosexperiment #> function Update-AzChaosExperiment { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IExperiment])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('ExperimentName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Experiment resource name. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.Nullable[System.Boolean]] # Decides if enable a system assigned identity for the resource. ${EnableSystemAssignedIdentity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ISelector[]] # List of selectors. ${Selector}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IStep[]] # List of steps. ${Step}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String[]] # The array of user assigned identities associated with the resource. # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ UpdateExpanded = 'Az.Chaos.private\Update-AzChaosExperiment_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Chaos.private\Update-AzChaosExperiment_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 Update a Target resource that extends a tracked regional resource. .Description Update a Target resource that extends a tracked regional resource. .Example $property = @{"type"="CertificateSubjectIssuer";"subject"="CN=example.subject"} $propertyArr = @($property) $identities = @{"identities"=$propertyArr} Update-AzChaosTarget -Name microsoft-virtualmachine -ParentProviderNamespace Microsoft.Compute -ParentResourceName exampleVM -ParentResourceType virtualMachines -ResourceGroupName azps_test_group_chaos -Location eastus -Property $identities .Inputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITarget .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 <IChaosIdentity>: Identity Parameter [AsyncOperationId <String>]: The operation Id. [CapabilityName <String>]: String that represents a Capability resource name. [CapabilityTypeName <String>]: String that represents a Capability Type resource name. [ExecutionId <String>]: GUID that represents a Experiment execution detail. [ExperimentName <String>]: String that represents a Experiment resource name. [Id <String>]: Resource identity path [Location <String>]: The name of the Azure region. [LocationName <String>]: String that represents a Location resource name. [ParentProviderNamespace <String>]: String that represents a resource provider namespace. [ParentResourceName <String>]: String that represents a resource name. [ParentResourceType <String>]: String that represents a resource type. [ResourceGroupName <String>]: String that represents an Azure resource group. [SubscriptionId <String>]: GUID that represents an Azure subscription ID. [TargetName <String>]: String that represents a Target resource name. [TargetTypeName <String>]: String that represents a Target Type resource name. .Link https://learn.microsoft.com/powershell/module/az.chaos/update-azchaostarget #> function Update-AzChaosTarget { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITarget])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('TargetName')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a Target resource name. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource provider namespace. ${ParentProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource name. ${ParentResourceName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents a resource type. ${ParentResourceType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [System.String] # String that represents an Azure resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # GUID that represents an Azure subscription ID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IChaosIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Location of the target resource. ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.ITargetProperties]))] [System.Collections.Hashtable] # The properties of the target resource. ${Property}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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 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.Chaos.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 = @{ UpdateExpanded = 'Az.Chaos.private\Update-AzChaosTarget_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.Chaos.private\Update-AzChaosTarget_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Chaos.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } 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.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 an in-memory object for Action. .Description Create an in-memory object for Action. .Example New-AzChaosActionObject -Name "urn:csci:microsoft:virtualMachine:shutdown/1.0" -Type "continuous" .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Action .Link https://learn.microsoft.com/powershell/module/Az.Chaos/new-azchaosactionobject #> function New-AzChaosActionObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Action])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # String that represents a Capability URN. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Enum that discriminates between action models. ${Type} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName 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.Chaos.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 = @{ __AllParameterSets = 'Az.Chaos.custom\New-AzChaosActionObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 an in-memory object for Branch. .Description Create an in-memory object for Branch. .Example $actionObj = New-AzChaosActionObject -Name "urn:csci:microsoft:virtualMachine:shutdown/1.0" -Type "continuous" New-AzChaosBranchObject -Action $actionObj -Name "branch1" .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Branch .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. ACTION <IAction[]>: List of actions. Name <String>: String that represents a Capability URN. Type <String>: Enum that discriminates between action models. .Link https://learn.microsoft.com/powershell/module/Az.Chaos/new-azchaosbranchobject #> function New-AzChaosBranchObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Branch])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IAction[]] # List of actions. ${Action}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # String of the branch name. ${Name} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName 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.Chaos.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 = @{ __AllParameterSets = 'Az.Chaos.custom\New-AzChaosBranchObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 an in-memory object for Selector. .Description Create an in-memory object for Selector. .Example New-AzChaosSelectorObject -Id "selector1" -Type List .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Selector .Link https://learn.microsoft.com/powershell/module/Az.Chaos/new-azchaosselectorobject #> function New-AzChaosSelectorObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Selector])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # String of the selector ID. ${Id}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.PSArgumentCompleterAttribute("List", "Query")] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # Enum of the selector type. ${Type} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName 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.Chaos.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 = @{ __AllParameterSets = 'Az.Chaos.custom\New-AzChaosSelectorObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 an in-memory object for Step. .Description Create an in-memory object for Step. .Example $actionObj = New-AzChaosActionObject -Name "urn:csci:microsoft:virtualMachine:shutdown/1.0" -Type "continuous" $branchObj = New-AzChaosBranchObject -Action $actionObj -Name "branch1" New-AzChaosStepObject -Branch $branchObj -Name "step1" .Outputs Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Step .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. BRANCH <IBranch[]>: List of branches. Action <List<IAction>>: List of actions. Name <String>: String that represents a Capability URN. Type <String>: Enum that discriminates between action models. Name <String>: String of the branch name. .Link https://learn.microsoft.com/powershell/module/Az.Chaos/new-azchaosstepobject #> function New-AzChaosStepObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.Step])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Models.IBranch[]] # List of branches. ${Branch}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.Category('Body')] [System.String] # String of the step name. ${Name} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName 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.Chaos.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 = @{ __AllParameterSets = 'Az.Chaos.custom\New-AzChaosStepObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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.Chaos.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.Chaos.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) $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.Chaos.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 } } } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # Bg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