Skip to content

Support attaching a DDoS Custom Policy to a Public IP address #33811

Description

Preconditions

  • No need to upgrade Python SDK or the Python SDK is ready.

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:

  1. Attach a DDoS Custom Policy while creating a Public IP address.
  2. Attach or replace the policy on an existing Public IP address.
  3. Remove the policy from a Public IP address.
  4. 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_

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions