Firecracker Mmds API

The Mmds API from Firecracker — 2 operation(s) for mmds.

OpenAPI Specification

firecracker-mmds-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Firecracker Actions Mmds API
  description: RESTful public-facing API. The API is accessible through HTTP calls on specific URLs carrying JSON modeled data. The transport medium is a Unix Domain Socket.
  version: 1.16.0-dev
  termsOfService: ''
  contact:
    email: firecracker-maintainers@amazon.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
host: localhost
basePath: /
schemes:
- http
consumes:
- application/json
produces:
- application/json
tags:
- name: Mmds
paths:
  /mmds:
    put:
      summary: Creates a MMDS (Microvm Metadata Service) data store.
      operationId: putMmds
      parameters:
      - name: body
        in: body
        description: The MMDS data store as JSON.
        schema:
          $ref: '#/definitions/MmdsContentsObject'
      responses:
        204:
          description: MMDS data store created/updated.
        400:
          description: MMDS data store cannot be created due to bad input.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
      tags:
      - Mmds
    patch:
      summary: Updates the MMDS data store.
      operationId: patchMmds
      parameters:
      - name: body
        in: body
        description: The MMDS data store patch JSON.
        schema:
          $ref: '#/definitions/MmdsContentsObject'
      responses:
        204:
          description: MMDS data store updated.
        400:
          description: MMDS data store cannot be updated due to bad input.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
      tags:
      - Mmds
    get:
      summary: Get the MMDS data store.
      operationId: getMmds
      responses:
        200:
          description: The MMDS data store JSON.
          schema:
            type: object
            additionalProperties: true
        404:
          description: The MMDS data store content can not be found.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
      tags:
      - Mmds
  /mmds/config:
    put:
      summary: Set MMDS configuration. Pre-boot only.
      operationId: putMmdsConfig
      description: Configures MMDS version, IPv4 address used by the MMDS network stack and interfaces that allow MMDS requests.
      parameters:
      - name: body
        in: body
        description: The MMDS configuration as JSON.
        required: true
        schema:
          $ref: '#/definitions/MmdsConfig'
      responses:
        204:
          description: MMDS configuration was created/updated.
        400:
          description: MMDS configuration cannot be updated due to bad input.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: Internal server error
          schema:
            $ref: '#/definitions/Error'
      tags:
      - Mmds
definitions:
  MmdsConfig:
    type: object
    description: Defines the MMDS configuration.
    required:
    - network_interfaces
    properties:
      version:
        description: Enumeration indicating the MMDS version to be configured.
        type: string
        enum:
        - V1
        - V2
        default: V1
      network_interfaces:
        description: List of the network interface IDs capable of forwarding packets to the MMDS. Network interface IDs mentioned must be valid at the time of this request. The net device model will reply to HTTP GET requests sent to the MMDS address via the interfaces mentioned. In this case, both ARP requests and TCP segments heading to `ipv4_address` are intercepted by the device model, and do not reach the associated TAP device.
        type: array
        items:
          type: string
      ipv4_address:
        type: string
        format: 169.254.([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4]).([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])
        default: 169.254.169.254
        description: A valid IPv4 link-local address.
      imds_compat:
        type: boolean
        description: MMDS operates compatibly with EC2 IMDS (i.e. responds "text/plain" content regardless of Accept header in requests).
        default: false
  Error:
    type: object
    properties:
      fault_message:
        type: string
        description: A description of the error condition
        readOnly: true
  MmdsContentsObject:
    type: object
    description: Describes the contents of MMDS in JSON format.
    additionalProperties: true