RuleTargetConfig
- class aws_cdk.aws_events.RuleTargetConfig(*, arn, batch_parameters=None, dead_letter_config=None, ecs_parameters=None, http_parameters=None, id=None, input=None, kinesis_parameters=None, retry_policy=None, role=None, run_command_parameters=None, sqs_parameters=None, target_resource=None)
Bases:
object
Properties for an event rule target.
- Parameters:
arn (
str
) – The Amazon Resource Name (ARN) of the target.batch_parameters (
Union
[BatchParametersProperty
,Dict
[str
,Any
],None
]) – Parameters used when the rule invokes Amazon AWS Batch Job/Queue. Default: no parameters setdead_letter_config (
Union
[DeadLetterConfigProperty
,Dict
[str
,Any
],None
]) – Contains information about a dead-letter queue configuration. Default: no dead-letter queue setecs_parameters (
Union
[EcsParametersProperty
,Dict
[str
,Any
],None
]) – The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.http_parameters (
Union
[HttpParametersProperty
,Dict
[str
,Any
],None
]) – Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination. Default: - Noneid (
Optional
[str
]) – (deprecated) A unique, user-defined identifier for the target. Acceptable values include alphanumeric characters, periods (.), hyphens (-), and underscores (_). Default: - an auto-generated idinput (
Optional
[RuleTargetInput
]) – What input to send to the event target. Default: the entire eventkinesis_parameters (
Union
[KinesisParametersProperty
,Dict
[str
,Any
],None
]) – Settings that control shard assignment, when the target is a Kinesis stream. If you don’t include this parameter, eventId is used as the partition key.retry_policy (
Union
[RetryPolicyProperty
,Dict
[str
,Any
],None
]) – A RetryPolicy object that includes information about the retry policy settings. Default: EventBridge default retry policyrole (
Optional
[IRole
]) – Role to use to invoke this event target.run_command_parameters (
Union
[RunCommandParametersProperty
,Dict
[str
,Any
],None
]) – Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.sqs_parameters (
Union
[SqsParametersProperty
,Dict
[str
,Any
],None
]) – Parameters used when the FIFO sqs queue is used an event target by the rule.target_resource (
Optional
[IConstruct
]) – The resource that is backing this target. 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
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_events as events import aws_cdk.aws_iam as iam import aws_cdk.core as cdk # construct: cdk.Construct # role: iam.Role # rule_target_input: events.RuleTargetInput rule_target_config = events.RuleTargetConfig( arn="arn", # the properties below are optional batch_parameters=events.CfnRule.BatchParametersProperty( job_definition="jobDefinition", job_name="jobName", # the properties below are optional array_properties=events.CfnRule.BatchArrayPropertiesProperty( size=123 ), retry_strategy=events.CfnRule.BatchRetryStrategyProperty( attempts=123 ) ), dead_letter_config=events.CfnRule.DeadLetterConfigProperty( arn="arn" ), ecs_parameters=events.CfnRule.EcsParametersProperty( task_definition_arn="taskDefinitionArn", # the properties below are optional capacity_provider_strategy=[events.CfnRule.CapacityProviderStrategyItemProperty( capacity_provider="capacityProvider", # the properties below are optional base=123, weight=123 )], enable_ecs_managed_tags=False, enable_execute_command=False, group="group", launch_type="launchType", network_configuration=events.CfnRule.NetworkConfigurationProperty( aws_vpc_configuration=events.CfnRule.AwsVpcConfigurationProperty( subnets=["subnets"], # the properties below are optional assign_public_ip="assignPublicIp", security_groups=["securityGroups"] ) ), placement_constraints=[events.CfnRule.PlacementConstraintProperty( expression="expression", type="type" )], placement_strategies=[events.CfnRule.PlacementStrategyProperty( field="field", type="type" )], platform_version="platformVersion", propagate_tags="propagateTags", reference_id="referenceId", tag_list=[cdk.CfnTag( key="key", value="value" )], task_count=123 ), http_parameters=events.CfnRule.HttpParametersProperty( header_parameters={ "header_parameters_key": "headerParameters" }, path_parameter_values=["pathParameterValues"], query_string_parameters={ "query_string_parameters_key": "queryStringParameters" } ), id="id", input=rule_target_input, kinesis_parameters=events.CfnRule.KinesisParametersProperty( partition_key_path="partitionKeyPath" ), retry_policy=events.CfnRule.RetryPolicyProperty( maximum_event_age_in_seconds=123, maximum_retry_attempts=123 ), role=role, run_command_parameters=events.CfnRule.RunCommandParametersProperty( run_command_targets=[events.CfnRule.RunCommandTargetProperty( key="key", values=["values"] )] ), sqs_parameters=events.CfnRule.SqsParametersProperty( message_group_id="messageGroupId" ), target_resource=construct )
Attributes
- arn
The Amazon Resource Name (ARN) of the target.
- batch_parameters
Parameters used when the rule invokes Amazon AWS Batch Job/Queue.
- Default:
no parameters set
- dead_letter_config
Contains information about a dead-letter queue configuration.
- Default:
no dead-letter queue set
- ecs_parameters
The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
- http_parameters
Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.
- Default:
None
- id
(deprecated) A unique, user-defined identifier for the target.
Acceptable values include alphanumeric characters, periods (.), hyphens (-), and underscores (_).
- Default:
an auto-generated id
- Deprecated:
no replacement. we will always use an autogenerated id.
- Stability:
deprecated
- input
What input to send to the event target.
- Default:
the entire event
- kinesis_parameters
Settings that control shard assignment, when the target is a Kinesis stream.
If you don’t include this parameter, eventId is used as the partition key.
- retry_policy
A RetryPolicy object that includes information about the retry policy settings.
- Default:
EventBridge default retry policy
- role
Role to use to invoke this event target.
- run_command_parameters
Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.
- sqs_parameters
Parameters used when the FIFO sqs queue is used an event target by the rule.
- target_resource
The resource that is backing this target.
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
- See: