diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/containerInstance.json index 1255caeaab4c..673543793ad0 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/containerInstance.json @@ -179,7 +179,8 @@ "$ref": "#/definitions/ContainerGroup" } } - } + }, + "x-ms-long-running-operation": true }, "patch": { "operationId": "ContainerGroups_Update", @@ -206,6 +207,7 @@ { "name": "Resource", "description": "The container group resource with just the tags to be updated.", + "required": true, "in": "body", "schema": { "$ref": "#/definitions/Resource" @@ -360,6 +362,56 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec": { + "post": { + "operationId": "StartContainer_LaunchExec", + "x-ms-examples": { + "ContainerExecStart": { + "$ref": "./examples/ContainerExecStart.json" + } + }, + "summary": "Starts the exec command for a specific container instance.", + "description": "Starts the exec command for a specified container instance in a specified resource group and container group.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ContainerGroupNameParameter" + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the container instance.", + "required": true, + "type": "string" + }, + { + "name":"containerExecRequest", + "in":"body", + "description":"The request for the exec command.", + "required":true, + "schema":{ + "$ref":"#/definitions/ContainerExecRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ContainerExecResponse" + } + } + } + } } }, "definitions": { @@ -1057,6 +1109,44 @@ } } }, + "ContainerExecRequest": { + "description": "The start container exec request.", + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The command to be executed." + }, + "terminalSize": { + "type": "object", + "description": "The size of the terminal.", + "properties": { + "row":{ + "type": "integer", + "description": "The row size of the terminal" + }, + "column": { + "type": "integer", + "description": "The column size of the terminal" + } + } + } + } + }, + "ContainerExecResponse": { + "description": "The information for the container exec command.", + "type": "object", + "properties": { + "webSocketUri": { + "type": "string", + "description": "The uri for the exec websocket." + }, + "password": { + "type": "string", + "description": "The password to start the exec command." + } + } + }, "Resource": { "type": "object", "description": "The Resource model definition.", @@ -1131,6 +1221,14 @@ "type": "string", "description": "The name of the container group.", "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The operation Id.", + "x-ms-parameter-location": "method" } } } diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/examples/ContainerExecStart.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/examples/ContainerExecStart.json new file mode 100644 index 000000000000..f1136352bed8 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/examples/ContainerExecStart.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2018-02-01-preview", + "resourceGroupName": "demo", + "containerGroupName": "demo1", + "containerName": "container1", + "containerExecRequest": { + "command": "/bin/bash", + "terminalSize": { + "row": 12, + "column": 12 + } + } + }, + "responses": { + "200": { + "body": { + "webSocketUri": "wss://web-socket-uri", + "password": "password" + } + } + } + } \ No newline at end of file diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/examples/ContainerGroupAsyncOperation.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/examples/ContainerGroupAsyncOperation.json new file mode 100644 index 000000000000..29475e5348c5 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2018-02-01-preview/examples/ContainerGroupAsyncOperation.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "subid", + "location": "westcentralus", + "operationId": "operationId", + "api-version": "2018-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1", + "status": "Creating" + } + } + } + } + \ No newline at end of file diff --git a/specification/containerinstance/resource-manager/readme.md b/specification/containerinstance/resource-manager/readme.md index 9709cab633a3..06ac2b7cf2fe 100644 --- a/specification/containerinstance/resource-manager/readme.md +++ b/specification/containerinstance/resource-manager/readme.md @@ -115,7 +115,7 @@ python: payload-flattening-threshold: 2 namespace: azure.mgmt.containerinstance package-name: azure-mgmt-containerinstance - package-version: 0.2.0 + package-version: 0.4.0 clear-output-folder: true ``` ``` yaml $(python) && $(python-mode) == 'update'