Amazon VPC Route Tables API

Operations for managing route tables and routes within a VPC

OpenAPI Specification

amazon-vpc-route-tables-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon VPC Internet Gateways Route Tables API
  description: Amazon Virtual Private Cloud (VPC) lets you provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you define. VPC operations are part of the Amazon EC2 API and use the EC2 query-based API pattern.
  version: '2016-11-15'
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  termsOfService: https://aws.amazon.com/service-terms/
servers:
- url: https://ec2.{region}.amazonaws.com
  description: Amazon EC2 Regional Endpoint (VPC operations)
  variables:
    region:
      default: us-east-1
      description: AWS Region
security:
- sigv4Auth: []
tags:
- name: Route Tables
  description: Operations for managing route tables and routes within a VPC
paths:
  /?Action=CreateRouteTable:
    get:
      operationId: createRouteTable
      summary: Amazon VPC Create a Route Table
      description: Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.
      tags:
      - Route Tables
      parameters:
      - name: VpcId
        in: query
        required: true
        description: The ID of the VPC
        schema:
          type: string
        example: example-id
      responses:
        '200':
          description: Successfully created route table
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/CreateRouteTableResponse'
        '400':
          description: Invalid request parameters
        '401':
          description: Authentication failure
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /?Action=DescribeRouteTables:
    get:
      operationId: describeRouteTables
      summary: Amazon VPC Describe Route Tables
      description: Describes one or more of your route tables. Each subnet in your VPC must be associated with a route table, which controls the routing for the subnet.
      tags:
      - Route Tables
      parameters:
      - name: RouteTableId
        in: query
        description: The IDs of the route tables to describe
        schema:
          type: array
          items:
            type: string
        example: example-id
      - name: Filter
        in: query
        description: Filters to apply to the results
        schema:
          type: array
          items:
            type: string
        example: example
      - name: MaxResults
        in: query
        description: Maximum number of results to return
        schema:
          type: integer
          minimum: 5
          maximum: 1000
        example: 1
      - name: NextToken
        in: query
        description: Token for the next page of results
        schema:
          type: string
        example: example
      responses:
        '200':
          description: Successfully described route tables
        '400':
          description: Invalid request parameters
        '401':
          description: Authentication failure
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /?Action=CreateRoute:
    get:
      operationId: createRoute
      summary: Amazon VPC Create a Route in a Route Table
      description: Creates a route in a route table within a VPC. You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the targets.
      tags:
      - Route Tables
      parameters:
      - name: RouteTableId
        in: query
        required: true
        description: The ID of the route table for the route
        schema:
          type: string
        example: example-id
      - name: DestinationCidrBlock
        in: query
        description: The IPv4 CIDR address block used for the destination match
        schema:
          type: string
        example: example-id
      - name: GatewayId
        in: query
        description: The ID of an internet gateway or virtual private gateway
        schema:
          type: string
        example: example-id
      - name: NatGatewayId
        in: query
        description: The ID of a NAT gateway
        schema:
          type: string
        example: example-id
      - name: NetworkInterfaceId
        in: query
        description: The ID of a network interface
        schema:
          type: string
        example: example-id
      responses:
        '200':
          description: Successfully created route
        '400':
          description: Invalid request parameters
        '401':
          description: Authentication failure
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /?Action=AssociateRouteTable:
    get:
      operationId: associateRouteTable
      summary: Amazon VPC Associate a Route Table with a Subnet
      description: Associates a subnet or gateway with a route table. The subnet and route table must be in the same VPC. This association causes traffic from the subnet to be routed according to the routes in the route table.
      tags:
      - Route Tables
      parameters:
      - name: RouteTableId
        in: query
        required: true
        description: The ID of the route table
        schema:
          type: string
        example: example-id
      - name: SubnetId
        in: query
        description: The ID of the subnet
        schema:
          type: string
        example: example-id
      - name: GatewayId
        in: query
        description: The ID of the internet gateway or virtual private gateway
        schema:
          type: string
        example: example-id
      responses:
        '200':
          description: Successfully associated route table
        '400':
          description: Invalid request parameters
        '401':
          description: Authentication failure
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Tag:
      type: object
      description: Describes a tag
      properties:
        key:
          type: string
          description: The key of the tag
        value:
          type: string
          description: The value of the tag
    CreateRouteTableResponse:
      type: object
      description: Response from the CreateRouteTable action
      properties:
        routeTable:
          $ref: '#/components/schemas/RouteTable'
    RouteTable:
      type: object
      description: Describes a route table
      properties:
        routeTableId:
          type: string
          description: The ID of the route table
        vpcId:
          type: string
          description: The ID of the VPC
        routes:
          type: array
          description: The routes in the route table
          items:
            type: object
            properties:
              destinationCidrBlock:
                type: string
                description: The IPv4 CIDR block used for the destination match
              destinationIpv6CidrBlock:
                type: string
                description: The IPv6 CIDR block used for the destination match
              gatewayId:
                type: string
                description: The ID of the gateway attached to your VPC
              natGatewayId:
                type: string
                description: The ID of a NAT gateway
              networkInterfaceId:
                type: string
                description: The ID of the network interface
              state:
                type: string
                description: The state of the route
                enum:
                - active
                - blackhole
              origin:
                type: string
                description: Describes how the route was created
                enum:
                - CreateRouteTable
                - CreateRoute
                - EnableVgwRoutePropagation
        associations:
          type: array
          description: The associations between the route table and subnets or gateways
          items:
            type: object
            properties:
              routeTableAssociationId:
                type: string
              routeTableId:
                type: string
              subnetId:
                type: string
              gatewayId:
                type: string
              main:
                type: boolean
                description: Indicates whether this is the main route table
        ownerId:
          type: string
          description: The ID of the AWS account that owns the route table
        tags:
          type: array
          description: Any tags assigned to the route table
          items:
            $ref: '#/components/schemas/Tag'
  securitySchemes:
    sigv4Auth:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication
externalDocs:
  description: Amazon VPC API Reference
  url: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/OperationList-query-vpc.html