TargetProperty
Struct External
The schedule's target.
EventBridge Scheduler supports templated target that invoke common API operations, as well as universal targets that you can customize to invoke over 6,000 API operations across more than 270 services. You can only specify one templated or universal target for a schedule.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_scheduler as scheduler } from 'aws-cdk-lib';
declare const tags: any;
const targetProperty: scheduler.CfnSchedule.TargetProperty = {
arn: 'arn',
roleArn: 'roleArn',
// the properties below are optional
deadLetterConfig: {
arn: 'arn',
},
ecsParameters: {
taskDefinitionArn: 'taskDefinitionArn',
// the properties below are optional
capacityProviderStrategy: [{
capacityProvider: 'capacityProvider',
// the properties below are optional
base: 123,
weight: 123,
}],
enableEcsManagedTags: false,
enableExecuteCommand: false,
group: 'group',
launchType: 'launchType',
networkConfiguration: {
awsvpcConfiguration: {
subnets: ['subnets'],
// the properties below are optional
assignPublicIp: 'assignPublicIp',
securityGroups: ['securityGroups'],
},
},
placementConstraints: [{
expression: 'expression',
type: 'type',
}],
placementStrategy: [{
field: 'field',
type: 'type',
}],
platformVersion: 'platformVersion',
propagateTags: 'propagateTags',
referenceId: 'referenceId',
tags: tags,
taskCount: 123,
},
eventBridgeParameters: {
detailType: 'detailType',
source: 'source',
},
input: 'input',
kinesisParameters: {
partitionKey: 'partitionKey',
},
retryPolicy: {
maximumEventAgeInSeconds: 123,
maximumRetryAttempts: 123,
},
sageMakerPipelineParameters: {
pipelineParameterList: [{
name: 'name',
value: 'value',
}],
},
sqsParameters: {
messageGroupId: 'messageGroupId',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_scheduler as scheduler
# tags: Any
target_property = scheduler.CfnSchedule.TargetProperty(
arn="arn",
role_arn="roleArn",
# the properties below are optional
dead_letter_config=scheduler.CfnSchedule.DeadLetterConfigProperty(
arn="arn"
),
ecs_parameters=scheduler.CfnSchedule.EcsParametersProperty(
task_definition_arn="taskDefinitionArn",
# the properties below are optional
capacity_provider_strategy=[scheduler.CfnSchedule.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=scheduler.CfnSchedule.NetworkConfigurationProperty(
awsvpc_configuration=scheduler.CfnSchedule.AwsVpcConfigurationProperty(
subnets=["subnets"],
# the properties below are optional
assign_public_ip="assignPublicIp",
security_groups=["securityGroups"]
)
),
placement_constraints=[scheduler.CfnSchedule.PlacementConstraintProperty(
expression="expression",
type="type"
)],
placement_strategy=[scheduler.CfnSchedule.PlacementStrategyProperty(
field="field",
type="type"
)],
platform_version="platformVersion",
propagate_tags="propagateTags",
reference_id="referenceId",
tags=tags,
task_count=123
),
event_bridge_parameters=scheduler.CfnSchedule.EventBridgeParametersProperty(
detail_type="detailType",
source="source"
),
input="input",
kinesis_parameters=scheduler.CfnSchedule.KinesisParametersProperty(
partition_key="partitionKey"
),
retry_policy=scheduler.CfnSchedule.RetryPolicyProperty(
maximum_event_age_in_seconds=123,
maximum_retry_attempts=123
),
sage_maker_pipeline_parameters=scheduler.CfnSchedule.SageMakerPipelineParametersProperty(
pipeline_parameter_list=[scheduler.CfnSchedule.SageMakerPipelineParameterProperty(
name="name",
value="value"
)]
),
sqs_parameters=scheduler.CfnSchedule.SqsParametersProperty(
message_group_id="messageGroupId"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.scheduler.*;
Object tags;
TargetProperty targetProperty = TargetProperty.builder()
.arn("arn")
.roleArn("roleArn")
// the properties below are optional
.deadLetterConfig(DeadLetterConfigProperty.builder()
.arn("arn")
.build())
.ecsParameters(EcsParametersProperty.builder()
.taskDefinitionArn("taskDefinitionArn")
// the properties below are optional
.capacityProviderStrategy(List.of(CapacityProviderStrategyItemProperty.builder()
.capacityProvider("capacityProvider")
// the properties below are optional
.base(123)
.weight(123)
.build()))
.enableEcsManagedTags(false)
.enableExecuteCommand(false)
.group("group")
.launchType("launchType")
.networkConfiguration(NetworkConfigurationProperty.builder()
.awsvpcConfiguration(AwsVpcConfigurationProperty.builder()
.subnets(List.of("subnets"))
// the properties below are optional
.assignPublicIp("assignPublicIp")
.securityGroups(List.of("securityGroups"))
.build())
.build())
.placementConstraints(List.of(PlacementConstraintProperty.builder()
.expression("expression")
.type("type")
.build()))
.placementStrategy(List.of(PlacementStrategyProperty.builder()
.field("field")
.type("type")
.build()))
.platformVersion("platformVersion")
.propagateTags("propagateTags")
.referenceId("referenceId")
.tags(tags)
.taskCount(123)
.build())
.eventBridgeParameters(EventBridgeParametersProperty.builder()
.detailType("detailType")
.source("source")
.build())
.input("input")
.kinesisParameters(KinesisParametersProperty.builder()
.partitionKey("partitionKey")
.build())
.retryPolicy(RetryPolicyProperty.builder()
.maximumEventAgeInSeconds(123)
.maximumRetryAttempts(123)
.build())
.sageMakerPipelineParameters(SageMakerPipelineParametersProperty.builder()
.pipelineParameterList(List.of(SageMakerPipelineParameterProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.sqsParameters(SqsParametersProperty.builder()
.messageGroupId("messageGroupId")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Scheduler;
var tags;
var targetProperty = new TargetProperty {
Arn = "arn",
RoleArn = "roleArn",
// the properties below are optional
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"
} },
PlacementStrategy = new [] { new PlacementStrategyProperty {
Field = "field",
Type = "type"
} },
PlatformVersion = "platformVersion",
PropagateTags = "propagateTags",
ReferenceId = "referenceId",
Tags = tags,
TaskCount = 123
},
EventBridgeParameters = new EventBridgeParametersProperty {
DetailType = "detailType",
Source = "source"
},
Input = "input",
KinesisParameters = new KinesisParametersProperty {
PartitionKey = "partitionKey"
},
RetryPolicy = new RetryPolicyProperty {
MaximumEventAgeInSeconds = 123,
MaximumRetryAttempts = 123
},
SageMakerPipelineParameters = new SageMakerPipelineParametersProperty {
PipelineParameterList = new [] { new SageMakerPipelineParameterProperty {
Name = "name",
Value = "value"
} }
},
SqsParameters = new SqsParametersProperty {
MessageGroupId = "messageGroupId"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var tags interface{}
targetProperty := &TargetProperty{
Arn: jsii.String("arn"),
RoleArn: jsii.String("roleArn"),
// the properties below are optional
DeadLetterConfig: &DeadLetterConfigProperty{
Arn: jsii.String("arn"),
},
EcsParameters: &EcsParametersProperty{
TaskDefinitionArn: jsii.String("taskDefinitionArn"),
// the properties below are optional
CapacityProviderStrategy: []interface{}{
&CapacityProviderStrategyItemProperty{
CapacityProvider: jsii.String("capacityProvider"),
// the properties below are optional
Base: jsii.Number(123),
Weight: jsii.Number(123),
},
},
EnableEcsManagedTags: jsii.Boolean(false),
EnableExecuteCommand: jsii.Boolean(false),
Group: jsii.String("group"),
LaunchType: jsii.String("launchType"),
NetworkConfiguration: &NetworkConfigurationProperty{
AwsvpcConfiguration: &AwsVpcConfigurationProperty{
Subnets: []*string{
jsii.String("subnets"),
},
// the properties below are optional
AssignPublicIp: jsii.String("assignPublicIp"),
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
},
},
PlacementConstraints: []interface{}{
&PlacementConstraintProperty{
Expression: jsii.String("expression"),
Type: jsii.String("type"),
},
},
PlacementStrategy: []interface{}{
&PlacementStrategyProperty{
Field: jsii.String("field"),
Type: jsii.String("type"),
},
},
PlatformVersion: jsii.String("platformVersion"),
PropagateTags: jsii.String("propagateTags"),
ReferenceId: jsii.String("referenceId"),
Tags: tags,
TaskCount: jsii.Number(123),
},
EventBridgeParameters: &EventBridgeParametersProperty{
DetailType: jsii.String("detailType"),
Source: jsii.String("source"),
},
Input: jsii.String("input"),
KinesisParameters: &KinesisParametersProperty{
PartitionKey: jsii.String("partitionKey"),
},
RetryPolicy: &RetryPolicyProperty{
MaximumEventAgeInSeconds: jsii.Number(123),
MaximumRetryAttempts: jsii.Number(123),
},
SageMakerPipelineParameters: &SageMakerPipelineParametersProperty{
PipelineParameterList: []interface{}{
&SageMakerPipelineParameterProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
SqsParameters: &SqsParametersProperty{
MessageGroupId: jsii.String("messageGroupId"),
},
}
Properties
The Amazon Resource Name (ARN) of the target.
deadLetterConfigoptionalIResolvable | CfnSchedule.dead_letter_configoptionaltyping.Union[IResolvable, DeadLetterConfigProperty]deadLetterConfigoptionalIResolvableDeadLetterConfigoptionalIResolvableDeadLetterConfigoptionalinterface{} #An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule.
If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.
ecsParametersoptionalIResolvable | CfnSchedule.ecs_parametersoptionaltyping.Union[IResolvable, EcsParametersProperty]ecsParametersoptionalIResolvableEcsParametersoptionalIResolvableEcsParametersoptionalinterface{} #The templated target type for the Amazon ECS `RunTask` API operation.
eventBridgeParametersoptionalIResolvable | CfnSchedule.event_bridge_parametersoptionaltyping.Union[IResolvable, EventBridgeParametersProperty]eventBridgeParametersoptionalIResolvableEventBridgeParametersoptionalIResolvableEventBridgeParametersoptionalinterface{} #The templated target type for the EventBridge `PutEvents` API operation.
The text, or well-formed JSON, passed to the target.
notes
If you are configuring a templated Lambda , AWS Step Functions , or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, Amazon EventBridge Scheduler delivers a default notification to the target.
kinesisParametersoptionalIResolvable | CfnSchedule.kinesis_parametersoptionaltyping.Union[IResolvable, KinesisParametersProperty]kinesisParametersoptionalIResolvableKinesisParametersoptionalIResolvableKinesisParametersoptionalinterface{} #The templated target type for the Amazon Kinesis `PutRecord` API operation.
retryPolicyoptionalIResolvable | CfnSchedule.RetryPolicyPropertyretry_policyoptionaltyping.Union[IResolvable, RetryPolicyProperty]retryPolicyoptionalIResolvableRetryPolicyoptionalIResolvableRetryPolicyoptionalinterface{} #A `RetryPolicy` object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.
The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.
sageMakerPipelineParametersoptionalIResolvable | CfnSchedule.sage_maker_pipeline_parametersoptionaltyping.Union[IResolvable, SageMakerPipelineParametersProperty]sageMakerPipelineParametersoptionalIResolvableSageMakerPipelineParametersoptionalIResolvableSageMakerPipelineParametersoptionalinterface{} #The templated target type for the Amazon SageMaker `StartPipelineExecution` API operation.
sqsParametersoptionalIResolvable | CfnSchedule.sqs_parametersoptionaltyping.Union[IResolvable, SqsParametersProperty]sqsParametersoptionalIResolvableSqsParametersoptionalIResolvableSqsParametersoptionalinterface{} #The templated target type for the Amazon SQS `SendMessage` API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the *Amazon SQS Developer Guide* .