Amazon EventBridge Targets API

Operations for managing rule targets.

OpenAPI Specification

amazon-eventbridge-targets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon EventBridge Archives Targets API
  description: Amazon EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources. EventBridge delivers a stream of real-time data from your own applications, SaaS applications, and AWS services and routes that data to targets such as AWS Lambda, Amazon SNS, Amazon SQS, and more.
  version: '2015-10-07'
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/eventbridge/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://events.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - eu-west-1
      - eu-west-2
      - eu-central-1
      - ap-southeast-1
      - ap-southeast-2
      - ap-northeast-1
security:
- aws_sigv4: []
tags:
- name: Targets
  description: Operations for managing rule targets.
paths:
  /?PutTargets:
    post:
      operationId: PutTargets
      summary: Amazon EventBridge Put Targets
      description: Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-PutTargets'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/PutTargetsRequest'
            examples:
              PutTargetsRequestExample:
                summary: Default PutTargets request
                x-microcks-default: true
                value:
                  Rule: example
                  EventBusName: example-name
                  Targets: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutTargetsResponse'
              examples:
                PutTargets200Example:
                  summary: Default PutTargets 200 response
                  x-microcks-default: true
                  value:
                    FailedEntryCount: 1
                    FailedEntries: []
        '400':
          description: Bad request
        '500':
          description: Internal server error
      tags:
      - Targets
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /?ListTargetsByRule:
    post:
      operationId: ListTargetsByRule
      summary: Amazon EventBridge List Targets by Rule
      description: Lists the targets assigned to the specified rule.
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-ListTargetsByRule'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListTargetsByRuleRequest'
            examples:
              ListTargetsByRuleRequestExample:
                summary: Default ListTargetsByRule request
                x-microcks-default: true
                value:
                  Rule: example
                  EventBusName: example-name
                  NextToken: example
                  Limit: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTargetsByRuleResponse'
              examples:
                ListTargetsByRule200Example:
                  summary: Default ListTargetsByRule 200 response
                  x-microcks-default: true
                  value:
                    Targets: []
                    NextToken: example
        '400':
          description: Bad request
        '500':
          description: Internal server error
      tags:
      - Targets
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /?RemoveTargets:
    post:
      operationId: RemoveTargets
      summary: Amazon EventBridge Remove Targets
      description: Removes the specified targets from the specified rule.
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-RemoveTargets'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/RemoveTargetsRequest'
            examples:
              RemoveTargetsRequestExample:
                summary: Default RemoveTargets request
                x-microcks-default: true
                value:
                  Rule: example
                  EventBusName: example-name
                  Ids: []
                  Force: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveTargetsResponse'
              examples:
                RemoveTargets200Example:
                  summary: Default RemoveTargets 200 response
                  x-microcks-default: true
                  value:
                    FailedEntryCount: 1
                    FailedEntries: []
        '400':
          description: Bad request
        '500':
          description: Internal server error
      tags:
      - Targets
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    RemoveTargetsResponse:
      type: object
      properties:
        FailedEntryCount:
          type: integer
        FailedEntries:
          type: array
          items:
            type: object
            properties:
              TargetId:
                type: string
              ErrorCode:
                type: string
              ErrorMessage:
                type: string
    RemoveTargetsRequest:
      type: object
      properties:
        Rule:
          type: string
        EventBusName:
          type: string
        Ids:
          type: array
          items:
            type: string
        Force:
          type: boolean
      required:
      - Rule
      - Ids
    ListTargetsByRuleRequest:
      type: object
      properties:
        Rule:
          type: string
        EventBusName:
          type: string
        NextToken:
          type: string
        Limit:
          type: integer
      required:
      - Rule
    PutTargetsRequest:
      type: object
      properties:
        Rule:
          type: string
        EventBusName:
          type: string
        Targets:
          type: array
          items:
            $ref: '#/components/schemas/Target'
      required:
      - Rule
      - Targets
    ListTargetsByRuleResponse:
      type: object
      properties:
        Targets:
          type: array
          items:
            $ref: '#/components/schemas/Target'
        NextToken:
          type: string
    Target:
      type: object
      properties:
        Id:
          type: string
          description: The ID of the target.
        Arn:
          type: string
          description: The Amazon Resource Name (ARN) of the target.
        RoleArn:
          type: string
          description: The Amazon Resource Name (ARN) of the IAM role.
        Input:
          type: string
          description: Valid JSON text passed to the target.
        InputPath:
          type: string
          description: JSONPath to extract from the event and send to the target.
        InputTransformer:
          type: object
          properties:
            InputPathsMap:
              type: object
              additionalProperties:
                type: string
            InputTemplate:
              type: string
          description: Settings to transform input before sending to the target.
      required:
      - Id
      - Arn
    PutTargetsResponse:
      type: object
      properties:
        FailedEntryCount:
          type: integer
        FailedEntries:
          type: array
          items:
            type: object
            properties:
              TargetId:
                type: string
              ErrorCode:
                type: string
              ErrorMessage:
                type: string
  parameters:
    X-Amz-Target-ListTargetsByRule:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - AWSEvents.ListTargetsByRule
    X-Amz-Target-PutTargets:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - AWSEvents.PutTargets
    X-Amz-Target-RemoveTargets:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - AWSEvents.RemoveTargets
  securitySchemes:
    aws_sigv4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication.