> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace a managed node pool with a new size

> Bearer PAT authentication; RBAC permission `clusters.write`. Requests a blue/green replacement of the node pool with a new instance size: a scheduler job creates a replacement pool with the requested size (same count, labels, taints, zone, and autoscaling), waits for it to become ready, deletes the replaced pool, and rebinds the stored definition to the replacement pool's deterministic name. No managed provider supports in-place pool resizing, so the 202 answer only accepts the intent.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/clusters/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/clusters/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace:
    post:
      tags:
        - Scaleway / Kapsule
      summary: Replace a managed node pool with a new size
      description: >-
        Bearer PAT authentication; RBAC permission `clusters.write`. Requests a
        blue/green replacement of the node pool with a new instance size: a
        scheduler job creates a replacement pool with the requested size (same
        count, labels, taints, zone, and autoscaling), waits for it to become
        ready, deletes the replaced pool, and rebinds the stored definition to
        the replacement pool's deterministic name. No managed provider supports
        in-place pool resizing, so the 202 answer only accepts the intent.
      operationId: managed_replace_pool_pat
      parameters:
        - in: path
          name: provider
          required: true
          schema:
            $ref: '#/components/schemas/ManagedProvider'
        - in: path
          name: cluster_id
          required: true
          schema:
            format: uuid
            type: string
        - in: path
          name: node_pool_name
          required: true
          schema:
            type: string
        - description: PAT organisation override.
          in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedPoolReplaceRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedPoolReplaceResponse'
          description: Replacement accepted
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Invalid request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Unauthenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Permission or CSRF check failed
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Conflicting or unsafe lifecycle state
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Request validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractDetailError'
          description: Provider or internal failure
      security:
        - BearerAuth: []
components:
  schemas:
    ManagedProvider:
      enum:
        - doks
        - uks
        - gke
        - ovh_mks
        - aks
        - eks
        - kapsule
      example: kapsule
      type: string
    ManagedPoolReplaceRequest:
      properties:
        size:
          minLength: 1
          type: string
      required:
        - size
      type: object
    ManagedPoolReplaceResponse:
      properties:
        cluster_id:
          format: uuid
          type: string
        new_size:
          type: string
        node_pool_name:
          type: string
        old_size:
          type: string
        replacement_pool_name:
          type: string
      required:
        - cluster_id
        - node_pool_name
        - replacement_pool_name
        - old_size
        - new_size
      type: object
    ContractDetailError:
      example:
        detail: Cluster not found
      properties:
        detail:
          oneOf:
            - type: string
            - additionalProperties: true
              properties: {}
              type: object
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: PAT
      scheme: bearer
      type: http

````