The Set-AzDdosCustomPolicyMitigationRule cmdlet updates the explicitly specified properties of an existing named mitigation rule. Omitted parameters retain their existing values, a supplied list replaces that list, and an empty array clears that list. When both lists for an action are empty, that action is removed.
Deny matches drop traffic from matching sources. Permit matches skip source-level mitigations for matching sources, while destination-level mitigations still apply. Within one action, IP prefixes and geographic matches use OR semantics. Geographic matches use <Country>, <Continent>, or <Continent>.<Country> format.
Rule-name matching is case-insensitive, and response metadata and unmodified service-provided actions are preserved. The cmdlet does not update Azure. Pipe the returned policy to Set-AzDdosCustomPolicy to persist the change.
Examples
Example 1: Update and persist a TCP mitigation rule
This example updates only the TCP connection rate on tcpRule. The existing packet rate and source policy overrides are retained when the updated policy is persisted.
Specifies the replacement geographic match list for the Deny action. Matching traffic is dropped. Use <Country>, <Continent>, or <Continent>.<Country> format. Specify an empty array to clear this list. If omitted, the current list is retained.
Specifies the replacement IPv4 or IPv6 CIDR prefix list for the Deny action. Matching traffic is dropped. Specify an empty array to clear this list. If omitted, the current list is retained.
Specifies the replacement geographic match list for the Permit action. Matching sources skip source-level mitigations, while destination-level mitigations still apply. Use <Country>, <Continent>, or <Continent>.<Country> format. Specify an empty array to clear this list. If omitted, the current list is retained.
Specifies the replacement IPv4 or IPv6 CIDR prefix list for the Permit action. Matching sources skip source-level mitigations, while destination-level mitigations still apply. Specify an empty array to clear this list. If omitted, the current list is retained.
Specifies the traffic protocol to which the rule applies. If this parameter is omitted, the existing traffic scope is retained. Common values are Tcp and Udp.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.