From 07046ee0a8062ad688849c925383f943cfd330e7 Mon Sep 17 00:00:00 2001 From: Anton Evseev Date: Thu, 10 Jan 2019 00:51:25 +0300 Subject: [PATCH] Add ddosCustomPolicy.json to readme.md and fix spec errors (#5008) --- .../stable/2018-11-01/ddosCustomPolicy.json | 55 ++++++------------- .../examples/DdosCustomPolicyCreate.json | 3 + .../examples/DdosCustomPolicyGet.json | 1 + .../examples/DdosCustomPolicyUpdateTags.json | 5 ++ .../network/resource-manager/readme.md | 4 ++ 5 files changed, 31 insertions(+), 37 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/ddosCustomPolicy.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/ddosCustomPolicy.json index e1561bd09af1..d9dc7d282ef9 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/ddosCustomPolicy.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/ddosCustomPolicy.json @@ -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" @@ -130,7 +130,9 @@ } }, "x-ms-examples": { - "Get DDoS custom policy": { "$ref": "./examples/DdosCustomPolicyGet.json" } + "Get DDoS custom policy": { + "$ref": "./examples/DdosCustomPolicyGet.json" + } } }, "put": { @@ -198,7 +200,9 @@ } }, "patch": { - "tags": ["ddosCustomPolicies"], + "tags": [ + "ddosCustomPolicies" + ], "operationId": "DdosCustomPolicies_UpdateTags", "description": "Update a DDoS custom policy tags", "parameters": [ @@ -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", @@ -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": { @@ -315,7 +296,7 @@ "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." }, @@ -323,7 +304,7 @@ "readOnly": false, "type": "array", "items": { - "$ref": "#/definitions/ProtocolCustomSettingsFormat" + "$ref": "#/definitions/ProtocolCustomSettingsFormat" }, "description": "The protocol-specific DDoS policy customization parameters." } @@ -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." @@ -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." @@ -410,4 +391,4 @@ "description": "An error response from the Batch service." } } -} \ No newline at end of file +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyCreate.json index 336452cf0efb..7877d3965feb 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyCreate.json @@ -5,6 +5,7 @@ "resourceGroupName": "rg1", "ddosCustomPolicyName": "test-ddos-custom-policy", "parameters": { + "location": "westus", "properties": { "protocolCustomSettings": [ { @@ -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", @@ -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", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyGet.json index 6824d0820229..ccf758a61cfe 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyGet.json @@ -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", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyUpdateTags.json index b0fe578c5eda..2287e084c009 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyUpdateTags.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-11-01/examples/DdosCustomPolicyUpdateTags.json @@ -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", diff --git a/specification/network/resource-manager/readme.md b/specification/network/resource-manager/readme.md index 0701ecb9a1e9..6ef0e02eae66 100644 --- a/specification/network/resource-manager/readme.md +++ b/specification/network/resource-manager/readme.md @@ -85,6 +85,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 @@ -767,6 +768,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