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

# Replace Container Instance Deletion Cost

> Replaces the deletion cost of the current container instance

*Last Updated: May 10, 2025*


## OpenAPI

````yaml salad-cloud-imds put /v1/deletion-cost
openapi: 3.1.0
info:
  title: SaladCloud IMDS
  description: >-
    The SaladCloud Instance Metadata Service (IMDS). Please refer to the
    [SaladCloud API Documentation](https://docs.salad.com/reference) for more
    details.
  termsOfService: https://salad.com/terms
  contact:
    name: SaladCloud Support
    url: https://salad.com
    email: cloud@salad.com
  license:
    name: MIT
  version: 0.9.0-alpha.3
servers:
  - url: http://169.254.169.254
security: []
tags:
  - name: metadata
    description: Instance Metadata Service
paths:
  /v1/deletion-cost:
    summary: Container Instance Deletion Cost
    description: >-
      Operations to get or replace the deletion cost of the current container
      instance
    put:
      tags:
        - metadata
      summary: Replace Container Instance Deletion Cost
      description: Replaces the deletion cost of the current container instance
      operationId: replace_deletion_cost
      parameters:
        - $ref: '#/components/parameters/Metadata'
      requestBody:
        $ref: '#/components/requestBodies/ReplaceDeletionCost'
      responses:
        '204':
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        default:
          $ref: '#/components/responses/UnknownError'
components:
  parameters:
    Metadata:
      name: Metadata
      in: header
      description: A custom request header required by all operations.
      required: true
      schema:
        type: string
        const: 'true'
  requestBodies:
    ReplaceDeletionCost:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DeletionCost'
  responses:
    '204':
      description: No Content
    '400':
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/SaladCloudImdsError'
    '403':
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/SaladCloudImdsError'
    '404':
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/SaladCloudImdsError'
    UnknownError:
      description: Unknown Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/SaladCloudImdsError'
  schemas:
    DeletionCost:
      description: The deletion cost of the current container instance.
      type: object
      properties:
        deletion_cost:
          description: >-
            An integer value that identifies the relative cost to the
            application running across the container group if the current
            container instance is deleted. A higher value indicates a higher
            cost, and a lower value indicates a lower cost. If the container
            group is scaled down, the scheduler will attempt to delete the
            container instances with the lowest deletion costs first.
          type: integer
          format: int32
          examples:
            - 100
          maximum: 2147483647
          minimum: -2147483648
      required:
        - deletion_cost
    SaladCloudImdsError:
      type: object
      description: >-
        An API error. The `code` and `type` uniquely identify the type of the
        error. The `code` is a short value that may be used for programmatic
        error handling. The `type` is an absolute URL that may be resolved for
        more detailed information. Refer to the [SaladCloud IMDS
        reference](https://leaf.salad.com/l/saladcloud-imds-errors) for a list
        of the expected `code` and `type` values. Also, note that all properties
        are optional. Clients should implement robust error handling to account
        for unexpected errors.
      properties:
        code:
          type: string
          description: >-
            The error code that identifies the error type. This is a short value
            that may be used for programmatic error handling.
          examples:
            - container-not-found
          maxLength: 100
          minLength: 1
        detail:
          type: string
          description: >-
            The human-readable explanation specific to this occurrence of the
            error.
          examples:
            - The container instance could not be found.
          maxLength: 10000
          minLength: 1
        errors:
          $ref: '#/components/schemas/SaladCloudImdsPropertyError'
        instance:
          type: string
          format: url
          description: >-
            The URI reference that identifies the specific occurrence of the
            error.
          examples:
            - https://leaf.salad.com/i/5e76d3ae-6660-444e-a7c4-7a3999023fb6
          maxLength: 2048
          minLength: 1
        status:
          type: integer
          format: int32
          description: >-
            The HTTP status code generated by the origin server for this
            occurrence of the error.
          examples:
            - 404
          maximum: 599
          minimum: 100
        title:
          type: string
          description: The short, human-readable summary of the error type.
          examples:
            - Not Found
          maxLength: 10000
          minLength: 1
        type:
          description: The URI reference that identifies the error type.
          type: string
          format: url
          default: about:blank
          examples:
            - https://leaf.salad.com/e/container-group-not-found
          maxLength: 2048
          minLength: 1
    SaladCloudImdsPropertyError:
      type: object
      description: >-
        The contextualized map of human-readable explanations specific to this
        occurrence of the error. This is often used to provide property-specific
        errors, such as validation errors. In these scenarios, the key is the
        property name and the value is an array of human-readable explanations
        specific to this property and this occurrence of the error.
      additionalProperties:
        type: array
        items:
          type: string
          description: >-
            The human-readable explanation specific to this occurrence of the
            error.
          examples:
            - The container instance could not be found.
          maxLength: 10000
          minLength: 1
        maxItems: 200
        minItems: 0
      maxProperties: 200
      minProperties: 0

````