Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check notice on line 1 in specification/network/resource-manager/Microsoft.Network/stable/2025-03-01/ddosCustomPolicy.json

View workflow job for this annotation

GitHub Actions / TypeSpec Requirement

Your service description will soon be required to convert from OpenAPI to TypeSpec. See https://aka.ms/azsdk/typespec.
"swagger": "2.0",
"info": {
"title": "NetworkManagementClient",
Expand Down Expand Up @@ -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."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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
}
}
}
]
}
}
},
Expand All @@ -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
}
}
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
]
}
}
}
Expand Down