Amazon ECS Task Definitions API

Operations for managing ECS task definitions

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

amazon-ecs-task-definitions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon ECS Amazon Elastic Container Service (ECS) Capacity Providers Task Definitions API
  description: Amazon Elastic Container Service (Amazon ECS) is a fully managed container orchestration service that makes it easy to deploy, manage, and scale containerized applications. The Amazon ECS API uses an RPC model where all actions are routed to a single endpoint via POST with an X-Amz-Target header specifying the action. This specification models the core ECS resource operations for clusters, services, tasks, and task definitions.
  version: '2014-11-13'
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/ecs/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-apisguru-categories:
  - cloud
  x-logo:
    url: https://aws.amazon.com/favicon.ico
  x-origin:
  - format: openapi
    url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/Welcome.html
    version: '3.1'
servers:
- url: https://ecs.{region}.amazonaws.com
  description: Amazon ECS regional endpoint
  variables:
    region:
      default: us-east-1
      description: AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-north-1
      - ap-southeast-1
      - ap-southeast-2
      - ap-northeast-1
      - ap-northeast-2
      - ap-south-1
      - sa-east-1
      - ca-central-1
security:
- aws_sig_v4: []
tags:
- name: Task Definitions
  description: Operations for managing ECS task definitions
  externalDocs:
    url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RegisterTaskDefinition.html
paths:
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.RegisterTaskDefinition:
    post:
      operationId: RegisterTaskDefinition
      summary: Amazon Ecs Register a New Task Definition
      description: Registers a new task definition from the supplied family and container definitions. You can also register task definitions with a volumes parameter for data volumes used by the task containers.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RegisterTaskDefinition.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/RegisterTaskDefinitionRequest'
            examples:
              RegistertaskdefinitionRequestExample:
                summary: Default RegisterTaskDefinition request
                x-microcks-default: true
                value:
                  family: example_value
                  containerDefinitions:
                  - name: Example Title
                    image: example_value
                    cpu: 10
                    memory: 10
                    memoryReservation: 10
                    links: {}
                    portMappings: {}
                    essential: true
                    entryPoint: {}
                    command: {}
                    environment: {}
                    environmentFiles: {}
                    mountPoints: {}
                    volumesFrom: {}
                    secrets: {}
                    dependsOn: {}
                    startTimeout: 10
                    stopTimeout: 10
                    hostname: example_value
                    user: example_value
                    workingDirectory: example_value
                    disableNetworking: true
                    privileged: true
                    readonlyRootFilesystem: true
                    dnsServers: {}
                    dnsSearchDomains: {}
                    extraHosts: {}
                    dockerSecurityOptions: {}
                    interactive: true
                    pseudoTerminal: true
                    dockerLabels: example_value
                    ulimits: {}
                    systemControls: {}
                    resourceRequirements: {}
                    firelensConfiguration: {}
                    repositoryCredentials: {}
                    restartPolicy: {}
                    credentialSpecs: {}
                  taskRoleArn: example_value
                  executionRoleArn: example_value
                  networkMode: bridge
                  volumes:
                  - name: Example Title
                    host: {}
                    dockerVolumeConfiguration: {}
                    efsVolumeConfiguration: {}
                    fsxWindowsFileServerVolumeConfiguration: {}
                  placementConstraints:
                  - type: memberOf
                    expression: example_value
                  requiresCompatibilities:
                  - EC2
                  cpu: example_value
                  memory: example_value
                  tags:
                  - key: example_value
                    value: example_value
                  pidMode: host
                  ipcMode: host
                  proxyConfiguration:
                    type: APPMESH
                    containerName: example_value
                    properties:
                    - {}
                  inferenceAccelerators:
                  - deviceName: example_value
                    deviceType: example_value
                  ephemeralStorage:
                    sizeInGiB: 10
                  runtimePlatform:
                    cpuArchitecture: X86_64
                    operatingSystemFamily: LINUX
                  enableFaultInjection: true
      responses:
        '200':
          description: Task definition registered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskDefinition:
                    $ref: '#/components/schemas/TaskDefinition'
                  tags:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tag'
              examples:
                Registertaskdefinition200Example:
                  summary: Default RegisterTaskDefinition 200 response
                  x-microcks-default: true
                  value:
                    taskDefinition:
                      taskDefinitionArn: example_value
                      containerDefinitions:
                      - {}
                      family: example_value
                      taskRoleArn: example_value
                      executionRoleArn: example_value
                      networkMode: bridge
                      revision: 10
                      volumes:
                      - {}
                      status: ACTIVE
                      requiresAttributes:
                      - name: Example Title
                        value: example_value
                        targetType: example_value
                        targetId: '500123'
                      placementConstraints:
                      - {}
                      compatibilities:
                      - EC2
                      requiresCompatibilities:
                      - EC2
                      cpu: example_value
                      memory: example_value
                      pidMode: host
                      ipcMode: host
                      proxyConfiguration:
                        type: APPMESH
                        containerName: example_value
                        properties: {}
                      inferenceAccelerators:
                      - {}
                      ephemeralStorage:
                        sizeInGiB: 10
                      runtimePlatform:
                        cpuArchitecture: X86_64
                        operatingSystemFamily: LINUX
                      registeredAt: 42.5
                      deregisteredAt: 42.5
                      registeredBy: example_value
                      enableFaultInjection: true
                      tags:
                      - {}
                    tags:
                    - key: example_value
                      value: example_value
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.DeregisterTaskDefinition:
    post:
      operationId: DeregisterTaskDefinition
      summary: Amazon Ecs Deregister a Task Definition
      description: Deregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as INACTIVE.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterTaskDefinition.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              required:
              - taskDefinition
              properties:
                taskDefinition:
                  type: string
                  description: The family and revision (family:revision) or full ARN of the task definition to deregister.
            examples:
              DeregistertaskdefinitionRequestExample:
                summary: Default DeregisterTaskDefinition request
                x-microcks-default: true
                value:
                  taskDefinition: example_value
      responses:
        '200':
          description: Task definition deregistered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskDefinition:
                    $ref: '#/components/schemas/TaskDefinition'
              examples:
                Deregistertaskdefinition200Example:
                  summary: Default DeregisterTaskDefinition 200 response
                  x-microcks-default: true
                  value:
                    taskDefinition:
                      taskDefinitionArn: example_value
                      containerDefinitions:
                      - {}
                      family: example_value
                      taskRoleArn: example_value
                      executionRoleArn: example_value
                      networkMode: bridge
                      revision: 10
                      volumes:
                      - {}
                      status: ACTIVE
                      requiresAttributes:
                      - name: Example Title
                        value: example_value
                        targetType: example_value
                        targetId: '500123'
                      placementConstraints:
                      - {}
                      compatibilities:
                      - EC2
                      requiresCompatibilities:
                      - EC2
                      cpu: example_value
                      memory: example_value
                      pidMode: host
                      ipcMode: host
                      proxyConfiguration:
                        type: APPMESH
                        containerName: example_value
                        properties: {}
                      inferenceAccelerators:
                      - {}
                      ephemeralStorage:
                        sizeInGiB: 10
                      runtimePlatform:
                        cpuArchitecture: X86_64
                        operatingSystemFamily: LINUX
                      registeredAt: 42.5
                      deregisteredAt: 42.5
                      registeredBy: example_value
                      enableFaultInjection: true
                      tags:
                      - {}
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.DescribeTaskDefinition:
    post:
      operationId: DescribeTaskDefinition
      summary: Amazon Ecs Describe a Task Definition
      description: Describes a task definition. You can specify a family and revision to find information about a specific task definition, or you can simply specify the family to find the latest ACTIVE revision in that family.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTaskDefinition.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              required:
              - taskDefinition
              properties:
                taskDefinition:
                  type: string
                  description: The family and revision or full ARN of the task definition to describe.
                include:
                  type: array
                  items:
                    type: string
                    enum:
                    - TAGS
            examples:
              DescribetaskdefinitionRequestExample:
                summary: Default DescribeTaskDefinition request
                x-microcks-default: true
                value:
                  taskDefinition: example_value
                  include:
                  - TAGS
      responses:
        '200':
          description: Task definition described successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskDefinition:
                    $ref: '#/components/schemas/TaskDefinition'
                  tags:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tag'
              examples:
                Describetaskdefinition200Example:
                  summary: Default DescribeTaskDefinition 200 response
                  x-microcks-default: true
                  value:
                    taskDefinition:
                      taskDefinitionArn: example_value
                      containerDefinitions:
                      - {}
                      family: example_value
                      taskRoleArn: example_value
                      executionRoleArn: example_value
                      networkMode: bridge
                      revision: 10
                      volumes:
                      - {}
                      status: ACTIVE
                      requiresAttributes:
                      - name: Example Title
                        value: example_value
                        targetType: example_value
                        targetId: '500123'
                      placementConstraints:
                      - {}
                      compatibilities:
                      - EC2
                      requiresCompatibilities:
                      - EC2
                      cpu: example_value
                      memory: example_value
                      pidMode: host
                      ipcMode: host
                      proxyConfiguration:
                        type: APPMESH
                        containerName: example_value
                        properties: {}
                      inferenceAccelerators:
                      - {}
                      ephemeralStorage:
                        sizeInGiB: 10
                      runtimePlatform:
                        cpuArchitecture: X86_64
                        operatingSystemFamily: LINUX
                      registeredAt: 42.5
                      deregisteredAt: 42.5
                      registeredBy: example_value
                      enableFaultInjection: true
                      tags:
                      - {}
                    tags:
                    - key: example_value
                      value: example_value
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.ListTaskDefinitions:
    post:
      operationId: ListTaskDefinitions
      summary: Amazon Ecs List Task Definitions
      description: Returns a list of task definitions that are registered to your account. You can filter by family name to find all revisions for a specific family.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTaskDefinitions.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: false
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              properties:
                familyPrefix:
                  type: string
                  description: Filter by family name prefix.
                status:
                  type: string
                  enum:
                  - ACTIVE
                  - INACTIVE
                  - DELETE_IN_PROGRESS
                  description: Filter by task definition status.
                sort:
                  type: string
                  enum:
                  - ASC
                  - DESC
                  description: Sort order for results.
                maxResults:
                  type: integer
                  description: Maximum number of results per page (1-100).
                nextToken:
                  type: string
                  description: Pagination token from a previous response.
            examples:
              ListtaskdefinitionsRequestExample:
                summary: Default ListTaskDefinitions request
                x-microcks-default: true
                value:
                  familyPrefix: example_value
                  status: ACTIVE
                  sort: ASC
                  maxResults: 10
                  nextToken: example_value
      responses:
        '200':
          description: Task definitions listed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskDefinitionArns:
                    type: array
                    items:
                      type: string
                  nextToken:
                    type: string
              examples:
                Listtaskdefinitions200Example:
                  summary: Default ListTaskDefinitions 200 response
                  x-microcks-default: true
                  value:
                    taskDefinitionArns:
                    - example_value
                    nextToken: example_value
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.ListTaskDefinitionFamilies:
    post:
      operationId: ListTaskDefinitionFamilies
      summary: Amazon Ecs List Task Definition Families
      description: Returns a list of task definition families that are registered to your account, with ACTIVE task definitions.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTaskDefinitionFamilies.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: false
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              properties:
                familyPrefix:
                  type: string
                  description: Filter by family name prefix.
                status:
                  type: string
                  enum:
                  - ACTIVE
                  - INACTIVE
                  - ALL
                maxResults:
                  type: integer
                nextToken:
                  type: string
            examples:
              ListtaskdefinitionfamiliesRequestExample:
                summary: Default ListTaskDefinitionFamilies request
                x-microcks-default: true
                value:
                  familyPrefix: example_value
                  status: ACTIVE
                  maxResults: 10
                  nextToken: example_value
      responses:
        '200':
          description: Task definition families listed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  families:
                    type: array
                    items:
                      type: string
                  nextToken:
                    type: string
              examples:
                Listtaskdefinitionfamilies200Example:
                  summary: Default ListTaskDefinitionFamilies 200 response
                  x-microcks-default: true
                  value:
                    families:
                    - example_value
                    nextToken: example_value
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.TagResource:
    post:
      operationId: TagResource
      summary: Amazon Ecs Tag an Ecs Resource
      description: Associates the specified tags to a resource with the specified resourceArn.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              required:
              - resourceArn
              - tags
              properties:
                resourceArn:
                  type: string
                  description: The ARN of the resource to tag.
                tags:
                  type: array
                  items:
                    $ref: '#/components/schemas/Tag'
            examples:
              TagresourceRequestExample:
                summary: Default TagResource request
                x-microcks-default: true
                value:
                  resourceArn: example_value
                  tags:
                  - key: example_value
                    value: example_value
      responses:
        '200':
          description: Resource tagged successfully
          content:
            application/json:
              schema:
                type: object
              examples:
                Tagresource200Example:
                  summary: Default TagResource 200 response
                  x-microcks-default: true
                  value: {}
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.UntagResource:
    post:
      operationId: UntagResource
      summary: Amazon Ecs Remove Tags From an Ecs Resource
      description: Deletes specified tags from a resource.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UntagResource.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              required:
              - resourceArn
              - tagKeys
              properties:
                resourceArn:
                  type: string
                  description: The ARN of the resource to untag.
                tagKeys:
                  type: array
                  items:
                    type: string
                  description: The keys of the tags to remove.
            examples:
              UntagresourceRequestExample:
                summary: Default UntagResource request
                x-microcks-default: true
                value:
                  resourceArn: example_value
                  tagKeys:
                  - example_value
      responses:
        '200':
          description: Tags removed successfully
          content:
            application/json:
              schema:
                type: object
              examples:
                Untagresource200Example:
                  summary: Default UntagResource 200 response
                  x-microcks-default: true
                  value: {}
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#X-Amz-Target=AmazonEC2ContainerServiceV20141113.ListTagsForResource:
    post:
      operationId: ListTagsForResource
      summary: Amazon Ecs List Tags for an Ecs Resource
      description: Lists the tags for the specified resource.
      tags:
      - Task Definitions
      externalDocs:
        url: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTagsForResource.html
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              type: object
              required:
              - resourceArn
              properties:
                resourceArn:
                  type: string
                  description: The ARN of the resource to list tags for.
            examples:
              ListtagsforresourceRequestExample:
                summary: Default ListTagsForResource request
                x-microcks-default: true
                value:
                  resourceArn: example_value
      responses:
        '200':
          description: Tags listed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  tags:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tag'
              examples:
                Listtagsforresource200Example:
                  summary: Default ListTagsForResource 200 response
                  x-microcks-default: true
                  value:
                    tags:
                    - key: example_value
                      value: example_value
        '400':
          $ref: '#/components/responses/ClientError'
        '500':
          $ref: '#/components/responses/ServerError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    LogConfiguration:
      type: object
      required:
      - logDriver
      properties:
        logDriver:
          type: string
          description: The log driver to use for the container.
          enum:
          - json-file
          - syslog
          - journald
          - gelf
          - fluentd
          - awslogs
          - splunk
          - awsfirelens
          example: json-file
        options:
          type: object
          additionalProperties:
            type: string
          description: The configuration options to send to the log driver.
          example: example_value
        secretOptions:
          type: array
          description: The secrets to pass to the log driver configuration.
          items:
            type: object
            required:
            - name
            - valueFrom
            properties:
              name:
                type: string
              valueFrom:
                type: string
          example: []
    ProxyConfiguration:
      type: object
      required:
      - containerName
      properties:
        type:
          type: string
          enum:
          - APPMESH
          description: The proxy type. The only supported value is APPMESH.
          example: APPMESH
        containerName:
          type: string
          description: The name of the container that will serve as the App Mesh proxy.
          example: example_value
        properties:
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePair'
          example: []
    RegisterTaskDefinitionRequest:
      type: object
      required:
      - family
      - containerDefinitions
      properties:
        family:
          type: string
          description: You must specify a family for a task definition. Up to 255 characters (uppercase and lowercase letters, numbers, underscores, and hyphens are allowed).
          maxLength: 255
          example: example_value
        containerDefinitions:
          type: array
          description: A list of container definitions that describe the containers that make up the task.
          items:
            $ref: '#/components/schemas/ContainerDefinition'
          example: []
        taskRoleArn:
          type: string
          description: The short name or full ARN of the IAM role that containers in this task can assume.
          example: example_value
        executionRoleArn:
          type: string
          description: The ARN of the task execution role that grants the ECS container agent permission to make API calls on your behalf.
          example: example_value
        networkMode:
          type: string
          description: The Docker networking mode to use for the containers in the task.
          enum:
          - bridge
          - host
          - awsvpc
          - none
          example: bridge
        volumes:
          type: array
          description: A list of volume definitions for the task.
          items:
            $ref: '#/components/schemas/Volume'
          example: []
        placementConstraints:
          type: array
          items:
            $ref: '#/components/schemas/TaskDefinitionPlacementConstraint'
          maxItems: 10
          example: []
        requiresCompatibilities:
          type: array
          description: The task launch type compatibility requirement.
          items:
            type: string
            enum:
            - EC2
            - FARGATE
            - EXTERNAL
          example: []
        cpu:
          type: string
          description: 'The number of CPU units used by the task. Required for Fargate launch type. Valid values: 256 (.25 vCPU) through 16384 (16 vCPU).'
          example: example_value
        memory:
          type: string
          description: The amount of memory (in MiB) used by the task. Required for Fargate launch type.
          example: example_value
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          maxItems: 50
          example: []
        pidMode:
          type: string
          description: The process namespace to use for the containers in the task.
          enum:
          - host
          - task
          example: host
        ipcMode:
          type: string
          description: The IPC resource namespace to use for the containers in the task.
          enum:
          - host
          - task
          - none
          example: host
        proxyConfiguration:
          $ref: '#/components/schemas/ProxyConfiguration'
        inferenceAccelerators:
          type: array
          items:
            $ref: '#/components/schemas/InferenceAccelerator'
          example: []
        ephemeralStorage:
          $ref: '#/components/schemas/EphemeralStorage'
        runtimePlatform:
          $ref: '#/components/schemas/RuntimePlatform'
        enableFaultInjection:
          type: boolean
          description: Whether to enable fault injection for the task definition.
          example: true
    ContainerDefinition:
      type: object
      description: A container definition describes a container within a task definition.
      required:
      - name
      - image
      properties:
        name:
    

# --- truncated at 32 KB (55 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amazon-ecs/refs/heads/main/openapi/amazon-ecs-task-definitions-api-openapi.yml