Skip to content

Commit

Permalink
Add Contaienr Group Stop and Restart API (#3556)
Browse files Browse the repository at this point in the history
* Add Contaienr Group Stop and Restart API

* Fix errors in container group update example
  • Loading branch information
yangl900 authored and dsgouda committed Jul 31, 2018
1 parent 41a1394 commit 4116dfc
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"subscriptionId": "subid",
"api-version": "2018-06-01",
"resourceGroupName": "demo",
"containerGroupName": "demo1"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"subscriptionId": "subid",
"api-version": "2018-06-01",
"resourceGroupName": "demo",
"containerGroupName": "demo1"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4116dfc

Please sign in to comment.