diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/containerInstance.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/containerInstance.json index f50953347f13..ccc9d8b60a90 100644 --- a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/containerInstance.json +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/containerInstance.json @@ -522,6 +522,12 @@ "in": "query", "description": "The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb.", "type": "integer" + }, + { + "name": "timestamps", + "in": "query", + "description": "If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.", + "type": "boolean" } ], "responses": { @@ -596,6 +602,53 @@ } } }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { + "post": { + "operationId": "Containers_Attach", + "x-ms-examples": { + "ContainerAttach": { + "$ref": "./examples/ContainerAttach.json" + } + }, + "summary": "Attach to the output of a specific container instance.", + "description": "Attach to the output stream of a specific 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" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ContainerAttachResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages": { "get": { "operationId": "Location_ListCachedImages", @@ -1089,6 +1142,10 @@ "name": "Scheme", "modelAsString": true } + }, + "httpHeaders": { + "description": "The HTTP headers.", + "$ref": "#/definitions/HttpHeaders" } }, "required": [ @@ -1706,6 +1763,34 @@ } } }, + "ContainerAttachResponse": { + "description": "The information for the output stream from container attach.", + "type": "object", + "properties": { + "webSocketUri": { + "type": "string", + "description": "The uri for the output stream from the attach." + }, + "password": { + "type": "string", + "description": "The password to the output stream from the attach. Send as an Authorization header value when connecting to the websocketUri." + } + } + }, + "HttpHeaders": { + "description": "The HTTP headers.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The header name." + }, + "value": { + "type": "string", + "description": "The header value." + } + } + }, "DnsConfiguration": { "description": "DNS configuration for the container group.", "type": "object", diff --git a/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/examples/ContainerAttach.json b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/examples/ContainerAttach.json new file mode 100644 index 000000000000..d5766b114cd5 --- /dev/null +++ b/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/examples/ContainerAttach.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2020-11-01", + "resourceGroupName": "demo", + "containerGroupName": "demo1", + "containerName": "container1" + }, + "responses": { + "200": { + "body": { + "webSocketUri": "wss://web-socket-uri", + "password": "password" + } + } + } +}