Amazon EventBridge Targets API
Operations for managing rule targets.
Operations 3
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Operations for managing rule targets.
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/amazon-eventbridge:amazon-eventbridge-targets-api"
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.
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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.1.0
info:
title: Amazon EventBridge Targets API
version: '2015-10-07'
description: Generated from AWS's published Smithy model for Amazon EventBridge. 3 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://events.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/#ListTargetsByRule:
post:
operationId: ListTargetsByRule
summary: List Targets By Rule
description: Lists the targets assigned to the specified rule. The maximum number of results per page for requests is
100.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListTargetsByRuleResponse'
'500':
description: InternalException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InternalException'
'400':
description: ResourceNotFoundException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSEvents.ListTargetsByRule
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListTargetsByRuleRequest'
tags:
- Targets
/#PutTargets:
post:
operationId: PutTargets
summary: Put Targets
description: 'Adds the specified targets to the specified rule, or updates the targets if they are already associated
with the rule. Targets are the resources that are invoked when a rule is triggered. The maximum number of entries
per request is 10. Each rule can have up to five (5) targets associated with it at one time. For a list of services
you can configure as targets for events, see EventBridge targets in the Amazon EventBridge User Guide . Creating rules
with built-in targets is supported only in the Amazon Web Services Management Console. The built-in targets are: Amazon
EBS CreateSnapshot API call Amazon EC2 RebootInstances API call Amazon EC2 StopInstances API call Amazon EC2 TerminateInstances
API call For some target types, PutTargets provides target-specific parameters. If the target is a Kinesis data stream,
you can optionally specify which shard the event goes to by using the KinesisParameters argument. To invoke a command
on multiple EC2 instances with one rule, you can use the RunCommandParameters field. To be able to make API calls
against the resources that you own, Amazon EventBridge needs the appropriate permissions: For Lambda and Amazon SNS
resources, EventBridge relies o'
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/PutTargetsResponse'
'400':
description: ConcurrentModificationException; LimitExceededException; ManagedRuleException; ResourceNotFoundException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ConcurrentModificationException'
'500':
description: InternalException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InternalException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSEvents.PutTargets
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/PutTargetsRequest'
tags:
- Targets
/#RemoveTargets:
post:
operationId: RemoveTargets
summary: Remove Targets
description: Removes the specified targets from the specified rule. When the rule is triggered, those targets are no
longer be invoked. A successful execution of RemoveTargets doesn't guarantee all targets are removed from the rule,
it means that the target(s) listed in the request are removed. When you remove a target, when the associated rule
triggers, removed targets might continue to be invoked. Allow a short period of time for changes to take effect. This
action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero
in the response and each entry in FailedEntries provides the ID of the failed target and the error code. The maximum
number of entries per request is 10.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/RemoveTargetsResponse'
'400':
description: ConcurrentModificationException; ManagedRuleException; ResourceNotFoundException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ConcurrentModificationException'
'500':
description: InternalException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InternalException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- AWSEvents.RemoveTargets
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/RemoveTargetsRequest'
tags:
- Targets
components:
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: events
schemas:
AppSyncParameters:
type: object
properties:
GraphQLOperation:
type: string
description: The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the
GraphQL service. For more information, see Operations in the AppSync User Guide.
AwsVpcConfiguration:
type: object
properties:
Subnets:
type: array
items:
type: string
description: Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can
specify as many as 16 subnets.
SecurityGroups:
type: array
items:
type: string
description: Specifies the security groups associated with the task. These security groups must all be in the same
VPC. You can specify as many as five security groups. If you do not specify a security group, the default security
group for the VPC is used.
AssignPublicIp:
type: string
enum:
- ENABLED
- DISABLED
description: Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED only when LaunchType in EcsParameters is set to FARGATE.
required:
- Subnets
BatchArrayProperties:
type: object
properties:
Size:
type: integer
description: The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000.
BatchParameters:
type: object
properties:
JobDefinition:
type: string
description: The ARN or name of the job definition to use if the event target is an Batch job. This job definition
must already exist.
JobName:
type: string
description: The name to use for this execution of the job, if the target is an Batch job.
ArrayProperties:
$ref: '#/components/schemas/BatchArrayProperties'
RetryStrategy:
$ref: '#/components/schemas/BatchRetryStrategy'
required:
- JobDefinition
- JobName
BatchRetryStrategy:
type: object
properties:
Attempts:
type: integer
description: The number of times to attempt to retry, if the job fails. Valid values are 1–10.
CapacityProviderStrategyItem:
type: object
properties:
capacityProvider:
type: string
description: The short name of the capacity provider.
weight:
type: integer
description: The weight value designates the relative percentage of the total number of tasks launched that should
use the specified capacity provider. The weight value is taken into consideration after the base value, if defined,
is satisfied.
base:
type: integer
description: The base value designates how many tasks, at a minimum, to run on the specified capacity provider.
Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified,
the default value of 0 is used.
required:
- capacityProvider
ConcurrentModificationException:
type: object
properties:
message:
type: string
DeadLetterConfig:
type: object
properties:
Arn:
type: string
description: The ARN of the SQS queue specified as the target for the dead-letter queue.
EcsParameters:
type: object
properties:
TaskDefinitionArn:
type: string
description: The ARN of the task definition to use if the event target is an Amazon ECS task.
TaskCount:
type: integer
description: The number of tasks to create based on TaskDefinition. The default is 1.
LaunchType:
type: string
enum:
- EC2
- FARGATE
- EXTERNAL
description: Specifies the launch type on which your task is running. The launch type that you specify here must
match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the
Regions where Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon
Elastic Container Service Developer Guide.
NetworkConfiguration:
$ref: '#/components/schemas/NetworkConfiguration'
PlatformVersion:
type: string
description: Specifies the platform version for the task. Specify only the numeric portion of the platform version,
such as 1.1.0. This structure is used only if LaunchType is FARGATE. For more information about valid platform
versions, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
Group:
type: string
description: Specifies an ECS task group for the task. The maximum length is 255 characters.
CapacityProviderStrategy:
type: array
items:
$ref: '#/components/schemas/CapacityProviderStrategyItem'
description: The capacity provider strategy to use for the task. If a capacityProviderStrategy is specified, the
launchType parameter must be omitted. If no capacityProviderStrategy or launchType is specified, the defaultCapacityProviderStrategy
for the cluster is used.
EnableECSManagedTags:
type: boolean
description: Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging
Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
EnableExecuteCommand:
type: boolean
description: Whether or not to enable the execute command functionality for the containers in this task. If true,
this enables execute command functionality on all containers in the task.
PlacementConstraints:
type: array
items:
$ref: '#/components/schemas/PlacementConstraint'
description: An array of placement constraint objects to use for the task. You can specify up to 10 constraints
per task (including constraints in the task definition and those specified at runtime).
PlacementStrategy:
type: array
items:
$ref: '#/components/schemas/PlacementStrategy'
description: The placement strategy objects to use for the task. You can specify a maximum of five strategy rules
per task.
PropagateTags:
type: string
enum:
- TASK_DEFINITION
description: Specifies whether to propagate the tags from the task definition to the task. If no value is specified,
the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task
after task creation, use the TagResource API action.
ReferenceId:
type: string
description: The reference ID to use for the task.
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
description: The metadata that you apply to the task to help you categorize and organize them. Each tag consists
of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
required:
- TaskDefinitionArn
HttpParameters:
type: object
properties:
PathParameterValues:
type: array
items:
type: string
description: The path parameter values to be used to populate API Gateway API or EventBridge ApiDestination path
wildcards ("*").
HeaderParameters:
type: object
additionalProperties:
type: string
description: The headers that need to be sent as part of request invoking the API Gateway API or EventBridge ApiDestination.
QueryStringParameters:
type: object
additionalProperties:
type: string
description: The query string keys/values that need to be sent as part of request invoking the API Gateway API or
EventBridge ApiDestination.
InputTransformer:
type: object
properties:
InputPathsMap:
type: object
additionalProperties:
type: string
description: Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate
to produce the output you want to be sent to the target. InputPathsMap is an array key-value pairs, where each
value is a valid JSON path. You can have as many as 100 key-value pairs. You must use JSON dot notation, not bracket
notation. The keys cannot start with "Amazon Web Services."
InputTemplate:
type: string
description: 'Input template where you specify placeholders that will be filled with the values of the keys from
InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: value>
If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply: The placeholder
cannot be used as an object key. The following example shows the syntax for using InputPathsMap and InputTemplate.
"InputTransformer": { "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, "InputTemplate":
" is in state " } To have the InputTemplate'
required:
- InputTemplate
InternalException:
type: object
properties:
message:
type: string
KinesisParameters:
type: object
properties:
PartitionKeyPath:
type: string
description: The JSON path to be extracted from the event and used as the partition key. For more information, see
Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide.
required:
- PartitionKeyPath
ListTargetsByRuleRequest:
type: object
properties:
Rule:
type: string
description: The name of the rule.
EventBusName:
type: string
description: The name or ARN of the event bus associated with the rule. If you omit this, the default event bus
is used.
NextToken:
type: string
description: The token returned by a previous call, which you can use to retrieve the next set of results. The value
of nextToken is a unique pagination token for each page. To retrieve the next page of results, make the call again
using the returned token. Keep all other arguments unchanged. Using an expired pagination token results in an
HTTP 400 InvalidToken error.
Limit:
type: integer
description: The maximum number of results to return.
required:
- Rule
ListTargetsByRuleResponse:
type: object
properties:
Targets:
type: array
items:
$ref: '#/components/schemas/Target'
description: The targets assigned to the rule.
NextToken:
type: string
description: A token indicating there are more results available. If there are no more results, no token is included
in the response. The value of nextToken is a unique pagination token for each page. To retrieve the next page
of results, make the call again using the returned token. Keep all other arguments unchanged. Using an expired
pagination token results in an HTTP 400 InvalidToken error.
NetworkConfiguration:
type: object
properties:
awsvpcConfiguration:
$ref: '#/components/schemas/AwsVpcConfiguration'
PlacementConstraint:
type: object
properties:
type:
type: string
enum:
- distinctInstance
- memberOf
description: The type of constraint. Use distinctInstance to ensure that each task in a particular group is running
on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.
expression:
type: string
description: A cluster query language expression to apply to the constraint. You cannot specify an expression if
the constraint type is distinctInstance. To learn more, see Cluster Query Language in the Amazon Elastic Container
Service Developer Guide.
PlacementStrategy:
type: object
properties:
type:
type: string
enum:
- random
- spread
- binpack
description: The type of placement strategy. The random placement strategy randomly places tasks on available candidates.
The spread placement strategy spreads placement across available candidates evenly based on the field parameter.
The binpack strategy places tasks on available candidates that have the least available amount of the resource
that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance
with the least amount of remaining memory (but still enough to run the task).
field:
type: string
description: The field to apply the placement strategy against. For the spread placement strategy, valid values
are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a
container instance, such as attribute:ecs.availability-zone. For the binpack placement strategy, valid values
are cpu and memory. For the random placement strategy, this field is not used.
PutTargetsRequest:
type: object
properties:
Rule:
type: string
description: The name of the rule.
EventBusName:
type: string
description: The name or ARN of the event bus associated with the rule. If you omit this, the default event bus
is used.
Targets:
type: array
items:
$ref: '#/components/schemas/Target'
description: The targets to update or add to the rule.
required:
- Rule
- Targets
PutTargetsResponse:
type: object
properties:
FailedEntryCount:
type: integer
description: The number of failed entries.
FailedEntries:
type: array
items:
$ref: '#/components/schemas/PutTargetsResultEntry'
description: The failed target entries.
PutTargetsResultEntry:
type: object
properties:
TargetId:
type: string
description: The ID of the target.
ErrorCode:
type: string
description: The error code that indicates why the target addition failed. If the value is ConcurrentModificationException,
too many requests were made at the same time.
ErrorMessage:
type: string
description: The error message that explains why the target addition failed.
RedshiftDataParameters:
type: object
properties:
SecretManagerArn:
type: string
description: The name or ARN of the secret that enables access to the database. Required when authenticating using
Amazon Web Services Secrets Manager.
Database:
type: string
description: The name of the database. Required when authenticating using temporary credentials.
DbUser:
type: string
description: The database user name. Required when authenticating using temporary credentials.
Sql:
type: string
description: The SQL statement text to run.
StatementName:
type: string
description: The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
WithEvent:
type: boolean
description: Indicates whether to send an event back to EventBridge after the SQL statement runs.
Sqls:
type: array
items:
type: string
description: One or more SQL statements to run. The SQL statements are run as a single transaction. They run serially
in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes.
If any SQL statement fails, then because they are run as one transaction, all work is rolled back.
required:
- Database
RemoveTargetsRequest:
type: object
properties:
Rule:
type: string
description: The name of the rule.
EventBusName:
type: string
description: The name or ARN of the event bus associated with the rule. If you omit this, the default event bus
is used.
Ids:
type: array
items:
type: string
description: The IDs of the targets to remove from the rule.
Force:
type: boolean
description: If this is a managed rule, created by an Amazon Web Services service on your behalf, you must specify
Force as True to remove targets. This parameter is ignored for rules that are not managed rules. You can check
whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.
required:
- Rule
- Ids
RemoveTargetsResponse:
type: object
properties:
FailedEntryCount:
type: integer
description: The number of failed entries.
FailedEntries:
type: array
items:
$ref: '#/components/schemas/RemoveTargetsResultEntry'
description: The failed target entries.
RemoveTargetsResultEntry:
type: object
properties:
TargetId:
type: string
description: The ID of the target.
ErrorCode:
type: string
description: The error code that indicates why the target removal failed. If the value is ConcurrentModificationException,
too many requests were made at the same time.
ErrorMessage:
type: string
description: The error message that explains why the target removal failed.
ResourceNotFoundException:
type: object
properties:
message:
type: string
RetryPolicy:
type: object
properties:
MaximumRetryAttempts:
type: integer
description: The maximum number of retry attempts to make before the request fails. Retry attempts continue until
either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is met.
MaximumEventAgeInSeconds:
type: integer
description: The maximum amount of time, in seconds, to continue to make retry attempts.
RunCommandParameters:
type: object
properties:
RunCommandTargets:
type: array
items:
$ref: '#/components/schemas/RunCommandTarget'
description: Currently, we support including only one RunCommandTarget block, which specifies either an array of
InstanceIds or a tag.
required:
- RunCommandTargets
RunCommandTarget:
type: object
properties:
Key:
type: string
description: 'Can be either tag: tag-key or InstanceIds.'
Values:
type: array
items:
type: string
description: 'If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, Values is a list of
Amazon EC2 instance IDs.'
required:
- Key
- Values
SageMakerPipelineParameter:
type: object
properties:
Name:
type: string
description: Name of parameter to start execution of a SageMaker AI Model Building Pipeline.
Value:
type: string
description: Value of parameter to start execution of a SageMaker AI Model Building Pipeline.
required:
- Name
- Value
SageMakerPipelineParameters:
type: object
properties:
PipelineParameterList:
type: array
items:
$ref: '#/components/schemas/SageMakerPipelineParameter'
description: List of Parameter names and values for SageMaker AI Model Building Pipeline execution.
SqsParameters:
type: object
properties:
MessageGroupId:
type: string
description: The ID of the message group to use as the target.
Tag:
type: object
properties:
Key:
type: string
description: A string you can use to assign a value. The combination of tag keys and values can help you organize
and categorize your resources.
Value:
type: string
description: The value for the specified tag key.
required:
- Key
- Value
Target:
type: object
properties:
Id:
type: string
description: The ID of the target within the specified rule. Use this ID to reference the target when updating the
rule. We recommend using a memorable and unique string.
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 to be used for this target when the rule is triggered.
If one rule triggers multiple targets, you can use a different IAM role for each target.
Input:
type: string
description: Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the
target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.
InputPath:
type: string
description: The value of the JSONPath that is used for extracting part of the matched event when passing it to
the target. You may use JSON dot notation or bracket notation. For more information about JSON paths, see JSONPath.
InputTransformer:
$ref: '#/components/schemas/InputTransformer'
KinesisParameters:
$ref: '#/components/schemas/KinesisParameters'
RunCommandParameters:
$ref: '#/components/schemas/RunCommandParameters'
EcsParameters:
$ref: '#/components/schemas/EcsParameters'
BatchParameters:
$ref: '#/components/schemas/BatchParameters'
SqsParameters:
$ref: '#/components/schemas/SqsParameters'
HttpParameters:
$ref: '#/components/schemas/HttpParameters'
RedshiftDataParameters:
$ref: '#/components/schemas/RedshiftDataParameters'
SageMakerPipelineParameters:
$ref: '#/components/schemas/SageMakerPipelineParameters'
DeadLetterConfig:
$ref: '#/components/schemas/DeadLetterConfig'
RetryPolicy:
$ref: '#/components/schemas/RetryPolicy'
AppSyncParameters:
$ref: '#/components/schemas/AppSyncParameters'
required:
- Id
- Arn
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/eventbridge/service/2015-10-07/eventbridge-2015-10-07.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)