AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Targets are the resources to be invoked when a rule is triggered. Target types include EC2 instances, AWS Lambda functions, Amazon Kinesis streams, Amazon ECS tasks, AWS Step Functions state machines, Run Command, and built-in targets.

Inheritance Hierarchy


Namespace: Amazon.CloudWatchEvents.Model
Assembly: AWSSDK.CloudWatchEvents.dll
Version: 3.x.y.z


public class Target

The Target type exposes the following members


Public Method Target()


Public Property Arn System.String

Gets and sets the property Arn.

The Amazon Resource Name (ARN) of the target.

Public Property BatchParameters Amazon.CloudWatchEvents.Model.BatchParameters

Gets and sets the property BatchParameters.

Contains the job definition, job name, and other parameters if the event target is an AWS Batch job. For more information about AWS Batch, see Jobs in the AWS Batch User Guide.

Public Property EcsParameters Amazon.CloudWatchEvents.Model.EcsParameters

Gets and sets the property EcsParameters.

Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.

Public Property Id System.String

Gets and sets the property Id.

The ID of the target.

Public Property Input System.String

Gets and sets the property Input.

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.

Public Property InputPath System.String

Gets and sets the property InputPath.

The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see JSONPath.

Public Property InputTransformer Amazon.CloudWatchEvents.Model.InputTransformer

Gets and sets the property InputTransformer.

Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.

Public Property KinesisParameters Amazon.CloudWatchEvents.Model.KinesisParameters

Gets and sets the property KinesisParameters.

The custom parameter you can use to control shard assignment, when the target is an Amazon Kinesis stream. If you do not include this parameter, the default is to use the eventId as the partition key.

Public Property RoleArn System.String

Gets and sets the property RoleArn.

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.

Public Property RunCommandParameters Amazon.CloudWatchEvents.Model.RunCommandParameters

Gets and sets the property RunCommandParameters.

Parameters used when you are using the rule to invoke Amazon EC2 Run Command.

Public Property SqsParameters Amazon.CloudWatchEvents.Model.SqsParameters

Gets and sets the property SqsParameters.

Contains the message group ID to use when the target is a FIFO queue.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms