From 629fbbf13f7178e6ab6714e7e0109d359bb8a957 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Sun, 7 Jan 2018 20:35:11 -0800 Subject: [PATCH 1/4] Added connection monitor apis to network watcher swagger + examples --- ...NetworkWatcherConnectionMonitorCreate.json | 47 ++ .../NetworkWatcherConnectionMonitorGet.json | 35 ++ .../NetworkWatcherConnectionMonitorList.json | 60 ++ .../NetworkWatcherConnectionMonitorQuery.json | 75 +++ .../NetworkWatcherConnectionMonitorStart.json | 13 + .../NetworkWatcherConnectionMonitorStop.json | 13 + .../stable/2017-10-01/networkWatcher.json | 566 ++++++++++++++++++ 7 files changed, 809 insertions(+) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorGet.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorQuery.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json new file mode 100644 index 000000000000..ecb4c8c9855a --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json @@ -0,0 +1,47 @@ +{ + "parameters" : { + "api-version" : "2017-10-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "connectionMonitorName" : "cm1", + "location": "centraluseuap", + "parameters" : { + "properties": { + "source": { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1" + }, + "destination": { + "address": "bing.com", + "port": 80 + }, + "MonitoringIntervalInSeconds": 60 + } + } + }, + "responses" : { + "201" : { + "body" : { + "name" : "cm1", + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1", + "etag" : "W/\"e7497f26-5f09-4559-900b-fe98f3dedb6f\"" + "properties": { + "provisioningState": "Updating", + "source": { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1", + "port": 0 + }, + "destination": { + "address": "bing.com", + "port": 80 + }, + "monitoringIntervalInSeconds": 60, + "autoStart": true, + "monitoringStatus": "NotStarted" + }, + "location": "centraluseuap", + "type": "Microsoft.Network/networkWatchers/connectionMonitors" + } + } + } +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorGet.json new file mode 100644 index 000000000000..4478b9e784d0 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorGet.json @@ -0,0 +1,35 @@ +{ + "parameters" : { + "api-version" : "2017-10-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "connectionMonitorName" : "cm1" + }, + "responses" : { + "200" : { + "body" : { + "name" : "cm1", + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1", + "etag" : "W/\"00000000-0000-0000-0000-000000000000\"", + "properties" : { + "provisioningState" : "Succeeded", + "source": { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1", + "port": 0 + }, + "destination": { + "address": "bing.com", + "port": 80 + }, + "monitoringIntervalInSeconds": 60, + "autoStart": true, + "startTime": "2018-01-08T03:42:33.3387305Z", + "monitoringStatus": "Running" + }, + "location": "centraluseuap", + "type": "Microsoft.Network/networkWatchers/connectionMonitors" + } + } + } +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json new file mode 100644 index 000000000000..1c1282e7ae73 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json @@ -0,0 +1,60 @@ +{ + "parameters" : { + "api-version" : "2017-10-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1" + }, + "responses" : { + "200" : { + "body" : { + "value" : [ + { + "name" : "cm1", + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1", + "etag" : "W/\"00000000-0000-0000-0000-000000000000\"", + "properties" : { + "provisioningState" : "Succeeded", + "source": { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1", + "port": 0 + }, + "destination": { + "address": "bing.com", + "port": 80 + }, + "monitoringIntervalInSeconds": 60, + "autoStart": true, + "startTime": "2018-01-08T03:42:33.3387305Z", + "monitoringStatus": "Running" + }, + "location": "centraluseuap", + "type": "Microsoft.Network/networkWatchers/connectionMonitors" + }, + { + "name" : "cm2", + "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm2", + "etag" : "W/\"00000000-0000-0000-0000-000000000000\"", + "properties" : { + "provisioningState" : "Succeeded", + "source": { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm2", + "port": 0 + }, + "destination": { + "address": "google.com", + "port": 80 + }, + "monitoringIntervalInSeconds": 30, + "autoStart": true, + "startTime": "2018-01-08T05:42:33.3387305Z", + "monitoringStatus": "Running" + }, + "location": "centraluseuap", + "type": "Microsoft.Network/networkWatchers/connectionMonitors" + } + ] + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorQuery.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorQuery.json new file mode 100644 index 000000000000..530f29a5bee3 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorQuery.json @@ -0,0 +1,75 @@ +{ + "parameters" : { + "api-version" : "2017-10-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "connectionMonitorName" : "cm1" + }, + "responses" : { + "200" : { + "body" : { + "states" : [ + { + "connectionState" : "Reachable", + "startTime" : "2018-01-08T03:42:33.3387305Z", + "endTime" : "2018-01-08T05:12:41.5265438Z", + "evaluationState" : "Completed", + "hops" : [ + { + "type" : "Source", + "id" : "7dbbe7aa-60ba-4650-831e-63d775d38e9e", + "address" : "10.1.1.4", + "resourceId" : "subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1", + "nextHopIds" : [ + "75c8d819-b208-4584-a311-1aa45ce753f9" + ], + "issues" : [] + }, + { + "type" : "VirtualNetwork", + "id" : "75c8d819-b208-4584-a311-1aa45ce753f9", + "address" : "192.168.100.4", + "resourceId" : "subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/ipConfigurations/ipconfig1", + "nextHopIds" : [], + "issues" : [] + } + ] + } + ] + } + }, + "202" : { + "body" : { + "states" : [ + { + "connectionState" : "Reachable", + "startTime" : "2018-01-08T03:42:33.3387305Z", + "endTime" : "2018-01-08T05:12:41.5265438Z", + "evaluationState" : "Completed", + "hops" : [ + { + "type" : "Source", + "id" : "7dbbe7aa-60ba-4650-831e-63d775d38e9e", + "address" : "10.1.1.4", + "resourceId" : "subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1", + "nextHopIds" : [ + "75c8d819-b208-4584-a311-1aa45ce753f9" + ], + "issues" : [] + }, + { + "type" : "VirtualNetwork", + "id" : "75c8d819-b208-4584-a311-1aa45ce753f9", + "address" : "192.168.100.4", + "resourceId" : "subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/ipConfigurations/ipconfig1", + "nextHopIds" : [], + "issues" : [] + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json new file mode 100644 index 000000000000..212c6b24e921 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json @@ -0,0 +1,13 @@ +{ + "parameters" : { + "api-version" : "2017-10-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "connectionMonitorName" : "cm1" + }, + "responses" : { + "200" : {}, + "202" : {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json new file mode 100644 index 000000000000..212c6b24e921 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json @@ -0,0 +1,13 @@ +{ + "parameters" : { + "api-version" : "2017-10-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "connectionMonitorName" : "cm1" + }, + "responses" : { + "200" : {}, + "202" : {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json index 21bd9d549790..44da68bc199c 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json @@ -1176,6 +1176,346 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}": { + "put": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_CreateOrUpdate", + "x-ms-long-running-operation": true, + "description": "Create or update a connection monitor.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "name": "connectionMonitorName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the connection monitor." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConnectionMonitor" + }, + "description": "Parameters that define the operation to create a connection monitor." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Update successful. The operation returns the resulting network watcher resource.", + "schema": { + "$ref": "#/definitions/ConnectionMonitorResult" + } + }, + "201": { + "description": "Create successful. The operation returns the resulting network watcher resource.", + "schema": { + "$ref": "#/definitions/ConnectionMonitorResult" + } + } + } + }, + "get": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_Get", + "description": "Gets a connection monitor by name.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "name": "connectionMonitorName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the connection monitor." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns a connection monitor.", + "schema": { + "$ref": "#/definitions/ConnectionMonitorResult" + } + } + } + }, + "delete": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_Delete", + "x-ms-long-running-operation": true, + "description": "Deletes the specified connection monitor.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "name": "connectionMonitorName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the connection monitor." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "204": { + "description": "Delete successful." + }, + "202": { + "description": "Accepted. The operation will complete asynchronously." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop": { + "post": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_Stop", + "x-ms-long-running-operation": true, + "description": "Stops the specified connection monitor.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "name": "connectionMonitorName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the connection monitor." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation stops the connection monitor." + }, + "202": { + "description": "Accepted. The operation will complete asynchronously." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start": { + "post": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_Start", + "x-ms-long-running-operation": true, + "description": "Starts the specified connection monitor.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "name": "connectionMonitorName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the connection monitor." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation starts the connection monitor." + }, + "202": { + "description": "Accepted. The operation will complete asynchronously." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query": { + "post": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_Query", + "x-ms-long-running-operation": true, + "description": "Query a snapshot of the most recent connection states.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "name": "connectionMonitorName", + "in": "path", + "required": true, + "type": "string", + "description": "The name given to the connection monitor." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successful query of connection states.", + "schema": { + "$ref": "#/definitions/ConnectionMonitorQueryResult" + } + }, + "202": { + "description": "Accepted query of connection states.", + "schema": { + "$ref": "#/definitions/ConnectionMonitorQueryResult" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors": { + "get": { + "tags": [ + "ConnectionMonitors" + ], + "operationId": "ConnectionMonitors_List", + "description": "Lists all connection monitors for the specified Network Watcher.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing Network Watcher." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Network Watcher resource." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successful connection monitor enumeration request.", + "schema": { + "$ref": "#/definitions/ConnectionMonitorListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } } }, "definitions": { @@ -2381,6 +2721,232 @@ } }, "description": "City or town details." + }, + "ConnectionMonitor": { + "properties": { + "location": { + "type": "string", + "description": "Connection monitor location." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Connection monitor tags." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ConnectionMonitorParameters" + } + }, + "required": [ + "properties" + ], + "description": "Parameters that define the operation to create a connection monitor." + }, + "ConnectionMonitorParameters": { + "properties": { + "source": { + "$ref": "#/definitions/ConnectionMonitorSource" + }, + "destination": { + "$ref": "#/definitions/ConnectionMonitorDestination" + }, + "autoStart": { + "type": "boolean", + "default": true, + "description": "Determines if the connection monitor will start automatically once created." + }, + "monitoringIntervalInSeconds": { + "type": "integer", + "default": 60, + "description": "Monitoring interval in seconds." + } + }, + "required": [ + "source", + "destination" + ], + "description": "Parameters that define the operation to create a connection monitor." + }, + "ConnectionMonitorSource": { + "properties": { + "resourceId": { + "type": "string", + "description": "The ID of the resource used as the source by connection monitor." + }, + "port": { + "type": "integer", + "description": "The source port used by connection monitor." + } + }, + "required": [ + "resourceId" + ], + "description": "Describes the source of connection monitor." + }, + "ConnectionMonitorDestination": { + "properties": { + "resourceId": { + "type": "string", + "description": "The ID of the resource used as the destination by connection monitor." + }, + "address": { + "type": "string", + "description": "Address of the connection monitor destination (IP or domain name)." + }, + "port": { + "type": "integer", + "description": "The destination port used by connection monitor." + } + }, + "description": "Describes the destination of connection monitor." + }, + "ConnectionMonitorListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ConnectionMonitorResult" + }, + "description": "Information about connection monitors." + } + }, + "description": "List of connection monitors." + }, + "ConnectionMonitorResult": { + "properties": { + "name": { + "readOnly": true, + "type": "string", + "description": "Name of the connection monitor." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "ID of the connection monitor." + }, + "etag": { + "type": "string", + "default": "A unique read-only string that changes whenever the resource is updated." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Connection monitor type." + }, + "location": { + "type": "string", + "description": "Connection monitor location." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Connection monitor tags." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ConnectionMonitorResultProperties" + } + }, + "description": "Information about the connection monitor." + }, + "ConnectionMonitorResultProperties": { + "properties": { + "provisioningState": { + "type": "string", + "enum": [ + "Succeeded", + "Updating", + "Deleting", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "description": "The provisioning state of the connection monitor." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "The date and time when the connection monitor was started." + }, + "monitoringStatus": { + "type": "string", + "description": "The monitoring status of the connection monitor." + } + }, + "allOf": [ + { + "$ref": "#/definitions/ConnectionMonitorParameters" + } + ], + "description": "Describes the properties of a connection monitor." + }, + "ConnectionMonitorQueryResult": { + "properties": { + "states": { + "type": "array", + "items": { + "$ref": "#/definitions/ConnectionStateSnapshot" + }, + "description": "Information about connection states." + } + }, + "description": "List of connection states snaphots." + }, + "ConnectionStateSnapshot": { + "properties": { + "connectionState": { + "type": "string", + "enum": [ + "Reachable", + "Unreachable", + "Unknown" + ], + "x-ms-enum": { + "name": "ConnectionState", + "modelAsString": true + }, + "description": "The connection state." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "The start time of the connection snapshot." + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "The end time of the connection snapshot." + }, + "evaluationState": { + "type": "string", + "enum": [ + "NotStarted", + "InProgress", + "Completed" + ], + "x-ms-enum": { + "name": "EvaluationState", + "modelAsString": true + }, + "description": "Connectivity analysis evaluation state." + }, + "hops": { + "readOnly": true, + "type": "array", + "description": "List of hops between the source and the destination.", + "items": { + "$ref": "#/definitions/ConnectivityHop" + } + } + }, + "description": "Connection state snapshot." } }, "parameters": { From 98994b6685f62633636db9da7dda8335cdf69d10 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Mon, 8 Jan 2018 07:57:16 -0800 Subject: [PATCH 2/4] Fixed examples for connection monitor --- .../examples/NetworkWatcherConnectionMonitorCreate.json | 4 ++-- .../examples/NetworkWatcherConnectionMonitorList.json | 2 +- .../examples/NetworkWatcherConnectionMonitorStart.json | 2 +- .../examples/NetworkWatcherConnectionMonitorStop.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json index ecb4c8c9855a..b6265f0727f7 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorCreate.json @@ -24,8 +24,8 @@ "body" : { "name" : "cm1", "id" : "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1", - "etag" : "W/\"e7497f26-5f09-4559-900b-fe98f3dedb6f\"" - "properties": { + "etag" : "W/\"e7497f26-5f09-4559-900b-fe98f3dedb6f\"", + "properties" : { "provisioningState": "Updating", "source": { "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json index 1c1282e7ae73..ffedd0e21499 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorList.json @@ -57,4 +57,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json index 212c6b24e921..406e4136af36 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStart.json @@ -10,4 +10,4 @@ "200" : {}, "202" : {} } -} +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json index 212c6b24e921..406e4136af36 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/examples/NetworkWatcherConnectionMonitorStop.json @@ -10,4 +10,4 @@ "200" : {}, "202" : {} } -} +} \ No newline at end of file From 486bff2a7636d4ac214cebcc6c948cd3325e1d67 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Mon, 8 Jan 2018 10:37:36 -0800 Subject: [PATCH 3/4] Fixed linter issues. Wdded ref to examples --- .../stable/2017-10-01/networkWatcher.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json index 44da68bc199c..f1d2bb745672 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json @@ -1236,6 +1236,9 @@ "$ref": "#/definitions/ConnectionMonitorResult" } } + }, + "x-ms-examples": { + "Create connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorCreate.json" } } }, "get": { @@ -1280,6 +1283,9 @@ "$ref": "#/definitions/ConnectionMonitorResult" } } + }, + "x-ms-examples": { + "Get connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorGet.json" } } }, "delete": { @@ -1373,6 +1379,9 @@ "description": "Accepted. The operation will complete asynchronously." } } + }, + "x-ms-examples": { + "Stop connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorStop.json" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start": { @@ -1420,6 +1429,9 @@ "description": "Accepted. The operation will complete asynchronously." } } + }, + "x-ms-examples": { + "Start connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorStart.json" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query": { @@ -1473,6 +1485,9 @@ } } } + }, + "x-ms-examples": { + "Query connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorQuery.json" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors": { @@ -1516,6 +1531,9 @@ "nextLinkName": null } } + }, + "x-ms-examples": { + "List connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorList.json" } } }, "definitions": { @@ -2816,6 +2834,7 @@ "description": "List of connection monitors." }, "ConnectionMonitorResult": { + "x-ms-azure-resource": true, "properties": { "name": { "readOnly": true, From 33c589db9e9eaae29a4d4f8e35c5f324986ffc23 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Mon, 8 Jan 2018 10:53:06 -0800 Subject: [PATCH 4/4] Deleted ref to examples --- .../stable/2017-10-01/networkWatcher.json | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json index f1d2bb745672..c47fe0ef9712 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2017-10-01/networkWatcher.json @@ -1236,9 +1236,6 @@ "$ref": "#/definitions/ConnectionMonitorResult" } } - }, - "x-ms-examples": { - "Create connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorCreate.json" } } }, "get": { @@ -1283,9 +1280,6 @@ "$ref": "#/definitions/ConnectionMonitorResult" } } - }, - "x-ms-examples": { - "Get connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorGet.json" } } }, "delete": { @@ -1379,9 +1373,6 @@ "description": "Accepted. The operation will complete asynchronously." } } - }, - "x-ms-examples": { - "Stop connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorStop.json" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start": { @@ -1429,9 +1420,6 @@ "description": "Accepted. The operation will complete asynchronously." } } - }, - "x-ms-examples": { - "Start connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorStart.json" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query": { @@ -1485,9 +1473,6 @@ } } } - }, - "x-ms-examples": { - "Query connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorQuery.json" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors": { @@ -1531,9 +1516,6 @@ "nextLinkName": null } } - }, - "x-ms-examples": { - "List connection monitor": { "$ref": "./examples/NetworkWatcherConnectionMonitorList.json" } } }, "definitions": {