From ea55ddb22755871ff44fb5d0e6e80455d4461e7e Mon Sep 17 00:00:00 2001 From: Frank Gao Date: Wed, 29 Jul 2020 13:26:29 -0700 Subject: [PATCH 1/6] Use POST operation for node image version --- .../AgentPoolsUpgradeNodeImageVersion.json | 29 +++++++++++ .../stable/2020-07-01/managedClusters.json | 49 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json new file mode 100644 index 000000000000..a30e21fba826 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2020-07-01", + "subscriptionId": "subid1", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "agentPoolName": "agentpool1" + }, + "responses": { + "202": { + "body": { + "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1", + "name": "agentpool1", + "properties": { + "provisioningState": "UpgradingNodeImageVersion", + "count": 3, + "vmSize": "Standard_DS1_v2", + "maxPods": 110, + "osType": "Linux", + "orchestratorVersion": "1.9.6", + "nodeImageVersion": "AKSUbuntu-1604-2020.03.11", + "upgradeSettings": { + "maxSurge": "33%" + } + } + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json index 478cf10149e0..d7ce4d9eeb7a 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json @@ -1226,6 +1226,54 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion": { + "post": { + "tags": [ + "AgentPools" + ], + "operationId": "ManagedClusters_UpgradeNodeImageVersion", + "summary": "Upgrade node image version of an agent pool to the latest.", + "description": "Upgrade node image version of an agent pool to the latest.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "agentPoolName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the agent pool." + } + ], + "responses": { + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Reset Service Principal Profile": { + "$ref": "./examples/AgentPoolsUpgradeNodeImageVersion.json" + } + } + } } }, "definitions": { @@ -1691,6 +1739,7 @@ "description": "Version of orchestrator specified when creating the managed cluster." }, "nodeImageVersion": { + "readOnly": true, "type": "string", "description": "Version of node image" }, From 2c5010c644552149eebc74fce87f39ec9031c7df Mon Sep 17 00:00:00 2001 From: Frank Gao Date: Wed, 29 Jul 2020 13:34:04 -0700 Subject: [PATCH 2/6] remove readonly property NodeImageVersion from request --- .../2020-07-01/examples/ManagedClustersCreate_Update.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_Update.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_Update.json index d4d626b6cc27..ae067af5d51d 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_Update.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_Update.json @@ -30,8 +30,7 @@ "3" ], "enableNodePublicIP": true, - "mode": "System", - "nodeImageVersion": "AKSUbuntu:1604:2020.03.11" + "mode": "System" } ], "linuxProfile": { From cec4662ea323a2ac4da54cd462d55d35b1e780c1 Mon Sep 17 00:00:00 2001 From: Frank Gao Date: Wed, 29 Jul 2020 13:35:47 -0700 Subject: [PATCH 3/6] updated scenario name --- .../stable/2020-07-01/examples/ManagedClustersCreate_PPG.json | 1 - .../examples/ManagedClustersCreate_UpdateWithAHUB.json | 3 +-- .../ManagedClustersCreate_UpdateWithEnableAzureRBAC.json | 3 +-- .../stable/2020-07-01/managedClusters.json | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_PPG.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_PPG.json index 0be1e69526d7..d13c0a2cfdba 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_PPG.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_PPG.json @@ -26,7 +26,6 @@ "type": "VirtualMachineScaleSets", "enableNodePublicIP": true, "mode": "System", - "nodeImageVersion": "AKSUbuntu:1604:2020.03.11", "proximityPlacementGroupID": "/subscriptions/subid1/resourcegroups/rg1/providers//Microsoft.Compute/proximityPlacementGroups/ppg1" } ], diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithAHUB.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithAHUB.json index c938c6176721..07220a608e8d 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithAHUB.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithAHUB.json @@ -30,8 +30,7 @@ "3" ], "enableNodePublicIP": true, - "mode": "System", - "nodeImageVersion": "AKSUbuntu:1604:2020.03.11" + "mode": "System" } ], "linuxProfile": { diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json index 2572e869d209..e3fd532bc1bf 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json @@ -30,8 +30,7 @@ "3" ], "enableNodePublicIP": true, - "mode": "System", - "nodeImageVersion": "AKSUbuntu:1604:2020.03.11" + "mode": "System" } ], "linuxProfile": { diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json index d7ce4d9eeb7a..0acfe1ec2110 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json @@ -1269,7 +1269,7 @@ }, "x-ms-long-running-operation": true, "x-ms-examples": { - "Reset Service Principal Profile": { + "Upgrade Agent Pool Node Image Version": { "$ref": "./examples/AgentPoolsUpgradeNodeImageVersion.json" } } From cc13555bbcd8ed38f8c48f54c14eac2fab5cc70e Mon Sep 17 00:00:00 2001 From: Frank Gao Date: Wed, 29 Jul 2020 13:54:59 -0700 Subject: [PATCH 4/6] Add response schema --- .../stable/2020-07-01/managedClusters.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json index 0acfe1ec2110..26dca5f37b82 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json @@ -1258,7 +1258,10 @@ ], "responses": { "202": { - "description": "Accepted" + "description": "Accepted", + "schema": { + "$ref": "#/definitions/AgentPool" + } }, "default": { "description": "Error response describing why the operation failed.", From 985c18c54d8c79ec495969ff70cb39e1354ab387 Mon Sep 17 00:00:00 2001 From: Frank Gao Date: Wed, 29 Jul 2020 13:58:27 -0700 Subject: [PATCH 5/6] it must has a terminal state --- .../stable/2020-07-01/managedClusters.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json index 26dca5f37b82..14b7db1b5c8d 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/managedClusters.json @@ -1257,6 +1257,9 @@ } ], "responses": { + "200": { + "description": "OK" + }, "202": { "description": "Accepted", "schema": { From 920a122e8d35667c324751ee6c85de57572c90d1 Mon Sep 17 00:00:00 2001 From: Frank Gao Date: Wed, 29 Jul 2020 14:03:33 -0700 Subject: [PATCH 6/6] add missing response in the example --- .../2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json index a30e21fba826..2c069e0f7d05 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-07-01/examples/AgentPoolsUpgradeNodeImageVersion.json @@ -7,6 +7,7 @@ "agentPoolName": "agentpool1" }, "responses": { + "200": {}, "202": { "body": { "id": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1",