ScheduleTargetConfig Struct
Config of a Schedule Target used during initialization of Schedule.
| Source | aws-scheduler/lib/target.ts |
|---|---|
| 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_iam as iam } from 'aws-cdk-lib';
import { aws_scheduler as scheduler } from 'aws-cdk-lib';
declare const role: iam.Role;
declare const scheduleTargetInput: scheduler.ScheduleTargetInput;
declare const tags: any;
const scheduleTargetConfig: scheduler.ScheduleTargetConfig = {
arn: 'arn',
role: role,
// 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: scheduleTargetInput,
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_iam as iam
from aws_cdk import aws_scheduler as scheduler
# role: iam.Role
# schedule_target_input: scheduler.ScheduleTargetInput
# tags: Any
schedule_target_config = scheduler.ScheduleTargetConfig(
arn="arn",
role=role,
# 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=schedule_target_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.iam.*;
import software.amazon.awscdk.services.scheduler.*;
Role role;
ScheduleTargetInput scheduleTargetInput;
Object tags;
ScheduleTargetConfig scheduleTargetConfig = ScheduleTargetConfig.builder()
.arn("arn")
.role(role)
// 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(scheduleTargetInput)
.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.IAM;
using Amazon.CDK.AWS.Scheduler;
Role role;
ScheduleTargetInput scheduleTargetInput;
var tags;
var scheduleTargetConfig = new ScheduleTargetConfig {
Arn = "arn",
Role = role,
// 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 = scheduleTargetInput,
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"
import "github.com/aws/aws-cdk-go/awscdk"
var role Role
var scheduleTargetInput ScheduleTargetInput
var tags interface{}
scheduleTargetConfig := &ScheduleTargetConfig{
Arn: jsii.String("arn"),
Role: role,
// 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: scheduleTargetInput,
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.
deadLetterConfigoptionalCfnSchedule.dead_letter_configoptionalDeadLetterConfigPropertydeadLetterConfigoptionalDeadLetterConfigPropertyDeadLetterConfigoptionalDeadLetterConfigPropertyDeadLetterConfigoptionalDeadLetterConfigProperty #An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule.
Default: No dead-letter queue
If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.
ecsParametersoptionalCfnSchedule.ecs_parametersoptionalEcsParametersPropertyecsParametersoptionalEcsParametersPropertyEcsParametersoptionalEcsParametersPropertyEcsParametersoptionalEcsParametersProperty #The templated target type for the Amazon ECS RunTask API Operation.
Default: No parameters
eventBridgeParametersoptionalCfnSchedule.event_bridge_parametersoptionalEventBridgeParametersPropertyeventBridgeParametersoptionalEventBridgeParametersPropertyEventBridgeParametersoptionalEventBridgeParametersPropertyEventBridgeParametersoptionalEventBridgeParametersProperty #The templated target type for the EventBridge PutEvents API operation.
Default: No parameters
inputoptionalScheduleTargetInputinputoptionalScheduleTargetInputinputoptionalScheduleTargetInputInputoptionalScheduleTargetInputInputoptionalScheduleTargetInput #What input to pass to the target.
Default: No input
kinesisParametersoptionalCfnSchedule.kinesis_parametersoptionalKinesisParametersPropertykinesisParametersoptionalKinesisParametersPropertyKinesisParametersoptionalKinesisParametersPropertyKinesisParametersoptionalKinesisParametersProperty #The templated target type for the Amazon Kinesis PutRecord API operation.
Default: No parameters
retryPolicyoptionalCfnSchedule.RetryPolicyPropertyretry_policyoptionalRetryPolicyPropertyretryPolicyoptionalRetryPolicyPropertyRetryPolicyoptionalRetryPolicyPropertyRetryPolicyoptionalRetryPolicyProperty #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.
Default: Maximum retry attempts of 185 and maximum age of 86400 seconds (1 day)
sageMakerPipelineParametersoptionalCfnSchedule.sage_maker_pipeline_parametersoptionalSageMakerPipelineParametersPropertysageMakerPipelineParametersoptionalSageMakerPipelineParametersPropertySageMakerPipelineParametersoptionalSageMakerPipelineParametersPropertySageMakerPipelineParametersoptionalSageMakerPipelineParametersProperty #The templated target type for the Amazon SageMaker StartPipelineExecution API operation.
Default: No parameters
sqsParametersoptionalCfnSchedule.sqs_parametersoptionalSqsParametersPropertysqsParametersoptionalSqsParametersPropertySqsParametersoptionalSqsParametersPropertySqsParametersoptionalSqsParametersProperty #The templated target type for the Amazon SQS SendMessage API Operation.
Default: No parameters