Configure customer-controlled gateway maintenance for ExpressRoute (Preview)

This article helps you configure customer-controlled maintenance windows for your ExpressRoute virtual network gateways. Learn how to schedule customer-controlled maintenance for your gateways using the Azure portal or PowerShell.

Gateways undergo regular updates aimed at enhancing functionality, reliability, performance, and security. These updates encompass a wide range of activities, including patching software components, upgrading networking components, and decommissioning hardware.

In most cases, these updates are carefully planned to minimize their impact on customer operations. Factors such as Azure scheduling updates during nonbusiness hours in the gateway region, and customers having robust architecture, help ensure that most updates don't disrupt normal business activities. However, there might be instances where customers are affected by these updates. To mitigate any potential impact on operations, you can configure maintenance windows during non-business hours. This allows you to avoid disruptions and maintain smooth gateway operations.

For more information on limitations and frequently asked questions related to customer-controlled maintenance, see the ExpressRoute FAQ.

Note

Customer-controlled gateway maintenance (Preview) is currently rolling out to all regions.

Azure PowerShell steps

Use the following steps to assign policy to the resources. If you're new to PowerShell, see Get started with Azure PowerShell.

  1. Set the Subscription context.

    set-AzContext -Subscription 'Subscription Name'
    
  2. Register the Azure Resource Provider.

    Register-AzResourceProvider -ProviderNamespace Microsoft.Maintenance
    
  3. Create a maintenance configuration using the New-AzMaintenanceConfiguration cmdlet.

    • The -Duration must be a minimum of a 5 hour window.
    • The -RecurEvery is per day.
    • For TimeZone options, see Time Zones.
    New-AzMaintenanceConfiguration -ResourceGroupName <rgName> -Name <configurationName> -Location <arm location of resource> -MaintenanceScope Resource -ExtensionProperty @{"maintenanceSubScope"="NetworkGatewayMaintenance"} -StartDateTime "<date in YYYY-MM-DD HH:mm format>" -TimeZone "<Selected Time Zone>" -Duration "<Duration in HH:mm format>" -Visibility "Custom" -RecurEvery Day
    
  4. Save the maintenance configuration as a variable named $config.

    $config = Get-AzMaintenanceConfiguration -ResourceGroupName <rgName> -Name <configurationName>
    
  5. Save the service resource as a variable named $serviceResource.

  1. Create the maintenance configuration assignment using the New-AzConfigurationAssignment cmdlet. The maintenance policy is applied to the resource within 24 hours.

    New-AzConfigurationAssignment -ResourceGroupName <rgName> -ProviderName "Microsoft.Network" -ResourceType "<your resource's resource type per ARM. For example, expressRouteGateways or virtualNetworkGateways>" -ResourceName "<your resource's name>" -ConfigurationAssignmentName "<assignment name>" -ResourceId $serviceResource.Id -MaintenanceConfigurationId $config.Id -Location "<arm location of resource>"
    

To remove a configuration assignment

A configuration assignment is removed automatically if the configuration or the resource is deleted.

If you want to manually remove a configuration assignment from the maintenance configuration to a resource, use the Remove-AzConfigurationAssignment cmdlet.

Next steps

For more information, see the ExpressRoute FAQ.