Interface IRuleTargetConfig
Properties for an event rule target.
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.AWS.Events.dll
Syntax (csharp)
public interface IRuleTargetConfig
Syntax (vb)
Public Interface IRuleTargetConfig
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Events;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK;
Construct construct;
Role role;
RuleTargetInput ruleTargetInput;
var ruleTargetConfig = new RuleTargetConfig {
Arn = "arn",
// the properties below are optional
BatchParameters = new BatchParametersProperty {
JobDefinition = "jobDefinition",
JobName = "jobName",
// the properties below are optional
ArrayProperties = new BatchArrayPropertiesProperty {
Size = 123
},
RetryStrategy = new BatchRetryStrategyProperty {
Attempts = 123
}
},
DeadLetterConfig = new DeadLetterConfigProperty {
Arn = "arn"
},
EcsParameters = new EcsParametersProperty {
TaskDefinitionArn = "taskDefinitionArn",
// the properties below are optional
CapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
CapacityProvider = "capacityProvider",
// the properties below are optional
Base = 123,
Weight = 123
} },
EnableEcsManagedTags = false,
EnableExecuteCommand = false,
Group = "group",
LaunchType = "launchType",
NetworkConfiguration = new NetworkConfigurationProperty {
AwsVpcConfiguration = new AwsVpcConfigurationProperty {
Subnets = new [] { "subnets" },
// the properties below are optional
AssignPublicIp = "assignPublicIp",
SecurityGroups = new [] { "securityGroups" }
}
},
PlacementConstraints = new [] { new PlacementConstraintProperty {
Expression = "expression",
Type = "type"
} },
PlacementStrategies = new [] { new PlacementStrategyProperty {
Field = "field",
Type = "type"
} },
PlatformVersion = "platformVersion",
PropagateTags = "propagateTags",
ReferenceId = "referenceId",
TagList = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TaskCount = 123
},
HttpParameters = new HttpParametersProperty {
HeaderParameters = new Dictionary<string, string> {
{ "headerParametersKey", "headerParameters" }
},
PathParameterValues = new [] { "pathParameterValues" },
QueryStringParameters = new Dictionary<string, string> {
{ "queryStringParametersKey", "queryStringParameters" }
}
},
Id = "id",
Input = ruleTargetInput,
KinesisParameters = new KinesisParametersProperty {
PartitionKeyPath = "partitionKeyPath"
},
RetryPolicy = new RetryPolicyProperty {
MaximumEventAgeInSeconds = 123,
MaximumRetryAttempts = 123
},
Role = role,
RunCommandParameters = new RunCommandParametersProperty {
RunCommandTargets = new [] { new RunCommandTargetProperty {
Key = "key",
Values = new [] { "values" }
} }
},
SqsParameters = new SqsParametersProperty {
MessageGroupId = "messageGroupId"
},
TargetResource = construct
};
Synopsis
Properties
Arn | The Amazon Resource Name (ARN) of the target. |
BatchParameters | Parameters used when the rule invokes Amazon AWS Batch Job/Queue. |
DeadLetterConfig | Contains information about a dead-letter queue configuration. |
EcsParameters | The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task. |
HttpParameters | Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination. |
Id | (deprecated) A unique, user-defined identifier for the target. |
Input | What input to send to the event target. |
KinesisParameters | Settings that control shard assignment, when the target is a Kinesis stream. |
RetryPolicy | A RetryPolicy object that includes information about the retry policy settings. |
Role | Role to use to invoke this event target. |
RunCommandParameters | Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command. |
SqsParameters | Parameters used when the FIFO sqs queue is used an event target by the rule. |
TargetResource | The resource that is backing this target. |
Properties
Arn
The Amazon Resource Name (ARN) of the target.
string Arn { get; }
Property Value
System.String
BatchParameters
Parameters used when the rule invokes Amazon AWS Batch Job/Queue.
virtual CfnRule.IBatchParametersProperty BatchParameters { get; }
Property Value
CfnRule.IBatchParametersProperty
Remarks
Default: no parameters set
DeadLetterConfig
Contains information about a dead-letter queue configuration.
virtual CfnRule.IDeadLetterConfigProperty DeadLetterConfig { get; }
Property Value
CfnRule.IDeadLetterConfigProperty
Remarks
Default: no dead-letter queue set
EcsParameters
The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
virtual CfnRule.IEcsParametersProperty EcsParameters { get; }
Property Value
CfnRule.IEcsParametersProperty
HttpParameters
Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.
virtual CfnRule.IHttpParametersProperty HttpParameters { get; }
Property Value
CfnRule.IHttpParametersProperty
Remarks
Default: - None
Id
(deprecated) A unique, user-defined identifier for the target.
virtual string Id { get; }
Property Value
System.String
Remarks
Acceptable values include alphanumeric characters, periods (.), hyphens (-), and underscores (_).
Default: - an auto-generated id
Stability: Deprecated
Input
What input to send to the event target.
virtual RuleTargetInput Input { get; }
Property Value
Remarks
Default: the entire event
KinesisParameters
Settings that control shard assignment, when the target is a Kinesis stream.
virtual CfnRule.IKinesisParametersProperty KinesisParameters { get; }
Property Value
CfnRule.IKinesisParametersProperty
Remarks
If you don't include this parameter, eventId is used as the partition key.
RetryPolicy
A RetryPolicy object that includes information about the retry policy settings.
virtual CfnRule.IRetryPolicyProperty RetryPolicy { get; }
Property Value
Remarks
Default: EventBridge default retry policy
Role
RunCommandParameters
Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.
virtual CfnRule.IRunCommandParametersProperty RunCommandParameters { get; }
Property Value
CfnRule.IRunCommandParametersProperty
SqsParameters
Parameters used when the FIFO sqs queue is used an event target by the rule.
virtual CfnRule.ISqsParametersProperty SqsParameters { get; }
Property Value
CfnRule.ISqsParametersProperty
TargetResource
The resource that is backing this target.
virtual IConstruct TargetResource { get; }
Property Value
Remarks
This is the resource that will actually have some action performed on it when used as a target (for example, start a build for a CodeBuild project). We need it to determine whether the rule belongs to a different account than the target - if so, we generate a more complex setup, including an additional stack containing the EventBusPolicy.
Default: the target is not backed by any resource