From a1797dd58e902bc3b592943332d7fa391cc91253 Mon Sep 17 00:00:00 2001 From: Joseph Porter Date: Mon, 14 Dec 2020 15:39:04 -0500 Subject: [PATCH 1/6] Added containerAttach, httpHeaders and timestamp flag --- .../stable/2020-11-01/containerInstance.json | 71 +++++++++++++++++++ .../2020-11-01/examples/ContainerAttach.json | 17 +++++ 2 files changed, 88 insertions(+) create mode 100644 specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2020-11-01/examples/ContainerAttach.json 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..6368d1d835ba 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": "The flag indicating if adding timestamps should be enabled.", + "type": "boolean" } ], "responses": { @@ -596,6 +602,53 @@ } } }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { + "post": { + "operationId": "Container_Attach", + "x-ms-examples": { + "ContainerAttach": { + "$ref": "./examples/ContainerAttach.json" + } + }, + "summary": "Attach to a specific container instance.", + "description": "Attach to 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/ContainerExecResponse" + } + }, + "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,20 @@ } } }, + "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" + } + } + } +} From ba71776913743d4c1530e5b44802e92ea25ce23c Mon Sep 17 00:00:00 2001 From: Joseph Porter Date: Mon, 14 Dec 2020 15:54:35 -0500 Subject: [PATCH 2/6] Fixed resourceGroupName --- .../stable/2020-11-01/containerInstance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6368d1d835ba..aa9cde18534f 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 @@ -602,7 +602,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { "post": { "operationId": "Container_Attach", "x-ms-examples": { From 72c7e4018cdb407e31ab29a455932273bd9245ed Mon Sep 17 00:00:00 2001 From: Joseph Porter Date: Mon, 14 Dec 2020 16:15:37 -0500 Subject: [PATCH 3/6] Removing SDK warning --- .../stable/2020-11-01/containerInstance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 aa9cde18534f..54d400eda66a 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 @@ -604,7 +604,7 @@ }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach": { "post": { - "operationId": "Container_Attach", + "operationId": "Containers_Attach", "x-ms-examples": { "ContainerAttach": { "$ref": "./examples/ContainerAttach.json" From 72f2f18c80f38c508d04c9797b46cb00fa051b23 Mon Sep 17 00:00:00 2001 From: Joseph Porter Date: Tue, 15 Dec 2020 15:25:30 -0500 Subject: [PATCH 4/6] Fixed descriptions and added seperate AttachResponse --- .../stable/2020-11-01/containerInstance.json | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) 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 54d400eda66a..18ef5803b8fd 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 @@ -526,7 +526,7 @@ { "name": "timestamps", "in": "query", - "description": "The flag indicating if adding timestamps should be enabled.", + "description": "If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.", "type": "boolean" } ], @@ -610,8 +610,8 @@ "$ref": "./examples/ContainerAttach.json" } }, - "summary": "Attach to a specific container instance.", - "description": "Attach to a specific container instance in a specified resource group and container group.", + "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" @@ -637,7 +637,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/ContainerExecResponse" + "$ref": "#/definitions/ContainerAttachResponse" } }, "default": { @@ -1763,6 +1763,20 @@ } } }, + "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 ouput stream from the attach." + } + } + }, "HttpHeaders": { "description": "The HTTP headers.", "type": "object", From 991c436e34e5f80c57b096c9dfd8692b6c6405fd Mon Sep 17 00:00:00 2001 From: Joseph Porter Date: Tue, 15 Dec 2020 15:53:14 -0500 Subject: [PATCH 5/6] Updated descriptions --- .../stable/2020-11-01/containerInstance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 18ef5803b8fd..a6e986218284 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 @@ -1773,7 +1773,7 @@ }, "password": { "type": "string", - "description": "The password to the ouput stream from the attach." + "description": "The password to the ouput stream from the attach. Send as an Authorization header value when connecting to the websocketUri." } } }, From f640ce8b42cebcb951aaf35559aed0b27564fc13 Mon Sep 17 00:00:00 2001 From: Joseph Porter Date: Tue, 15 Dec 2020 16:10:42 -0500 Subject: [PATCH 6/6] Spelling fix --- .../stable/2020-11-01/containerInstance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a6e986218284..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 @@ -1773,7 +1773,7 @@ }, "password": { "type": "string", - "description": "The password to the ouput stream from the attach. Send as an Authorization header value when connecting to the websocketUri." + "description": "The password to the output stream from the attach. Send as an Authorization header value when connecting to the websocketUri." } } },