diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/ddosCustomPolicy.json b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/ddosCustomPolicy.json index d74a5dc7f4ba..39a47479973e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/ddosCustomPolicy.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/ddosCustomPolicy.json @@ -302,9 +302,108 @@ "readOnly": true, "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the DDoS custom policy resource." + }, + "detectionRules": { + "type": "array", + "items": { + "$ref": "#/definitions/DdosDetectionRule" + }, + "description": "The list of DDoS detection rules associated with the custom policy." + }, + "frontEndIpConfiguration": { + "type": "array", + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "The list of frontend IP configurations associated with the custom policy." } }, "description": "DDoS custom policy properties." + }, + "DdosDetectionRulePropertiesFormat": { + "type": "object", + "properties": { + "provisioningState": { + "readOnly": true, + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the DDoS detection rule." + }, + "detectionMode": { + "type": "string", + "description": "The detection mode for the DDoS detection rule.", + "enum": [ + "TrafficThreshold" + ], + "x-ms-enum": { + "name": "DdosDetectionMode", + "modelAsString": true + } + }, + "trafficDetectionRule": { + "$ref": "#/definitions/TrafficDetectionRule", + "description": "The traffic detection rule details." + } + }, + "description": "DDoS detection rule properties." + }, + "DdosDetectionRule": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the DDoS detection rule." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The resource ID of the DDoS detection rule." + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "A unique read-only string that changes whenever the resource is updated." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DdosDetectionRulePropertiesFormat", + "description": "Properties of the DDoS detection rule." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/SubResource" + } + ], + "description": "A DDoS detection rule resource." + }, + "TrafficDetectionRule": { + "type": "object", + "properties": { + "trafficType": { + "type": "string", + "description": "The traffic type (one of Tcp, Udp, TcpSyn) that the detection rule will be applied upon.", + "enum": [ + "Tcp", + "Udp", + "TcpSyn" + ], + "x-ms-enum": { + "name": "DdosTrafficType", + "modelAsString": true + } + }, + "packetsPerSecond": { + "type": "integer", + "format": "int32", + "description": "The customized packets per second threshold." + } + }, + "description": "Ddos Custom Policy traffic detection rule." } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json index e6c099fe7314..02960ec7c3ed 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyCreate.json @@ -5,7 +5,21 @@ "resourceGroupName": "rg1", "ddosCustomPolicyName": "test-ddos-custom-policy", "parameters": { - "location": "centraluseuap" + "location": "centraluseuap", + "properties": { + "detectionRules": [ + { + "name": "detectionRuleTcp", + "properties": { + "detectionMode": "TrafficThreshold", + "trafficDetectionRule": { + "trafficType": "Tcp", + "packetsPerSecond": 1000000 + } + } + } + ] + } } }, "responses": { @@ -17,7 +31,23 @@ "location": "centraluseuap", "properties": { "provisioningState": "Succeeded", - "resourceGuid": "00000000-0000-0000-0000-000000000000" + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "detectionRules": [ + { + "name": "detectionRuleTcp", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy/ddosDetectionRules/detectionRuleTcp", + "etag": "W/\"00000000-0000-0000-0000-00000000\"", + "type": "Microsoft.Network/ddosCustomPolicies/ddosDetectionRules", + "properties": { + "provisioningState": "Succeeded", + "detectionMode": "TrafficThreshold", + "trafficDetectionRule": { + "trafficType": "Tcp", + "packetsPerSecond": 1000000 + } + } + } + ] } } }, @@ -29,7 +59,23 @@ "location": "centraluseuap", "properties": { "provisioningState": "Succeeded", - "resourceGuid": "00000000-0000-0000-0000-000000000000" + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "detectionRules": [ + { + "name": "detectionRuleTcp", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy/ddosDetectionRules/detectionRuleTcp", + "etag": "W/\"00000000-0000-0000-0000-00000000\"", + "type": "Microsoft.Network/ddosCustomPolicies/ddosDetectionRules", + "properties": { + "provisioningState": "Succeeded", + "detectionMode": "TrafficThreshold", + "trafficDetectionRule": { + "trafficType": "Tcp", + "packetsPerSecond": 1000000 + } + } + } + ] } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json index 97ebae8d37ff..58faf7788c82 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyGet.json @@ -14,7 +14,23 @@ "location": "westus", "properties": { "provisioningState": "Succeeded", - "resourceGuid": "00000000-0000-0000-0000-000000000000" + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "detectionRules": [ + { + "name": "detectionRuleTcp", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy/ddosDetectionRules/detectionRuleTcp", + "etag": "W/\"00000000-0000-0000-0000-00000000\"", + "type": "Microsoft.Network/ddosCustomPolicies/ddosDetectionRules", + "properties": { + "provisioningState": "Succeeded", + "detectionMode": "TrafficThreshold", + "trafficDetectionRule": { + "trafficType": "Tcp", + "packetsPerSecond": 1000000 + } + } + } + ] } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json index 60ecce930b19..92305433aa1d 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/examples/DdosCustomPolicyUpdateTags.json @@ -24,7 +24,23 @@ }, "properties": { "provisioningState": "Succeeded", - "resourceGuid": "00000000-0000-0000-0000-000000000000" + "resourceGuid": "00000000-0000-0000-0000-000000000000", + "detectionRules": [ + { + "name": "detectionRuleTcp", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy/ddosDetectionRules/detectionRuleTcp", + "etag": "W/\"00000000-0000-0000-0000-00000000\"", + "type": "Microsoft.Network/ddosCustomPolicies/ddosDetectionRules", + "properties": { + "provisioningState": "Succeeded", + "detectionMode": "TrafficThreshold", + "trafficDetectionRule": { + "trafficType": "Tcp", + "packetsPerSecond": 1000000 + } + } + } + ] } } }