Amazon EC2 Ec2 Vpc Peering Connection API

The Ec2 Vpc Peering Connection API from Amazon EC2 — 5 operation(s) for ec2 vpc peering connection.

Business capability
IT Infrastructure Management BC-600.50

Operations 5

POST /?Action=AcceptVpcPeeringConnection Accept Vpc Peering Connection #
POST /?Action=CreateVpcPeeringConnection Create Vpc Peering Connection #
POST /?Action=DeleteVpcPeeringConnection Delete Vpc Peering Connection #
POST /?Action=DescribeVpcPeeringConnections Describe Vpc Peering Connections #
POST /?Action=RejectVpcPeeringConnection Reject Vpc Peering Connection #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-ec2:amazon-ec2-vpc-peering-connection-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-ec2-vpc-peering-connection-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Elastic Compute Cloud Vpc Peering Connection API
  version: '2016-11-15'
  description: Generated from AWS's published Smithy model for Amazon Elastic Compute Cloud. 5 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://ec2.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
tags:
- name: Vpc Peering Connection
paths:
  /?Action=AcceptVpcPeeringConnection:
    post:
      operationId: AcceptVpcPeeringConnection
      summary: Accept Vpc Peering Connection
      description: Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests. For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/AcceptVpcPeeringConnectionResult'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: AcceptVpcPeeringConnection
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/AcceptVpcPeeringConnectionRequest'
      tags:
      - Vpc Peering Connection
  /?Action=CreateVpcPeeringConnection:
    post:
      operationId: CreateVpcPeeringConnection
      summary: Create Vpc Peering Connection
      description: 'Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks. Limitations and rules apply to a VPC peering connection. For more information, see the VPC peering limitations in the VPC Peering Guide. The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected. If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed.'
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/CreateVpcPeeringConnectionResult'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: CreateVpcPeeringConnection
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/CreateVpcPeeringConnectionRequest'
      tags:
      - Vpc Peering Connection
  /?Action=DeleteVpcPeeringConnection:
    post:
      operationId: DeleteVpcPeeringConnection
      summary: Delete Vpc Peering Connection
      description: Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the accepter VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state. You cannot delete a VPC peering connection that's in the failed or rejected state.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DeleteVpcPeeringConnectionResult'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DeleteVpcPeeringConnection
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/DeleteVpcPeeringConnectionRequest'
      tags:
      - Vpc Peering Connection
  /?Action=DescribeVpcPeeringConnections:
    post:
      operationId: DescribeVpcPeeringConnections
      summary: Describe Vpc Peering Connections
      description: Describes your VPC peering connections. The default is to describe all your VPC peering connections. Alternatively, you can specify specific VPC peering connection IDs or filter the results to include only the VPC peering connections that match specific criteria.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DescribeVpcPeeringConnectionsResult'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DescribeVpcPeeringConnections
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/DescribeVpcPeeringConnectionsRequest'
      tags:
      - Vpc Peering Connection
  /?Action=RejectVpcPeeringConnection:
    post:
      operationId: RejectVpcPeeringConnection
      summary: Reject Vpc Peering Connection
      description: Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/RejectVpcPeeringConnectionResult'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: RejectVpcPeeringConnection
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/RejectVpcPeeringConnectionRequest'
      tags:
      - Vpc Peering Connection
components:
  schemas:
    VpcPeeringConnectionStateReason:
      type: object
      properties:
        Code:
          type: string
          enum:
          - initiating-request
          - pending-acceptance
          - active
          - deleted
          - rejected
          - failed
          - expired
          - provisioning
          - deleting
          description: The status of the VPC peering connection.
        Message:
          type: string
          description: A message that provides more information about the status, if applicable.
    DeleteVpcPeeringConnectionResult:
      type: object
      properties:
        Return:
          type: boolean
          description: Returns true if the request succeeds; otherwise, it returns an error.
    VpcPeeringConnectionVpcInfo:
      type: object
      properties:
        CidrBlock:
          type: string
          description: The IPv4 CIDR block for the VPC.
        Ipv6CidrBlockSet:
          type: array
          items:
            $ref: '#/components/schemas/Ipv6CidrBlock'
          description: The IPv6 CIDR block for the VPC.
        CidrBlockSet:
          type: array
          items:
            $ref: '#/components/schemas/CidrBlock'
          description: Information about the IPv4 CIDR blocks for the VPC.
        OwnerId:
          type: string
          description: The ID of the Amazon Web Services account that owns the VPC.
        PeeringOptions:
          $ref: '#/components/schemas/VpcPeeringConnectionOptionsDescription'
        VpcId:
          type: string
          description: The ID of the VPC.
        Region:
          type: string
          description: The Region in which the VPC is located.
    RejectVpcPeeringConnectionRequest:
      type: object
      properties:
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        VpcPeeringConnectionId:
          type: string
          description: The ID of the VPC peering connection.
      required:
      - VpcPeeringConnectionId
    Filter:
      type: object
      properties:
        Name:
          type: string
          description: The name of the filter. Filter names are case-sensitive.
        Values:
          type: array
          items:
            type: string
          description: The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.
    VpcPeeringConnection:
      type: object
      properties:
        AccepterVpcInfo:
          $ref: '#/components/schemas/VpcPeeringConnectionVpcInfo'
        ExpirationTime:
          type: string
          format: date-time
          description: The time that an unaccepted VPC peering connection will expire.
        RequesterVpcInfo:
          $ref: '#/components/schemas/VpcPeeringConnectionVpcInfo'
        Status:
          $ref: '#/components/schemas/VpcPeeringConnectionStateReason'
        Tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          description: Any tags assigned to the resource.
        VpcPeeringConnectionId:
          type: string
          description: The ID of the VPC peering connection.
    DescribeVpcPeeringConnectionsRequest:
      type: object
      properties:
        NextToken:
          type: string
          description: The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
        MaxResults:
          type: integer
          description: The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        VpcPeeringConnectionIds:
          type: array
          items:
            type: string
          description: 'The IDs of the VPC peering connections. Default: Describes all your VPC peering connections.'
        Filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
          description: The filters. accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC. accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC. accepter-vpc-info.vpc-id - The ID of the accepter VPC. expiration-time - The expiration date and time for the VPC peering connection. requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC. requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC. requester-vpc-info.vpc-id - The ID of the requester VPC. status-code - The status of the VPC peering conn
    CreateVpcPeeringConnectionResult:
      type: object
      properties:
        VpcPeeringConnection:
          $ref: '#/components/schemas/VpcPeeringConnection'
    CidrBlock:
      type: object
      properties:
        CidrBlock:
          type: string
          description: The IPv4 CIDR block.
    AcceptVpcPeeringConnectionRequest:
      type: object
      properties:
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        VpcPeeringConnectionId:
          type: string
          description: The ID of the VPC peering connection. You must specify this parameter in the request.
      required:
      - VpcPeeringConnectionId
    CreateVpcPeeringConnectionRequest:
      type: object
      properties:
        PeerRegion:
          type: string
          description: 'The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request. Default: The Region in which you make the request.'
        TagSpecifications:
          type: array
          items:
            $ref: '#/components/schemas/TagSpecification'
          description: The tags to assign to the peering connection.
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        VpcId:
          type: string
          description: The ID of the requester VPC. You must specify this parameter in the request.
        PeerVpcId:
          type: string
          description: The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
        PeerOwnerId:
          type: string
          description: 'The Amazon Web Services account ID of the owner of the accepter VPC. Default: Your Amazon Web Services account ID'
      required:
      - VpcId
    VpcPeeringConnectionOptionsDescription:
      type: object
      properties:
        AllowDnsResolutionFromRemoteVpc:
          type: boolean
          description: Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.
        AllowEgressFromLocalClassicLinkToRemoteVpc:
          type: boolean
          description: Deprecated.
        AllowEgressFromLocalVpcToRemoteClassicLink:
          type: boolean
          description: Deprecated.
    DescribeVpcPeeringConnectionsResult:
      type: object
      properties:
        VpcPeeringConnections:
          type: array
          items:
            $ref: '#/components/schemas/VpcPeeringConnection'
          description: Information about the VPC peering connections.
        NextToken:
          type: string
          description: The token to include in another request to get the next page of items. This value is null when there are no more items to return.
    TagSpecification:
      type: object
      properties:
        ResourceType:
          type: string
          enum:
          - capacity-reservation
          - client-vpn-endpoint
          - customer-gateway
          - carrier-gateway
          - coip-pool
          - declarative-policies-report
          - dedicated-host
          - dhcp-options
          - egress-only-internet-gateway
          - elastic-ip
          - elastic-gpu
          - export-image-task
          - export-instance-task
          - fleet
          - fpga-image
          - host-reservation
          - image
          - image-usage-report
          - import-image-task
          - import-snapshot-task
          - instance
          - instance-event-window
          - internet-gateway
          - ipam
          - ipam-pool
          - ipam-scope
          - ipv4pool-ec2
          - ipv6pool-ec2
          - key-pair
          - launch-template
          - local-gateway
          - local-gateway-route-table
          - local-gateway-virtual-interface
          - local-gateway-virtual-interface-group
          - local-gateway-route-table-vpc-association
          - local-gateway-route-table-virtual-interface-group-association
          - natgateway
          - network-acl
          - network-interface
          - network-insights-analysis
          - network-insights-path
          - network-insights-access-scope
          - network-insights-access-scope-analysis
          - outpost-lag
          - placement-group
          - prefix-list
          - replace-root-volume-task
          - reserved-instances
          - route-table
          - security-group
          - security-group-rule
          - service-link-virtual-interface
          - snapshot
          - spot-fleet-request
          - spot-instances-request
          - subnet
          - subnet-cidr-reservation
          - traffic-mirror-filter
          - traffic-mirror-session
          - traffic-mirror-target
          - transit-gateway
          - transit-gateway-attachment
          - transit-gateway-connect-peer
          - transit-gateway-multicast-domain
          - transit-gateway-policy-table
          - transit-gateway-metering-policy
          - transit-gateway-route-table
          - transit-gateway-route-table-announcement
          - volume
          - vpc
          - vpc-endpoint
          - vpc-endpoint-connection
          - vpc-endpoint-service
          - vpc-endpoint-service-permission
          - vpc-peering-connection
          - vpn-connection
          - vpn-gateway
          - vpc-flow-log
          - capacity-reservation-fleet
          - traffic-mirror-filter-rule
          - vpc-endpoint-connection-device-type
          - verified-access-instance
          - verified-access-group
          - verified-access-endpoint
          - verified-access-policy
          - verified-access-trust-provider
          - vpn-connection-device-type
          - vpc-block-public-access-exclusion
          - vpc-encryption-control
          - route-server
          - route-server-endpoint
          - route-server-peer
          - ipam-resource-discovery
          - ipam-resource-discovery-association
          - instance-connect-endpoint
          - verified-access-endpoint-target
          - ipam-external-resource-verification-token
          - capacity-block
          - mac-modification-task
          - ipam-prefix-list-resolver
          - ipam-policy
          - ipam-prefix-list-resolver-target
          - ipam-internet-registry-association
          - secondary-interface
          - secondary-network
          - secondary-subnet
          - capacity-manager-data-export
          - vpn-concentrator
          - ipam-pool-allocation
          - capacity-reservation-cancellation-quote
          - application-status-check
          - capacity-reservation-modification-quote
          description: The type of resource to tag on creation.
        Tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          description: The tags to apply to the resource.
    RejectVpcPeeringConnectionResult:
      type: object
      properties:
        Return:
          type: boolean
          description: Returns true if the request succeeds; otherwise, it returns an error.
    Tag:
      type: object
      properties:
        Key:
          type: string
          description: 'The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.'
        Value:
          type: string
          description: 'The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.'
    DeleteVpcPeeringConnectionRequest:
      type: object
      properties:
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        VpcPeeringConnectionId:
          type: string
          description: The ID of the VPC peering connection.
      required:
      - VpcPeeringConnectionId
    Ipv6CidrBlock:
      type: object
      properties:
        Ipv6CidrBlock:
          type: string
          description: The IPv6 CIDR block.
    AcceptVpcPeeringConnectionResult:
      type: object
      properties:
        VpcPeeringConnection:
          $ref: '#/components/schemas/VpcPeeringConnection'
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: ec2
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/ec2/service/2016-11-15/ec2-2016-11-15.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)