From d44e0b946cb109aa4af0de6af2f7385dcf48745e Mon Sep 17 00:00:00 2001 From: Anders Liu Date: Tue, 31 Jul 2018 11:45:07 -0700 Subject: [PATCH 1/2] Add Contaienr Group Stop and Restart API --- .../stable/2018-06-01/containerInstance.json | 63 +++++++++++++++++++ .../examples/ContainerGroupsRestart.json | 11 ++++ .../examples/ContainerGroupsStop.json | 11 ++++ 3 files changed, 85 insertions(+) create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsRestart.json create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsStop.json diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/containerInstance.json index 5f3b86bffe07..e51d70f2cee9 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/containerInstance.json @@ -259,6 +259,69 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart": { + "post": { + "operationId": "ContainerGroups_Restart", + "x-ms-examples": { + "ContainerRestart": { + "$ref": "./examples/ContainerGroupsRestart.json" + } + }, + "summary": "Restarts all containers in a container group.", + "description": "Restarts all containers in a contaienr group in place. If container image has updates, new image will be downloaded.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ContainerGroupNameParameter" + } + ], + "responses": { + "204": { + "description": "NoContent" + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop": { + "post": { + "operationId": "ContainerGroups_Stop", + "x-ms-examples": { + "ContainerStop": { + "$ref": "./examples/ContainerGroupsStop.json" + } + }, + "summary": "Stops all containers in a container group.", + "description": "Stops all containers in a contaienr group. Compute resources will be deallocated and billing will stop.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ContainerGroupNameParameter" + } + ], + "responses": { + "204": { + "description": "NoContent" + } + } + } + }, "/providers/Microsoft.ContainerInstance/operations": { "get": { "tags": [ diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsRestart.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsRestart.json new file mode 100644 index 000000000000..1ea56910bf0d --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsRestart.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2018-06-01", + "resourceGroupName": "demo", + "containerGroupName": "demo1" + }, + "responses": { + "204": {} + } + } \ No newline at end of file diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsStop.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsStop.json new file mode 100644 index 000000000000..1ea56910bf0d --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsStop.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2018-06-01", + "resourceGroupName": "demo", + "containerGroupName": "demo1" + }, + "responses": { + "204": {} + } + } \ No newline at end of file From 130558caf04982e77015ceb76133473847b3f061 Mon Sep 17 00:00:00 2001 From: Anders Liu Date: Tue, 31 Jul 2018 12:09:53 -0700 Subject: [PATCH 2/2] Fix errors in container group update example --- .../stable/2018-06-01/examples/ContainerGroupsUpdate.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsUpdate.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsUpdate.json index a99e645d3220..78cea62bd9ff 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsUpdate.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-06-01/examples/ContainerGroupsUpdate.json @@ -18,11 +18,11 @@ "location": "WestUs", "name": "demo1", "type": "Microsoft.ContainerInstance/containerGroups", + "tags": { + "tag1key": "tag1Value", + "tag2key": "tag2Value" + }, "properties": { - "tags": { - "tag1key": "tag1Value", - "tag2key": "tag2Value" - }, "containers": [ { "name": "demo1",