Skip to content

Commit

Permalink
Add Delete Machines API (#26420)
Browse files Browse the repository at this point in the history
* impl

* fix

* fix

* fix

* fix

* fix
  • Loading branch information
xuexu6666 committed Oct 30, 2023
1 parent 3786d86 commit d1b6499
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -8912,6 +8970,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": {
Expand Down

0 comments on commit d1b6499

Please sign in to comment.