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

# Set Resources Policy

> Update the resources policy configuration to set memory limits.



## OpenAPI

````yaml /sprites/api/openapi.json post /v1/sprites/{name}/policy/resources
openapi: 3.1.0
info:
  title: Sprites API
  version: 0.1.12
  x-sprite-env-version: 0.0.5
servers:
  - url: https://api.sprites.dev
security: []
paths:
  /v1/sprites/{name}/policy/resources:
    post:
      tags:
        - Network Policy
      summary: Set Resources Policy
      description: Update the resources policy configuration to set memory limits.
      operationId: sprite_env_set__resources__policy
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcesPolicyDoc'
        required: true
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request - Invalid request body
        '404':
          description: Not Found - Resource not found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    ResourcesPolicyDoc:
      properties:
        memory:
          oneOf:
            - $ref: '#/components/schemas/ResourcesPolicyMemory'
            - type: 'null'
      required: []
      type: object
    ResourcesPolicyMemory:
      properties:
        autoscale:
          description: 'Enable dynamic memory autoscaling (default: false)'
          type:
            - boolean
            - 'null'
        limit_mb:
          type: integer
      required:
        - limit_mb
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````