Preconditions
Related command
az network public-ip create
az network public-ip update
Add support for attaching or removing a DDoS Custom Policy through the public IP resource, for example:
Resource Provider
Microsoft.Network/publicIPAddresses
Description of Feature or Work Requested
Microsoft.Network enabled DDoS Custom Policy linkage on the
publicIPAddresses resource in API version 2025-07-01.
Please update the Azure CLI network commands to support attaching,
updating, and removing a DDoS Custom Policy on a Public IP
address.
The requested scenarios are:
- Attach a DDoS Custom Policy while creating a Public IP address.
- Attach or replace the policy on an existing Public IP address.
- Remove the policy from a Public IP address.
- Return the attached policy information from the show command.
Suggested commands:
az network public-ip create \
--resource-group <resource-group> \
--name <public-ip-name> \
--ddos-settings "ddos-custom-policy={id:<policy-resource-id>}"
az network public-ip update \
--resource-group <resource-group> \
--name <public-ip-name> \
--ddos-settings "ddos-custom-policy={id:<policy-resource-id>}"
Example real commands:
```bash
az network ddos-custom-policy show -g $rg3 -n $dcp3 --query id -o tsv
az network lb frontend-ip update -g $rg3 --lb-name $lb3 -n $fip3 `
--ddos-settings "ddos-custom-policy={id:$dcpId}" -o jsonc
### Minimum API Version Required
2025-07-01
### Swagger PR link / SDK link
Swagger PR Link:
https://github.com/Azure/azure-rest-api-specs/pull/42075
Specification:
https://github.com/Azure/azure-rest-api-specs/blob/release-microsoft-network-2025-07-01/specification/network/resource-manager/Microsoft.Network/Network/stable/2025-07-01/virtualNetwork.json
### Request Example
The related Ddos Custom Policy and LB frontend-IP CLI scenario and live tests can be used as implementation references:
https://github.com/Azure/azure-cli/pull/33413
https://github.com/Azure/azure-cli/issues/33383
here is the api update:
https://learn.microsoft.com/en-us/azure/templates/microsoft.network/2025-07-01/publicipaddresses?pivots=deployment-language-bicep#property-values
A dedicated REST example for attaching a DDoS Custom Policy to a Public IP address is not currently available.
### Target Date
2026-08-31
### PM Contact
tasharm@microsoft.com
### Engineer Contact
venm@microsoft.com
### Additional context
_No response_
Preconditions
Related command
az network public-ip create
az network public-ip update
Add support for attaching or removing a DDoS Custom Policy through the public IP resource, for example:
Resource Provider
Microsoft.Network/publicIPAddresses
Description of Feature or Work Requested
Microsoft.Network enabled DDoS Custom Policy linkage on the
publicIPAddressesresource in API version2025-07-01.Please update the Azure CLI network commands to support attaching,
updating, and removing a DDoS Custom Policy on a Public IP
address.
The requested scenarios are:
Suggested commands: