From 98a90523e14aa42857175cf7b03a7981121e890f Mon Sep 17 00:00:00 2001 From: Anton Evseev Date: Fri, 12 Apr 2019 15:11:56 +0300 Subject: [PATCH 1/2] Remove duplicate enums --- .../stable/2019-02-01/applicationGateway.json | 60 +-- .../2019-02-01/expressRouteCircuit.json | 67 ++- .../expressRouteCrossConnection.json | 14 +- .../2019-02-01/expressRouteGateway.json | 28 +- .../stable/2019-02-01/loadBalancer.json | 12 +- .../stable/2019-02-01/network.json | 48 ++ .../stable/2019-02-01/networkInterface.json | 75 +-- .../2019-02-01/networkSecurityGroup.json | 48 +- .../stable/2019-02-01/networkWatcher.json | 92 +--- .../stable/2019-02-01/publicIpAddress.json | 24 +- .../stable/2019-02-01/publicIpPrefix.json | 12 +- .../stable/2019-02-01/routeFilter.json | 12 +- .../stable/2019-02-01/routeTable.json | 30 +- .../2019-02-01/virtualNetworkGateway.json | 437 +++++++----------- .../stable/2019-02-01/virtualWan.json | 24 +- 15 files changed, 368 insertions(+), 615 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/applicationGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/applicationGateway.json index 249eed14c0cf..c2406e0fa4d4 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/applicationGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/applicationGateway.json @@ -1047,16 +1047,8 @@ "description": "PrivateIPAddress of the network interface IP Configuration." }, "privateIPAllocationMethod": { - "type": "string", - "description": "PrivateIP allocation method.", - "enum": [ - "Static", - "Dynamic" - ], - "x-ms-enum": { - "name": "IPAllocationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPAllocationMethod", + "description": "The private IP address allocation method." }, "subnet": { "$ref": "./network.json#/definitions/SubResource", @@ -1212,16 +1204,8 @@ "description": "The destination port on the backend." }, "protocol": { - "type": "string", - "description": "The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'.", - "enum": [ - "Http", - "Https" - ], - "x-ms-enum": { - "name": "ApplicationGatewayProtocol", - "modelAsString": true - } + "$ref": "#/definitions/ApplicationGatewayProtocol", + "description": "The protocol used to communicate with the backend." }, "cookieBasedAffinity": { "type": "string", @@ -1327,16 +1311,8 @@ "description": "Frontend port resource of an application gateway." }, "protocol": { - "type": "string", - "description": "Protocol of the HTTP listener. Possible values are 'Http' and 'Https'.", - "enum": [ - "Http", - "Https" - ], - "x-ms-enum": { - "name": "ApplicationGatewayProtocol", - "modelAsString": true - } + "$ref": "#/definitions/ApplicationGatewayProtocol", + "description": "Protocol of the HTTP listener." }, "hostName": { "type": "string", @@ -1453,16 +1429,8 @@ "ApplicationGatewayProbePropertiesFormat": { "properties": { "protocol": { - "type": "string", - "description": "The protocol used for the probe. Possible values are 'Http' and 'Https'.", - "enum": [ - "Http", - "Https" - ], - "x-ms-enum": { - "name": "ApplicationGatewayProtocol", - "modelAsString": true - } + "$ref": "#/definitions/ApplicationGatewayProtocol", + "description": "The protocol used for the probe." }, "host": { "type": "string", @@ -2555,6 +2523,18 @@ "name": "ApplicationGatewayRedirectType", "modelAsString": true } + }, + "ApplicationGatewayProtocol": { + "type": "string", + "description": "Application Gateway protocol.", + "enum": [ + "Http", + "Https" + ], + "x-ms-enum": { + "name": "ApplicationGatewayProtocol", + "modelAsString": true + } } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json index 631785b57719..99196f41707b 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json @@ -1751,18 +1751,9 @@ "description": "The authorization key." }, "circuitConnectionStatus": { - "type": "string", - "description": "Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'.", - "enum": [ - "Connected", - "Connecting", - "Disconnected" - ], "readOnly": true, - "x-ms-enum": { - "name": "CircuitConnectionStatus", - "modelAsString": true - } + "$ref": "#/definitions/CircuitConnectionStatus", + "description": "Express Route Circuit connection state." }, "provisioningState": { "type": "string", @@ -1827,18 +1818,9 @@ "description": "/29 IP address space to carve out Customer addresses for tunnels." }, "circuitConnectionStatus": { - "type": "string", - "description": "Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'.", - "enum": [ - "Connected", - "Connecting", - "Disconnected" - ], "readOnly": true, - "x-ms-enum": { - "name": "circuitConnectionStatus", - "modelAsString": true - } + "$ref": "#/definitions/CircuitConnectionStatus", + "description": "Express Route Circuit connection state." }, "connectionName": { "type": "string", @@ -1960,18 +1942,8 @@ "description": "The CircuitProvisioningState state of the resource." }, "serviceProviderProvisioningState": { - "type": "string", - "description": "The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'.", - "enum": [ - "NotProvisioned", - "Provisioning", - "Provisioned", - "Deprovisioning" - ], - "x-ms-enum": { - "name": "ServiceProviderProvisioningState", - "modelAsString": true - } + "$ref": "#/definitions/ServiceProviderProvisioningState", + "description": "The ServiceProviderProvisioningState state of the resource." }, "authorizations": { "type": "array", @@ -2258,6 +2230,33 @@ } }, "description": "Response for the ListExpressRouteServiceProvider API service call." + }, + "CircuitConnectionStatus": { + "type": "string", + "description": "Express Route Circuit connection state.", + "enum": [ + "Connected", + "Connecting", + "Disconnected" + ], + "x-ms-enum": { + "name": "CircuitConnectionStatus", + "modelAsString": true + } + }, + "ServiceProviderProvisioningState": { + "type": "string", + "description": "The ServiceProviderProvisioningState state of the resource.", + "enum": [ + "NotProvisioned", + "Provisioning", + "Provisioned", + "Deprovisioning" + ], + "x-ms-enum": { + "name": "ServiceProviderProvisioningState", + "modelAsString": true + } } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCrossConnection.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCrossConnection.json index 612c94171878..272e2a67b456 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCrossConnection.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCrossConnection.json @@ -756,18 +756,8 @@ "description": "The ExpressRouteCircuit" }, "serviceProviderProvisioningState": { - "type": "string", - "description": "The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'.", - "enum": [ - "NotProvisioned", - "Provisioning", - "Provisioned", - "Deprovisioning" - ], - "x-ms-enum": { - "name": "ServiceProviderProvisioningState", - "modelAsString": true - } + "$ref": "./expressRouteCircuit.json#/definitions/ServiceProviderProvisioningState", + "description": "The provisioning state of the circuit in the connectivity provider system." }, "serviceProviderNotes": { "type": "string", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json index 99fca40a423a..ddcedd80b8bc 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json @@ -536,19 +536,9 @@ } }, "provisioningState": { - "type": "string", "readOnly": true, - "description": "The provisioning state of the resource.", - "enum": [ - "Succeeded", - "Updating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - } + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the resource." }, "virtualHub": { "$ref": "#/definitions/VirtualHubId", @@ -595,19 +585,9 @@ ], "properties": { "provisioningState": { - "type": "string", "readOnly": true, - "description": "The provisioning state of the resource.", - "enum": [ - "Succeeded", - "Updating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - } + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the resource." }, "expressRouteCircuitPeering": { "$ref": "#/definitions/ExpressRouteCircuitPeeringId", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/loadBalancer.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/loadBalancer.json index 3e3c7bc159c4..f46882d3a66d 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/loadBalancer.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/loadBalancer.json @@ -1105,16 +1105,8 @@ "description": "The private IP address of the IP configuration." }, "privateIPAllocationMethod": { - "type": "string", - "description": "The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'.", - "enum": [ - "Static", - "Dynamic" - ], - "x-ms-enum": { - "name": "IPAllocationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPAllocationMethod", + "description": "The Private IP allocation method." }, "subnet": { "$ref": "./virtualNetwork.json#/definitions/Subnet", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/network.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/network.json index a72b7b2268aa..d5110f6b9ea4 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/network.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/network.json @@ -218,6 +218,54 @@ "name":"ProvisioningState", "modelAsString":true } + }, + "Access": { + "type": "string", + "description": "Access to be allowed or denied.", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "Access", + "modelAsString": true + } + }, + "AuthenticationMethod": { + "type": "string", + "description": "VPN client authentication method.", + "enum": [ + "EAPTLS", + "EAPMSCHAPv2" + ], + "x-ms-enum": { + "name": "AuthenticationMethod", + "modelAsString": true + } + }, + "IPAllocationMethod": { + "type": "string", + "description": "IP address allocation method.", + "enum": [ + "Static", + "Dynamic" + ], + "x-ms-enum": { + "name": "IPAllocationMethod", + "modelAsString": true + } + }, + "IPVersion": { + "type": "string", + "description": "IP address version.", + "enum": [ + "IPv4", + "IPv6" + ], + "x-ms-enum": { + "name": "IPVersion", + "modelAsString": true + } } }, "parameters": { diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkInterface.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkInterface.json index 5e55ff597cda..41dddf3e33f0 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkInterface.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkInterface.json @@ -841,28 +841,12 @@ "description": "Private IP address of the IP configuration." }, "privateIPAllocationMethod": { - "type": "string", - "description": "Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'.", - "enum": [ - "Static", - "Dynamic" - ], - "x-ms-enum": { - "name": "IPAllocationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPAllocationMethod", + "description": "The private IP address allocation method." }, "privateIPAddressVersion": { - "type": "string", - "description": "Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.", - "enum": [ - "IPv4", - "IPv6" - ], - "x-ms-enum": { - "name": "IPVersion", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPVersion", + "description": "Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4." }, "subnet": { "$ref": "./virtualNetwork.json#/definitions/Subnet", @@ -1222,16 +1206,8 @@ "description": "Expanded destination address prefix." }, "access": { - "type": "string", - "description": "Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'.", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "SecurityRuleAccess", - "modelAsString": true - } + "$ref": "./networkSecurityGroup.json#/definitions/SecurityRuleAccess", + "description": "Whether network traffic is allowed or denied." }, "priority": { "type": "integer", @@ -1239,16 +1215,8 @@ "description": "The priority of the rule." }, "direction": { - "type": "string", - "description": "The direction of the rule. Possible values are: 'Inbound and Outbound'.", - "enum": [ - "Inbound", - "Outbound" - ], - "x-ms-enum": { - "name": "SecurityRuleDirection", - "modelAsString": true - } + "$ref": "./networkSecurityGroup.json#/definitions/SecurityRuleDirection", + "description": "The direction of the rule." } }, "description": "Effective network security rules." @@ -1317,19 +1285,8 @@ "description": "The IP address of the next hop of the effective route." }, "nextHopType": { - "type": "string", - "description": "The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'.", - "enum": [ - "VirtualNetworkGateway", - "VnetLocal", - "Internet", - "VirtualAppliance", - "None" - ], - "x-ms-enum": { - "name": "RouteNextHopType", - "modelAsString": true - } + "$ref": "./routeTable.json#/definitions/RouteNextHopType", + "description": "The type of Azure hop the packet should be sent to." } }, "description": "Effective Route" @@ -1358,16 +1315,8 @@ "description": "The private IP address of the IP configuration." }, "privateIPAllocationMethod": { - "type": "string", - "description": "The private IP allocation method. Possible values are 'Static' and 'Dynamic'.", - "enum": [ - "Static", - "Dynamic" - ], - "x-ms-enum": { - "name": "IPAllocationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPAllocationMethod", + "description": "The private IP adress allocation method." }, "subnet": { "$ref": "./virtualNetwork.json#/definitions/Subnet", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkSecurityGroup.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkSecurityGroup.json index 28e23a327026..9e0d497339f8 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkSecurityGroup.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkSecurityGroup.json @@ -701,16 +701,8 @@ "description": "The destination port ranges." }, "access": { - "type": "string", - "description": "The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'.", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "SecurityRuleAccess", - "modelAsString": true - } + "$ref": "#/definitions/SecurityRuleAccess", + "description": "The network traffic is allowed or denied." }, "priority": { "type": "integer", @@ -718,16 +710,8 @@ "description": "The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule." }, "direction": { - "type": "string", - "description": "The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'.", - "enum": [ - "Inbound", - "Outbound" - ], - "x-ms-enum": { - "name": "SecurityRuleDirection", - "modelAsString": true - } + "$ref": "#/definitions/SecurityRuleDirection", + "description": "The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic." }, "provisioningState": { "type": "string", @@ -857,6 +841,30 @@ } }, "description": "Response for ListNetworkSecurityGroups API service call." + }, + "SecurityRuleAccess": { + "type": "string", + "description": "Whether network traffic is allowed or denied.", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "SecurityRuleAccess", + "modelAsString": true + } + }, + "SecurityRuleDirection": { + "type": "string", + "description": "The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.", + "enum": [ + "Inbound", + "Outbound" + ], + "x-ms-enum": { + "name": "SecurityRuleDirection", + "modelAsString": true + } } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json index bbc17f9ee597..e5a8d9fbdd79 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json @@ -1936,17 +1936,7 @@ "properties": { "provisioningState": { "readOnly": true, - "type": "string", - "enum": [ - "Succeeded", - "Updating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - }, + "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the resource." } }, @@ -2076,15 +2066,7 @@ "description": "The ID of the target resource to perform next-hop on." }, "direction": { - "type": "string", - "enum": [ - "Inbound", - "Outbound" - ], - "x-ms-enum": { - "name": "Direction", - "modelAsString": true - }, + "$ref": "#/definitions/Direction", "description": "The direction of the packet represented as a 5-tuple." }, "protocol": { @@ -2125,15 +2107,7 @@ "description": "Results of IP flow verification on the target resource.", "properties": { "access": { - "type": "string", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "Access", - "modelAsString": true - }, + "$ref": "./network.json#/definitions/Access", "description": "Indicates whether the traffic is allowed or denied." }, "ruleName": { @@ -2439,17 +2413,7 @@ "PacketCaptureResultProperties": { "properties": { "provisioningState": { - "type": "string", - "enum": [ - "Succeeded", - "Updating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - }, + "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the packet capture session." } }, @@ -3417,17 +3381,7 @@ "ConnectionMonitorResultProperties": { "properties": { "provisioningState": { - "type": "string", - "enum": [ - "Succeeded", - "Updating", - "Deleting", - "Failed" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true - }, + "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the connection monitor." }, "startTime": { @@ -3585,16 +3539,8 @@ ], "properties": { "direction": { - "type": "string", - "enum": [ - "Inbound", - "Outbound" - ], - "x-ms-enum": { - "name": "Direction", - "modelAsString": true - }, - "description": "The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'." + "$ref": "#/definitions/Direction", + "description": "The direction of the traffic." }, "protocol": { "type": "string", @@ -3644,16 +3590,8 @@ "description": "Network configuration diagnostic result corresponded provided traffic query.", "properties": { "securityRuleAccessResult": { - "type": "string", - "description": "The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "SecurityRuleAccess", - "modelAsString": true - } + "$ref": "./networkSecurityGroup.json#/definitions/SecurityRuleAccess", + "description": "The network traffic is allowed or denied." }, "evaluatedNetworkSecurityGroups": { "readOnly": true, @@ -3731,6 +3669,18 @@ "description": "Value indicating whether destination port is matched." } } + }, + "Direction": { + "type": "string", + "description": "The direction of the traffic.", + "enum": [ + "Inbound", + "Outbound" + ], + "x-ms-enum": { + "name": "Direction", + "modelAsString": true + } } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpAddress.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpAddress.json index 10a7fe984406..fdcd000a11a4 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpAddress.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpAddress.json @@ -332,28 +332,12 @@ "PublicIPAddressPropertiesFormat": { "properties": { "publicIPAllocationMethod": { - "type": "string", - "description": "The public IP allocation method. Possible values are: 'Static' and 'Dynamic'.", - "enum": [ - "Static", - "Dynamic" - ], - "x-ms-enum": { - "name": "IPAllocationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPAllocationMethod", + "description": "The public IP address allocation method." }, "publicIPAddressVersion": { - "type": "string", - "description": "The public IP address version. Possible values are: 'IPv4' and 'IPv6'.", - "enum": [ - "IPv4", - "IPv6" - ], - "x-ms-enum": { - "name": "IPVersion", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPVersion", + "description": "The public IP address version." }, "ipConfiguration": { "readOnly": true, diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpPrefix.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpPrefix.json index 3f1e32929918..dcbf63a1b647 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpPrefix.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/publicIpPrefix.json @@ -330,16 +330,8 @@ "PublicIPPrefixPropertiesFormat": { "properties": { "publicIPAddressVersion": { - "type": "string", - "description": "The public IP address version. Possible values are: 'IPv4' and 'IPv6'.", - "enum": [ - "IPv4", - "IPv6" - ], - "x-ms-enum": { - "name": "IPVersion", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPVersion", + "description": "The public IP address version." }, "ipTags": { "type": "array", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeFilter.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeFilter.json index 945710ebc7ee..b689b1dbb802 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeFilter.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeFilter.json @@ -589,16 +589,8 @@ ], "properties": { "access": { - "type": "string", - "description": "The access type of the rule. Valid values are: 'Allow', 'Deny'", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "Access", - "modelAsString": true - } + "$ref": "./network.json#/definitions/Access", + "description": "The access type of the rule." }, "routeFilterRuleType": { "type": "string", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeTable.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeTable.json index 26bbadb7acf9..39c578662d1e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeTable.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/routeTable.json @@ -532,19 +532,8 @@ "description": "The destination CIDR to which the route applies." }, "nextHopType": { - "type": "string", - "description": "The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'", - "enum": [ - "VirtualNetworkGateway", - "VnetLocal", - "Internet", - "VirtualAppliance", - "None" - ], - "x-ms-enum": { - "name": "RouteNextHopType", - "modelAsString": true - } + "$ref": "#/definitions/RouteNextHopType", + "description": "The type of Azure hop the packet should be sent to." }, "nextHopIpAddress": { "type": "string", @@ -661,6 +650,21 @@ } }, "description": "Response for the ListRoute API service call" + }, + "RouteNextHopType": { + "type": "string", + "description": "The type of Azure hop the packet should be sent to.", + "enum": [ + "VirtualNetworkGateway", + "VnetLocal", + "Internet", + "VirtualAppliance", + "None" + ], + "x-ms-enum": { + "name": "RouteNextHopType", + "modelAsString": true + } } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetworkGateway.json index a3ca27643cf5..c3f530f1c748 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualNetworkGateway.json @@ -1578,16 +1578,8 @@ "VirtualNetworkGatewayIPConfigurationPropertiesFormat": { "properties": { "privateIPAllocationMethod": { - "type": "string", - "description": "The private IP allocation method. Possible values are: 'Static' and 'Dynamic'.", - "enum": [ - "Static", - "Dynamic" - ], - "x-ms-enum": { - "name": "IPAllocationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/IPAllocationMethod", + "description": "The private IP address allocation method." }, "subnet": { "$ref": "./network.json#/definitions/SubResource", @@ -2045,16 +2037,8 @@ } }, "authenticationMethod": { - "type": "string", - "description": "VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'.", - "enum": [ - "EAPTLS", - "EAPMSCHAPv2" - ], - "x-ms-enum": { - "name": "AuthenticationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/AuthenticationMethod", + "description": "VPN client authentication method." }, "radiusServerAuthCertificate": { "type": "string", @@ -2120,18 +2104,8 @@ }, "connectionStatus": { "readOnly": true, - "type": "string", - "description": "Virtual network Gateway connection status", - "enum": [ - "Unknown", - "Connecting", - "Connected", - "NotConnected" - ], - "x-ms-enum": { - "name": "VirtualNetworkGatewayConnectionStatus", - "modelAsString": true - } + "$ref": "#/definitions/VirtualNetworkGatewayConnectionStatus", + "description": "Virtual Network Gateway connection status" }, "ingressBytesTransferred": { "readOnly": true, @@ -2172,18 +2146,8 @@ "description": "The reference to local network gateway resource." }, "connectionType": { - "type": "string", - "description": "Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient.", - "enum": [ - "IPsec", - "Vnet2Vnet", - "ExpressRoute", - "VPNClient" - ], - "x-ms-enum": { - "name": "VirtualNetworkGatewayConnectionType", - "modelAsString": true - } + "$ref": "#/definitions/VirtualNetworkGatewayConnectionType", + "description": "Gateway connection type." }, "connectionProtocol": { "$ref": "#/definitions/ConnectionProtocol", @@ -2200,18 +2164,8 @@ }, "connectionStatus": { "readOnly": true, - "type": "string", - "description": "Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'.", - "enum": [ - "Unknown", - "Connecting", - "Connected", - "NotConnected" - ], - "x-ms-enum": { - "name": "VirtualNetworkGatewayConnectionStatus", - "modelAsString": true - } + "$ref": "#/definitions/VirtualNetworkGatewayConnectionStatus", + "description": "Virtual Network Gateway connection status." }, "tunnelConnectionStatus": { "readOnly": true, @@ -2356,109 +2310,28 @@ "description": "The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel." }, "ipsecEncryption": { - "type": "string", - "description": "The IPSec encryption algorithm (IKE phase 1).", - "enum": [ - "None", - "DES", - "DES3", - "AES128", - "AES192", - "AES256", - "GCMAES128", - "GCMAES192", - "GCMAES256" - ], - "x-ms-enum": { - "name": "IpsecEncryption", - "modelAsString": true - } + "$ref": "#/definitions/IpsecEncryption", + "description": "The IPSec encryption algorithm (IKE phase 1)." }, "ipsecIntegrity": { - "type": "string", - "description": "The IPSec integrity algorithm (IKE phase 1).", - "enum": [ - "MD5", - "SHA1", - "SHA256", - "GCMAES128", - "GCMAES192", - "GCMAES256" - ], - "x-ms-enum": { - "name": "IpsecIntegrity", - "modelAsString": true - } + "$ref": "#/definitions/IpsecIntegrity", + "description": "The IPSec integrity algorithm (IKE phase 1)." }, "ikeEncryption": { - "type": "string", - "description": "The IKE encryption algorithm (IKE phase 2).", - "enum": [ - "DES", - "DES3", - "AES128", - "AES192", - "AES256", - "GCMAES256", - "GCMAES128" - ], - "x-ms-enum": { - "name": "IkeEncryption", - "modelAsString": true - } + "$ref": "#/definitions/IkeEncryption", + "description": "The IKE encryption algorithm (IKE phase 2)." }, "ikeIntegrity": { - "type": "string", - "description": "The IKE integrity algorithm (IKE phase 2).", - "enum": [ - "MD5", - "SHA1", - "SHA256", - "SHA384", - "GCMAES256", - "GCMAES128" - ], - "x-ms-enum": { - "name": "IkeIntegrity", - "modelAsString": true - } + "$ref": "#/definitions/IkeIntegrity", + "description": "The IKE integrity algorithm (IKE phase 2)." }, "dhGroup": { - "type": "string", - "description": "The DH Groups used in IKE Phase 1 for initial SA.", - "enum": [ - "None", - "DHGroup1", - "DHGroup2", - "DHGroup14", - "DHGroup2048", - "ECP256", - "ECP384", - "DHGroup24" - ], - "x-ms-enum": { - "name": "DhGroup", - "modelAsString": true - } + "$ref": "#/definitions/DhGroup", + "description": "The DH Group used in IKE Phase 1 for initial SA." }, "pfsGroup": { - "type": "string", - "description": "The Pfs Groups used in IKE Phase 2 for new child SA.", - "enum": [ - "None", - "PFS1", - "PFS2", - "PFS2048", - "ECP256", - "ECP384", - "PFS24", - "PFS14", - "PFSMM" - ], - "x-ms-enum": { - "name": "PfsGroup", - "modelAsString": true - } + "$ref": "#/definitions/PfsGroup", + "description": "The Pfs Group used in IKE Phase 2 for new child SA." } }, "required": [ @@ -2498,109 +2371,28 @@ "description": "The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client.." }, "ipsecEncryption": { - "type": "string", - "description": "The IPSec encryption algorithm (IKE phase 1).", - "enum": [ - "None", - "DES", - "DES3", - "AES128", - "AES192", - "AES256", - "GCMAES128", - "GCMAES192", - "GCMAES256" - ], - "x-ms-enum": { - "name": "IpsecEncryption", - "modelAsString": true - } + "$ref": "#/definitions/IpsecEncryption", + "description": "The IPSec encryption algorithm (IKE phase 1)." }, "ipsecIntegrity": { - "type": "string", - "description": "The IPSec integrity algorithm (IKE phase 1).", - "enum": [ - "MD5", - "SHA1", - "SHA256", - "GCMAES128", - "GCMAES192", - "GCMAES256" - ], - "x-ms-enum": { - "name": "IpsecIntegrity", - "modelAsString": true - } + "$ref": "#/definitions/IpsecIntegrity", + "description": "The IPSec integrity algorithm (IKE phase 1)." }, "ikeEncryption": { - "type": "string", - "description": "The IKE encryption algorithm (IKE phase 2).", - "enum": [ - "DES", - "DES3", - "AES128", - "AES192", - "AES256", - "GCMAES256", - "GCMAES128" - ], - "x-ms-enum": { - "name": "IkeEncryption", - "modelAsString": true - } + "$ref": "#/definitions/IkeEncryption", + "description": "The IKE encryption algorithm (IKE phase 2)." }, "ikeIntegrity": { - "type": "string", - "description": "The IKE integrity algorithm (IKE phase 2).", - "enum": [ - "MD5", - "SHA1", - "SHA256", - "SHA384", - "GCMAES256", - "GCMAES128" - ], - "x-ms-enum": { - "name": "IkeIntegrity", - "modelAsString": true - } + "$ref": "#/definitions/IkeIntegrity", + "description": "The IKE integrity algorithm (IKE phase 2)." }, "dhGroup": { - "type": "string", - "description": "The DH Groups used in IKE Phase 1 for initial SA.", - "enum": [ - "None", - "DHGroup1", - "DHGroup2", - "DHGroup14", - "DHGroup2048", - "ECP256", - "ECP384", - "DHGroup24" - ], - "x-ms-enum": { - "name": "DhGroup", - "modelAsString": true - } + "$ref": "#/definitions/DhGroup", + "description": "The DH Group used in IKE Phase 1 for initial SA." }, "pfsGroup": { - "type": "string", - "description": "The Pfs Groups used in IKE Phase 2 for new child SA.", - "enum": [ - "None", - "PFS1", - "PFS2", - "PFS2048", - "ECP256", - "ECP384", - "PFS24", - "PFS14", - "PFSMM" - ], - "x-ms-enum": { - "name": "PfsGroup", - "modelAsString": true - } + "$ref": "#/definitions/PfsGroup", + "description": "The Pfs Group used in IKE Phase 2 for new child SA." } }, "required": [ @@ -2711,18 +2503,8 @@ "description": "The reference to local network gateway resource." }, "connectionType": { - "type": "string", - "description": "Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient.", - "enum": [ - "IPsec", - "Vnet2Vnet", - "ExpressRoute", - "VPNClient" - ], - "x-ms-enum": { - "name": "VirtualNetworkGatewayConnectionType", - "modelAsString": true - } + "$ref": "#/definitions/VirtualNetworkGatewayConnectionType", + "description": "Gateway connection type." }, "connectionProtocol": { "$ref": "#/definitions/ConnectionProtocol", @@ -2739,18 +2521,8 @@ }, "connectionStatus": { "readOnly": true, - "type": "string", - "description": "Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'.", - "enum": [ - "Unknown", - "Connecting", - "Connected", - "NotConnected" - ], - "x-ms-enum": { - "name": "VirtualNetworkGatewayConnectionStatus", - "modelAsString": true - } + "$ref": "#/definitions/VirtualNetworkGatewayConnectionStatus", + "description": "Virtual Network Gateway connection status." }, "tunnelConnectionStatus": { "readOnly": true, @@ -2866,6 +2638,139 @@ } }, "description": "Vpn device configuration script generation parameters" + }, + "DhGroup": { + "type": "string", + "description": "The DH Groups used in IKE Phase 1 for initial SA.", + "enum": [ + "None", + "DHGroup1", + "DHGroup2", + "DHGroup14", + "DHGroup2048", + "ECP256", + "ECP384", + "DHGroup24" + ], + "x-ms-enum": { + "name": "DhGroup", + "modelAsString": true + } + }, + "IkeEncryption": { + "type": "string", + "description": "The IKE encryption algorithm (IKE phase 2).", + "enum": [ + "DES", + "DES3", + "AES128", + "AES192", + "AES256", + "GCMAES256", + "GCMAES128" + ], + "x-ms-enum": { + "name": "IkeEncryption", + "modelAsString": true + } + }, + "IkeIntegrity": { + "type": "string", + "description": "The IKE integrity algorithm (IKE phase 2).", + "enum": [ + "MD5", + "SHA1", + "SHA256", + "SHA384", + "GCMAES256", + "GCMAES128" + ], + "x-ms-enum": { + "name": "IkeIntegrity", + "modelAsString": true + } + }, + "IpsecEncryption": { + "type": "string", + "description": "The IPSec encryption algorithm (IKE phase 1).", + "enum": [ + "None", + "DES", + "DES3", + "AES128", + "AES192", + "AES256", + "GCMAES128", + "GCMAES192", + "GCMAES256" + ], + "x-ms-enum": { + "name": "IpsecEncryption", + "modelAsString": true + } + }, + "IpsecIntegrity": { + "type": "string", + "description": "The IPSec integrity algorithm (IKE phase 1).", + "enum": [ + "MD5", + "SHA1", + "SHA256", + "GCMAES128", + "GCMAES192", + "GCMAES256" + ], + "x-ms-enum": { + "name": "IpsecIntegrity", + "modelAsString": true + } + }, + "PfsGroup": { + "type": "string", + "description": "The Pfs Groups used in IKE Phase 2 for new child SA.", + "enum": [ + "None", + "PFS1", + "PFS2", + "PFS2048", + "ECP256", + "ECP384", + "PFS24", + "PFS14", + "PFSMM" + ], + "x-ms-enum": { + "name": "PfsGroup", + "modelAsString": true + } + }, + "VirtualNetworkGatewayConnectionStatus": { + "type": "string", + "description": "Virtual Network Gateway connection status.", + "enum": [ + "Unknown", + "Connecting", + "Connected", + "NotConnected" + ], + "x-ms-enum": { + "name": "VirtualNetworkGatewayConnectionStatus", + "modelAsString": true + } + }, + "VirtualNetworkGatewayConnectionType": { + "type": "string", + "description": "Gateway connection type.", + "enum": [ + "IPsec", + "Vnet2Vnet", + "ExpressRoute", + "VPNClient" + ], + "x-ms-enum": { + "name": "VirtualNetworkGatewayConnectionType", + "modelAsString": true + } } } } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualWan.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualWan.json index d27672230c3c..78be5bb5a4a1 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualWan.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/virtualWan.json @@ -2934,18 +2934,6 @@ "modelAsString": true } }, - "Access": { - "type": "string", - "description": "Access to be allowed or denied.", - "enum": [ - "Allow", - "Deny" - ], - "x-ms-enum": { - "name": "Access", - "modelAsString": true - } - }, "OfficeTrafficCategory": { "type": "string", "description": "The office traffic category.", @@ -3361,16 +3349,8 @@ "P2SVpnProfileParameters": { "properties": { "authenticationMethod": { - "type": "string", - "description": "VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'.", - "enum": [ - "EAPTLS", - "EAPMSCHAPv2" - ], - "x-ms-enum": { - "name": "AuthenticationMethod", - "modelAsString": true - } + "$ref": "./network.json#/definitions/AuthenticationMethod", + "description": "VPN client authentication method." } }, "description": "Vpn Client Parameters for package generation" From 65603a6cefa0243d2d481858c4a6c30d01edbd9e Mon Sep 17 00:00:00 2001 From: Anton Evseev Date: Wed, 17 Apr 2019 17:07:34 +0300 Subject: [PATCH 2/2] Remove readOnly from references to definitions that are already marked as read only --- .../stable/2019-02-01/expressRouteCircuit.json | 3 +-- .../stable/2019-02-01/expressRouteGateway.json | 2 -- .../Microsoft.Network/stable/2019-02-01/networkWatcher.json | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json index 99196f41707b..09431f8deb2c 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteCircuit.json @@ -1751,7 +1751,6 @@ "description": "The authorization key." }, "circuitConnectionStatus": { - "readOnly": true, "$ref": "#/definitions/CircuitConnectionStatus", "description": "Express Route Circuit connection state." }, @@ -1818,7 +1817,6 @@ "description": "/29 IP address space to carve out Customer addresses for tunnels." }, "circuitConnectionStatus": { - "readOnly": true, "$ref": "#/definitions/CircuitConnectionStatus", "description": "Express Route Circuit connection state." }, @@ -2233,6 +2231,7 @@ }, "CircuitConnectionStatus": { "type": "string", + "readOnly": true, "description": "Express Route Circuit connection state.", "enum": [ "Connected", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json index ddcedd80b8bc..8c96bae5d5df 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/expressRouteGateway.json @@ -536,7 +536,6 @@ } }, "provisioningState": { - "readOnly": true, "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the resource." }, @@ -585,7 +584,6 @@ ], "properties": { "provisioningState": { - "readOnly": true, "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the resource." }, diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json index e5a8d9fbdd79..25c5340bc93d 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2019-02-01/networkWatcher.json @@ -1935,7 +1935,6 @@ "NetworkWatcherPropertiesFormat": { "properties": { "provisioningState": { - "readOnly": true, "$ref": "./network.json#/definitions/ProvisioningState", "description": "The provisioning state of the resource." }