Skip to content

Commit

Permalink
Add ddosCustomPolicy.json to readme.md and fix spec errors (#5008)
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-evseev authored and jianghaolu committed Jan 9, 2019
1 parent d8bdc8b commit c9269db
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}": {
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}": {
"delete": {
"tags": [
"ddosCustomPolicies"
Expand Down Expand Up @@ -130,7 +130,9 @@
}
},
"x-ms-examples": {
"Get DDoS custom policy": { "$ref": "./examples/DdosCustomPolicyGet.json" }
"Get DDoS custom policy": {
"$ref": "./examples/DdosCustomPolicyGet.json"
}
}
},
"put": {
Expand Down Expand Up @@ -198,7 +200,9 @@
}
},
"patch": {
"tags": ["ddosCustomPolicies"],
"tags": [
"ddosCustomPolicies"
],
"operationId": "DdosCustomPolicies_UpdateTags",
"description": "Update a DDoS custom policy tags",
"parameters": [
Expand Down Expand Up @@ -258,30 +262,7 @@
"definitions": {
"DdosCustomPolicy": {
"description": "A DDoS custom policy in a resource group.",
"x-ms-azure-resource": true,
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource ID."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags."
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/DdosCustomPolicyPropertiesFormat",
Expand All @@ -293,11 +274,11 @@
"description": "A unique read-only string that changes whenever the resource is updated."
}
},
"allOf":[
{
"$ref":"./network.json#/definitions/Resource"
"allOf": [
{
"$ref": "./network.json#/definitions/Resource"
}
]
]
},
"DdosCustomPolicyPropertiesFormat": {
"properties": {
Expand All @@ -315,15 +296,15 @@
"readOnly": true,
"type": "array",
"items": {
"$ref": "./network.json#/definitions/SubResource"
"$ref": "./network.json#/definitions/SubResource"
},
"description": "The list of public IPs associated with the DDoS custom policy resource. This list is read-only."
},
"protocolCustomSettings": {
"readOnly": false,
"type": "array",
"items": {
"$ref": "#/definitions/ProtocolCustomSettingsFormat"
"$ref": "#/definitions/ProtocolCustomSettingsFormat"
},
"description": "The protocol-specific DDoS policy customization parameters."
}
Expand All @@ -341,7 +322,7 @@
"Syn"
],
"x-ms-enum": {
"name": "The protocol for which the DDoS protection policy is being customized.",
"name": "DdosCustomPolicyProtocol",
"modelAsString": true
},
"description": "The protocol for which the DDoS protection policy is being customized."
Expand All @@ -362,11 +343,11 @@
"enum": [
"Relaxed",
"Low",
"Default",
"Default",
"High"
],
"x-ms-enum": {
"name": "The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic.",
"name": "DdosCustomPolicyTriggerSensitivityOverride",
"modelAsString": true
},
"description": "The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic."
Expand Down Expand Up @@ -410,4 +391,4 @@
"description": "An error response from the Batch service."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"resourceGroupName": "rg1",
"ddosCustomPolicyName": "test-ddos-custom-policy",
"parameters": {
"location": "westus",
"properties": {
"protocolCustomSettings": [
{
Expand All @@ -20,6 +21,7 @@
"name": "test-ddos-custom-policy",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy",
"type": "Microsoft.Network/ddosCustomPolicies",
"location": "westus",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
Expand All @@ -37,6 +39,7 @@
"name": "test-ddos-custom-policy",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy",
"type": "Microsoft.Network/ddosCustomPolicies",
"location": "westus",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"name": "test-ddos-custom-policy",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy",
"type": "Microsoft.Network/ddosCustomPolicies",
"location": "westus",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"name": "test-ddos-custom-policy",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/ddosCustomPolicies/test-ddos-custom-policy",
"type": "Microsoft.Network/ddosCustomPolicies",
"location": "westus",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
Expand Down
4 changes: 4 additions & 0 deletions specification/network/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ input-file:
- Microsoft.Network/stable/2018-11-01/azureFirewall.json
- Microsoft.Network/stable/2018-11-01/azureFirewallFqdnTag.json
- Microsoft.Network/stable/2018-11-01/checkDnsAvailability.json
- Microsoft.Network/stable/2018-11-01/ddosCustomPolicy.json
- Microsoft.Network/stable/2018-11-01/ddosProtectionPlan.json
- Microsoft.Network/stable/2018-11-01/endpointService.json
- Microsoft.Network/stable/2018-11-01/expressRouteCircuit.json
Expand Down Expand Up @@ -725,6 +726,9 @@ directive:
- suppress: RequiredPropertiesMissingInResourceModel
from: checkDnsAvailability.json
reason: name, id and type properties are inherited from the upper level
- suppress: RequiredPropertiesMissingInResourceModel
from: ddosCustomPolicy.json
reason: name, id and type properties are inherited from the upper level
- suppress: RequiredPropertiesMissingInResourceModel
from: ddosProtectionPlan.json
reason: name, id and type properties are inherited from the upper level
Expand Down

0 comments on commit c9269db

Please sign in to comment.