exports/Update-NmeHostPoolVMDeploymentProperty.ps1


# ----------------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.8, generator: @autorest/powershell@4.0.752)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Patch host deployment config for ARM host pool
.Description
Patch host deployment config for ARM host pool

#>

function Update-NmeHostPoolVMDeploymentProperty {
[OutputType([NmePowershell.Models.IHostPoolVMDeployment])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${HostPoolName},

    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${ResourceGroup},

    [Parameter(Mandatory)]
    [NmePowershell.Category('Path')]
    [System.String]
    # .
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IHostPoolVMDeploymentUpdate]
    # .
    ${Body},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Enforce a password prompt for users logging on to Remote Desktop Services
    ${AlwaysPromptForPassword},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # Application Security Group ID to associate with session host NICs
    ${ApplicationSecurityGroupIds},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Is host boot diagnostics enabled?
    ${BootDiagEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # List storage account IDs for boot diagnostics, if custom accounts are used.
    ${BootDiagStorageAccountsIds},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # On-demand Capacity Reservation Groups ids
    ${CapacityReservationGroupsIds},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.PSArgumentCompleterAttribute("None", "CompliancePoliciesOnly", "AllIntunePolicies")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${ComplianceEnforcement},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # Compliance timeout in hours.
    # Supported values are 1-24 hours.
    ${ComplianceTimeout},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Is confidential disk encryption enabled?
    ${ConfidentialDiskEncryption},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.String]
    # Host Group resource id
    ${DedicatedHostGroupId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.String]
    # Host resource id
    ${DedicatedHostId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # List of disk encryption set IDs for customer managed keys
    ${DiskEncryptionSetsIds},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Enable App-V client service if host pool is assigned to App Attach packages containing App-V package
    ${EnableAppvClientService},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Enable H.265 encoding on supported VM sizes
    ${EnableHevc},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Enable time zone redirection
    ${EnableTimezoneRedirection},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Enable automatic deallocation of stopped VMs
    ${EnableVMDeallocation},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Is encryption at host enabled?
    ${EncryptionAtHost},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # Entra groups timeout in minutes
    ${EntraDeviceTimeoutInMinutes},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # Default hostpool groups.
    # New session hosts will be assigned to these groups by default.
    ${EntraIdGroups},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Restart VM at the end of creation
    ${ForceVMRestart},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Install App Attach certificates if any
    ${InstallCertificates},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Install GPU drivers if VM have discrete GPU card
    ${InstallGpuDrivers},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Allow integrity monitoring if Trusted launch or Confidential security type is enabled
    ${IntegrityMonitoring},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Use accelerated networking when possible
    ${IsAcceleratedNetworkingEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Allow session shadowing for non-admin users
    ${IsShadowUsersEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${OnCreateActiveDirectoryId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${OnCreateEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IScriptedActionOption[]]
    # .
    ${OnCreateScriptedActions},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${OnHostCreateActiveDirectoryId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${OnHostCreateEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IScriptedActionOption[]]
    # .
    ${OnHostCreateScriptedActions},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${OnRemoveActiveDirectoryId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${OnRemoveEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IScriptedActionOption[]]
    # .
    ${OnRemoveScriptedActions},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${OnStartActiveDirectoryId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${OnStartEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IScriptedActionOption[]]
    # .
    ${OnStartScriptedActions},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # .
    ${OnStopActiveDirectoryId},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${OnStopEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IScriptedActionOption[]]
    # .
    ${OnStopScriptedActions},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.PSArgumentCompleterAttribute("Default", "Manual", "AutomaticByOS", "AutomaticByPlatform")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${PatchOrchestration},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.PSArgumentCompleterAttribute("SCSI", "NVMe")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${PreferredDiskControllerType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # Ids of Proximity Placement Groups where newly created VM can be placed
    ${ProximityPlacementGroupIds},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.PSArgumentCompleterAttribute("DoNothing", "ForceEnable", "ForceDisable")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${RdpShortpath},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Scripted actions configuration
    ${RunAppPolicies},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Allow secure boot if Trusted launch or Confidential security type is enabled
    ${SecureBootEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.PSArgumentCompleterAttribute("None", "TrustedLaunch", "Confidential")]
    [NmePowershell.Category('Body')]
    [System.String]
    # .
    ${SecurityType},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [NmePowershell.Models.IHostPoolAssignment[]]
    # Allow session shadowing for following non-admin users and groups
    ${ShadowUserAssignments},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Distribute VMs across availability zones in the azure region
    ${UseAvailabilityZones},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Place VMs on Dedicated Hosts
    ${UseDedicatedHosts},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [AllowEmptyCollection()]
    [NmePowershell.Category('Body')]
    [System.String[]]
    # User-assigned managed identity ARM IDs to attach to session host VMs.Null = no change.
    # Empty list = remove all.At most one identity per tenant.
    ${UserAssignedIdentityIds},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.String]
    # Set windows timezone on VM
    ${VMTimezone},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Allow VTpm if Trusted launch or Confidential security type is enabled
    ${VTpmEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # .
    ${WatermarkingEnabled},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # Determines the distance between the QR codes in percent
    ${WatermarkingHeightFactor},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # Determines the distance between the QR codes in percent
    ${WatermarkingOpacity},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # The size in pixels of each QR code dot
    ${WatermarkingScale},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [NmePowershell.Category('Body')]
    [System.Int32]
    # Determines the distance between the QR codes in percent
    ${WatermarkingWidthFactor},

    [Parameter(DontShow)]
    [NmePowershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [NmePowershell.Category('Runtime')]
    [NmePowershell.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [NmePowershell.Category('Runtime')]
    [NmePowershell.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [NmePowershell.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [NmePowershell.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [NmePowershell.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Use the default credentials for the proxy
    ${ProxyUseDefaultCredentials}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName
        
        $testPlayback = $false
        $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('NmePowershell.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

        $mapping = @{
            Update = 'NerdioManagerPowerShell.private\Update-NmeHostPoolVMDeploymentProperty_Update';
            UpdateExpanded = 'NerdioManagerPowerShell.private\Update-NmeHostPoolVMDeploymentProperty_UpdateExpanded';
        }
        $cmdInfo = Get-Command -Name $mapping[$parameterSet]
        [NmePowershell.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
        [NmePowershell.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        if ($wrappedCmd -eq $null) {
            $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
        }
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {

        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {

        throw
    }

}
end {
    try {
        $steppablePipeline.End()

    } catch {

        throw
    }
} 
}