diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/examples/AgentPoolsDeleteMachines.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/examples/AgentPoolsDeleteMachines.json new file mode 100644 index 000000000000..aa9c04508594 --- /dev/null +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/examples/AgentPoolsDeleteMachines.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-10-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1", + "resourceName": "clustername1", + "agentPoolName": "agentpool1", + "machines": { + "machineNames": [ + "aks-nodepool1-42263519-vmss00000a", + "aks-nodepool1-42263519-vmss00000b" + ] + } + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid1/providers/Microsoft.ContainerService/locations/eastus/operationresults/00000000-0000-0000-0000-000000000000?api-version=2017-08-31" + } + } + } +} diff --git a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/managedClusters.json b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/managedClusters.json index 61f132aed4d1..d25d20fad1ce 100644 --- a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/managedClusters.json +++ b/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-10-02-preview/managedClusters.json @@ -1348,6 +1348,64 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines": { + "post": { + "tags": [ + "AgentPools" + ], + "operationId": "AgentPools_DeleteMachines", + "summary": "Deletes specific machines in an agent pool.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/AgentPoolNameParameter" + }, + { + "name": "machines", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AgentPoolDeleteMachinesParameter" + }, + "description": "A list of machines from the agent pool to be deleted." + } + ], + "responses": { + "202": { + "description": "Accepted", + "headers": { + "Location": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete Specific Machines in an Agent Pool": { + "$ref": "./examples/AgentPoolsDeleteMachines.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines": { "get": { "tags": [ @@ -8836,6 +8894,22 @@ "description": "Once the mode it set to Auto, it cannot be changed back to Manual." } } + }, + "AgentPoolDeleteMachinesParameter": { + "type": "object", + "properties": { + "machineNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The agent pool machine names." + } + }, + "required": [ + "machineNames" + ], + "description": "Specifies a list of machine names from the agent pool to be deleted." } }, "parameters": {