Skip to content
v2.274.0

EventBridgeSchedulerCreateScheduleTask ​

Create a new AWS EventBridge Scheduler schedule.

Example ​

ts
import * as scheduler from 'aws-cdk-lib/aws-scheduler';
import * as kms from 'aws-cdk-lib/aws-kms';

declare const key: kms.Key;
declare const scheduleGroup: scheduler.CfnScheduleGroup;
declare const targetQueue: sqs.Queue;
declare const deadLetterQueue: sqs.Queue;

const schedulerRole = new iam.Role(this, 'SchedulerRole', {
  assumedBy: new iam.ServicePrincipal('scheduler.amazonaws.com'),
});
// To send the message to the queue
// This policy changes depending on the type of target.
schedulerRole.addToPrincipalPolicy(new iam.PolicyStatement({
  actions: ['sqs:SendMessage'],
  resources: [targetQueue.queueArn],
}));

const createScheduleTask1 = new tasks.EventBridgeSchedulerCreateScheduleTask(this, 'createSchedule', {
  scheduleName: 'TestSchedule',
  actionAfterCompletion: tasks.ActionAfterCompletion.NONE,
  clientToken: 'testToken',
  description: 'TestDescription',
  startDate: new Date(),
  endDate: new Date(new Date().getTime() + 1000 * 60 * 60),
  flexibleTimeWindow: Duration.minutes(5),
  groupName: scheduleGroup.ref,
  kmsKey: key,
  schedule: tasks.Schedule.rate(Duration.minutes(5)),
  timezone: 'UTC',
  enabled: true,
  target: new tasks.EventBridgeSchedulerTarget({
    arn: targetQueue.queueArn,
    role: schedulerRole,
    retryPolicy: {
      maximumRetryAttempts: 2,
      maximumEventAge: Duration.minutes(5),
    },
    deadLetterQueue,
  }),
});
python
import aws_cdk.aws_scheduler as scheduler
import aws_cdk.aws_kms as kms

# key: kms.Key
# schedule_group: scheduler.CfnScheduleGroup
# target_queue: sqs.Queue
# dead_letter_queue: sqs.Queue


scheduler_role = iam.Role(self, "SchedulerRole",
    assumed_by=iam.ServicePrincipal("scheduler.amazonaws.com")
)
# To send the message to the queue
# This policy changes depending on the type of target.
scheduler_role.add_to_principal_policy(iam.PolicyStatement(
    actions=["sqs:SendMessage"],
    resources=[target_queue.queue_arn]
))

create_schedule_task1 = tasks.EventBridgeSchedulerCreateScheduleTask(self, "createSchedule",
    schedule_name="TestSchedule",
    action_after_completion=tasks.ActionAfterCompletion.NONE,
    client_token="testToken",
    description="TestDescription",
    start_date=Date(),
    end_date=Date(Date().get_time() + 1000 * 60 * 60),
    flexible_time_window=Duration.minutes(5),
    group_name=schedule_group.ref,
    kms_key=key,
    schedule=tasks.Schedule.rate(Duration.minutes(5)),
    timezone="UTC",
    enabled=True,
    target=tasks.EventBridgeSchedulerTarget(
        arn=target_queue.queue_arn,
        role=scheduler_role,
        retry_policy=tasks.RetryPolicy(
            maximum_retry_attempts=2,
            maximum_event_age=Duration.minutes(5)
        ),
        dead_letter_queue=dead_letter_queue
    )
)
java
import software.amazon.awscdk.services.scheduler.*;
import software.amazon.awscdk.services.kms.*;

Key key;
CfnScheduleGroup scheduleGroup;
Queue targetQueue;
Queue deadLetterQueue;


Role schedulerRole = Role.Builder.create(this, "SchedulerRole")
        .assumedBy(new ServicePrincipal("scheduler.amazonaws.com"))
        .build();
// To send the message to the queue
// This policy changes depending on the type of target.
schedulerRole.addToPrincipalPolicy(PolicyStatement.Builder.create()
        .actions(List.of("sqs:SendMessage"))
        .resources(List.of(targetQueue.getQueueArn()))
        .build());

EventBridgeSchedulerCreateScheduleTask createScheduleTask1 = EventBridgeSchedulerCreateScheduleTask.Builder.create(this, "createSchedule")
        .scheduleName("TestSchedule")
        .actionAfterCompletion(ActionAfterCompletion.NONE)
        .clientToken("testToken")
        .description("TestDescription")
        .startDate(new Date())
        .endDate(new Date(new Date().getTime() + 1000 * 60 * 60))
        .flexibleTimeWindow(Duration.minutes(5))
        .groupName(scheduleGroup.getRef())
        .kmsKey(key)
        .schedule(Schedule.rate(Duration.minutes(5)))
        .timezone("UTC")
        .enabled(true)
        .target(EventBridgeSchedulerTarget.Builder.create()
                .arn(targetQueue.getQueueArn())
                .role(schedulerRole)
                .retryPolicy(RetryPolicy.builder()
                        .maximumRetryAttempts(2)
                        .maximumEventAge(Duration.minutes(5))
                        .build())
                .deadLetterQueue(deadLetterQueue)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.Scheduler;
using Amazon.CDK.AWS.KMS;

Key key;
CfnScheduleGroup scheduleGroup;
Queue targetQueue;
Queue deadLetterQueue;


var schedulerRole = new Role(this, "SchedulerRole", new RoleProps {
    AssumedBy = new ServicePrincipal("scheduler.amazonaws.com")
});
// To send the message to the queue
// This policy changes depending on the type of target.
schedulerRole.AddToPrincipalPolicy(new PolicyStatement(new PolicyStatementProps {
    Actions = new [] { "sqs:SendMessage" },
    Resources = new [] { targetQueue.QueueArn }
}));

var createScheduleTask1 = new EventBridgeSchedulerCreateScheduleTask(this, "createSchedule", new EventBridgeSchedulerCreateScheduleTaskProps {
    ScheduleName = "TestSchedule",
    ActionAfterCompletion = ActionAfterCompletion.NONE,
    ClientToken = "testToken",
    Description = "TestDescription",
    StartDate = new Date(),
    EndDate = new Date(new Date().GetTime() + 1000 * 60 * 60),
    FlexibleTimeWindow = Duration.Minutes(5),
    GroupName = scheduleGroup.Ref,
    KmsKey = key,
    Schedule = Schedule.Rate(Duration.Minutes(5)),
    Timezone = "UTC",
    Enabled = true,
    Target = new EventBridgeSchedulerTarget(new EventBridgeSchedulerTargetProps {
        Arn = targetQueue.QueueArn,
        Role = schedulerRole,
        RetryPolicy = new RetryPolicy {
            MaximumRetryAttempts = 2,
            MaximumEventAge = Duration.Minutes(5)
        },
        DeadLetterQueue = deadLetterQueue
    })
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import scheduler "github.com/aws/aws-cdk-go/awscdk"
import kms "github.com/aws/aws-cdk-go/awscdk"

var key Key
var scheduleGroup CfnScheduleGroup
var targetQueue Queue
var deadLetterQueue Queue


schedulerRole := iam.NewRole(this, jsii.String("SchedulerRole"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("scheduler.amazonaws.com")),
})
// To send the message to the queue
// This policy changes depending on the type of target.
schedulerRole.AddToPrincipalPolicy(iam.NewPolicyStatement(&PolicyStatementProps{
	Actions: []*string{
		jsii.String("sqs:SendMessage"),
	},
	Resources: []*string{
		targetQueue.queueArn,
	},
}))

createScheduleTask1 := tasks.NewEventBridgeSchedulerCreateScheduleTask(this, jsii.String("createSchedule"), &EventBridgeSchedulerCreateScheduleTaskProps{
	ScheduleName: jsii.String("TestSchedule"),
	ActionAfterCompletion: tasks.ActionAfterCompletion_NONE,
	ClientToken: jsii.String("testToken"),
	Description: jsii.String("TestDescription"),
	StartDate: NewDate(),
	EndDate: NewDate(NewDate().getTime() + 1000 * 60 * 60),
	FlexibleTimeWindow: awscdk.Duration_Minutes(jsii.Number(5)),
	GroupName: scheduleGroup.ref,
	KmsKey: key,
	Schedule: tasks.Schedule_Rate(awscdk.Duration_*Minutes(jsii.Number(5))),
	Timezone: jsii.String("UTC"),
	Enabled: jsii.Boolean(true),
	Target: tasks.NewEventBridgeSchedulerTarget(&EventBridgeSchedulerTargetProps{
		Arn: targetQueue.queueArn,
		Role: schedulerRole,
		RetryPolicy: &RetryPolicy{
			MaximumRetryAttempts: jsii.Number(2),
			MaximumEventAge: awscdk.Duration_*Minutes(jsii.Number(5)),
		},
		DeadLetterQueue: *DeadLetterQueue,
	}),
})

Initializer ​

ts
new EventBridgeSchedulerCreateScheduleTask(scope: Construct, id: string, props: EventBridgeSchedulerCreateScheduleTaskProps)
python
EventBridgeSchedulerCreateScheduleTask(scope: Construct, id: str, props: EventBridgeSchedulerCreateScheduleTaskProps)
java
new EventBridgeSchedulerCreateScheduleTask(Construct scope, String id, EventBridgeSchedulerCreateScheduleTaskProps props)
csharp
new EventBridgeSchedulerCreateScheduleTask(Construct scope, string id, EventBridgeSchedulerCreateScheduleTaskProps props)
go
NewEventBridgeSchedulerCreateScheduleTask(Scope Construct, Id *string, Props EventBridgeSchedulerCreateScheduleTaskProps)

Construct Props ​

actionAfterCompletionActionAfterCompletionaction_after_completionActionAfterCompletionactionAfterCompletionActionAfterCompletionActionAfterCompletionActionAfterCompletionActionAfterCompletionActionAfterCompletion= ActionAfterCompletion.NONE#
Specifies the action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target.
assign{ [key: string]: any }assigntyping.Mapping[str, Any]assignMap<String, Object>AssignIDictionary<string, object>Assign*map[string]interface{}= Not assign variables#
Workflow variables to store in this step.

Using workflow variables, you can store data in a step and retrieve that data in future steps.

clientTokenstringclient_tokenstrclientTokenStringClientTokenstringClientToken*string= Automatically generated#
Unique, case-sensitive identifier to ensure the idempotency of the request.
commentstringcommentstrcommentStringCommentstringComment*string= No comment#
A comment describing this state.
credentialsCredentialscredentialsCredentialscredentialsCredentialsCredentialsCredentialsCredentialsCredentials= None (Task is executed using the…#
Credentials for an IAM Role that the State Machine assumes for executing the task.

This enables cross-account resource invocations.

default

Default: None (Task is executed using the State Machine's execution role)

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= No description#
The description for the schedule.
enabledbooleanenabledboolenabledBooleanEnabledboolEnabled*bool= true#
Specifies whether the schedule is enabled or disabled.
endDatedateend_datedatetimeendDateInstantEndDateDateTimeEndDate*time.Time= No end date#
The date, in UTC, before which the schedule can invoke its target.

Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. EventBridge Scheduler ignores EndDate for one-time schedules.

flexibleTimeWindowDurationflexible_time_windowDurationflexibleTimeWindowDurationFlexibleTimeWindowDurationFlexibleTimeWindowDuration= Flexible time window is not enab…#
The maximum time window during which a schedule can be invoked.

Minimum value is 1 minute. Maximum value is 1440 minutes (1 day).

default

Default: Flexible time window is not enabled.

groupNamestringgroup_namestrgroupNameStringGroupNamestringGroupName*string= The default schedule group is us…#
The name of the schedule group to associate with this schedule.
default

Default: The default schedule group is used.

heartbeatDurationheartbeatDurationheartbeatDurationHeartbeatDurationHeartbeatDuration= Nonedeprecated#
use `heartbeatTimeout`
heartbeatTimeoutTimeoutheartbeat_timeoutTimeoutheartbeatTimeoutTimeoutHeartbeatTimeoutTimeoutHeartbeatTimeoutTimeout= None#
Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

inputPathstringinput_pathstrinputPathStringInputPathstringInputPath*string= $#
JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.

integrationPatternIntegrationPatternintegration_patternIntegrationPatternintegrationPatternIntegrationPatternIntegrationPatternIntegrationPatternIntegrationPatternIntegrationPattern= `IntegrationPattern.REQUEST_RESP…#
AWS Step Functions integrates with services directly in the Amazon States Language.

You can control these AWS services using service integration patterns.

Depending on the AWS Service, the Service Integration Pattern availability will vary.

default

Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

kmsKeyIKeykms_keyIKeykmsKeyIKeyKmsKeyIKeyKmsKeyIKey= Use automatically generated KMS …#
The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt payload.
default

Default: Use automatically generated KMS key

outputPathstringoutput_pathstroutputPathStringOutputPathstringOutputPath*string= $#
JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.

outputsanyoutputsAnyoutputsObjectOutputsobjectOutputsinterface{}= $states.result or $states.errorO…#
Used to specify and transform output from the state.
notes · default

When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.

Default: $states.result or $states.errorOutput

queryLanguageQueryLanguagequery_languageQueryLanguagequeryLanguageQueryLanguageQueryLanguageQueryLanguageQueryLanguageQueryLanguage= JSONPath#
The name of the query language used by the state.

If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.

resultPathstringresult_pathstrresultPathStringResultPathstringResultPath*string= $#
JSONPath expression to indicate where to inject the state's output.

May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.

resultSelector{ [key: string]: any }result_selectortyping.Mapping[str, Any]resultSelectorMap<String, Object>ResultSelectorIDictionary<string, object>ResultSelector*map[string]interface{}= None#
The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.

scheduleSchedulescheduleSchedulescheduleScheduleScheduleScheduleScheduleSchedulerequired#
The schedule that defines when the schedule will trigger.
scheduleNamestringschedule_namestrscheduleNameStringScheduleNamestringScheduleName*stringrequired#
Schedule name.
startDatedatestart_datedatetimestartDateInstantStartDateDateTimeStartDate*time.Time= No start date#
The date, in UTC, after which the schedule can begin invoking its target.

Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. EventBridge Scheduler ignores StartDate for one-time schedules.

stateNamestringstate_namestrstateNameStringStateNamestringStateName*string= The construct ID will be used as…#
Optional name for this state.
default

Default: The construct ID will be used as state name

taskTimeoutTimeouttask_timeoutTimeouttaskTimeoutTimeoutTaskTimeoutTimeoutTaskTimeoutTimeout= None#
Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

timeoutDurationtimeoutDurationtimeoutDurationTimeoutDurationTimeoutDuration= Nonedeprecated#
use `taskTimeout`
timezonestringtimezonestrtimezoneStringTimezonestringTimezone*string= UTC#
The timezone in which the scheduling expression is evaluated.

Properties ​

endStatesINextable[]end_statestyping.List[INextable]endStatesList<INextable>EndStatesINextable[]EndStates*[]INextablerequired#
Continuable states of this Chainable.
idstringidstridStringIdstringId*stringrequired#
Descriptive identifier for this chainable.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
startStateStatestart_stateStatestartStateStateStartStateStateStartStateStaterequired#
First state of this Chainable.
stateIdstringstate_idstrstateIdStringStateIdstringStateId*stringrequired#
Tokenized string that evaluates to the state's ID.

Methods ​

addCatch(handler: IChainable, props?: CatchProps): TaskStateBasedef add_catch(self, handler: IChainable, props: typing.Optional[CatchProps] = None) -> TaskStateBasepublic TaskStateBase addCatch(IChainable handler, CatchProps props)public TaskStateBase AddCatch(IChainable handler, CatchProps? props = null)func AddCatch(Handler IChainable, Props CatchProps) TaskStateBase#
Add a recovery handler for this state.

When a particular error occurs, execution will continue at the error handler instead of failing the state machine execution.

addPrefix(x: string): voiddef add_prefix(self, x: str) -> Nonepublic void addPrefix(String x)public void AddPrefix(string x)func AddPrefix(X *string)#
Add a prefix to the stateId of this state.
addRetry(props?: RetryProps): TaskStateBasedef add_retry(self, props: typing.Optional[RetryProps] = None) -> TaskStateBasepublic TaskStateBase addRetry(RetryProps props)public TaskStateBase AddRetry(RetryProps? props = null)func AddRetry(Props RetryProps) TaskStateBase#
Add retry configuration for this state.

This controls if and how the execution will be retried if a particular error occurs.

bindToGraph(graph: StateGraph): voiddef bind_to_graph(self, graph: StateGraph) -> Nonepublic void bindToGraph(StateGraph graph)public void BindToGraph(StateGraph graph)func BindToGraph(Graph StateGraph)#
Register this state as part of the given graph.

Don't call this. It will be called automatically when you work with states normally.

filterNextables(states: State[]): INextable[]@staticmethod def filter_nextables(states: typing.List[State]) -> typing.List[INextable]public static List<INextable> filterNextables(List<State> states)public static INextable[] FilterNextables(State[] states)func FilterNextables(States *[]State) *[]INextablestatic#
Return only the states that allow chaining from an array of states.
findReachableEndStates(start: State, options?: FindStateOptions): State[]@staticmethod def find_reachable_end_states(start: State, options: typing.Optional[FindStateOptions] = None) -> typing.List[State]public static List<State> findReachableEndStates(State start, FindStateOptions options)public static State[] FindReachableEndStates(State start, FindStateOptions? options = null)func FindReachableEndStates(Start State, Options FindStateOptions) *[]Statestatic#
Find the set of end states states reachable through transitions from the given start state.
findReachableStates(start: State, options?: FindStateOptions): State[]@staticmethod def find_reachable_states(start: State, options: typing.Optional[FindStateOptions] = None) -> typing.List[State]public static List<State> findReachableStates(State start, FindStateOptions options)public static State[] FindReachableStates(State start, FindStateOptions? options = null)func FindReachableStates(Start State, Options FindStateOptions) *[]Statestatic#
Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

jsonata(scope: Construct, id: string, props: EventBridgeSchedulerCreateScheduleTaskJsonataProps): EventBridgeSchedulerCreateScheduleTask // chainable@staticmethod def jsonata(scope: Construct, id: str, props: EventBridgeSchedulerCreateScheduleTaskJsonataProps) -> EventBridgeSchedulerCreateScheduleTaskpublic static EventBridgeSchedulerCreateScheduleTask jsonata(Construct scope, String id, EventBridgeSchedulerCreateScheduleTaskJsonataProps props)public static EventBridgeSchedulerCreateScheduleTask Jsonata(Construct scope, string id, EventBridgeSchedulerCreateScheduleTaskJsonataProps props)func Jsonata(Scope Construct, Id *string, Props EventBridgeSchedulerCreateScheduleTaskJsonataProps) EventBridgeSchedulerCreateScheduleTaskstatic#
Create an AWS EventBridge Scheduler schedule using JSONata.
jsonPath(scope: Construct, id: string, props: EventBridgeSchedulerCreateScheduleTaskJsonPathProps): EventBridgeSchedulerCreateScheduleTask // chainable@staticmethod def json_path(scope: Construct, id: str, props: EventBridgeSchedulerCreateScheduleTaskJsonPathProps) -> EventBridgeSchedulerCreateScheduleTaskpublic static EventBridgeSchedulerCreateScheduleTask jsonPath(Construct scope, String id, EventBridgeSchedulerCreateScheduleTaskJsonPathProps props)public static EventBridgeSchedulerCreateScheduleTask JsonPath(Construct scope, string id, EventBridgeSchedulerCreateScheduleTaskJsonPathProps props)func JsonPath(Scope Construct, Id *string, Props EventBridgeSchedulerCreateScheduleTaskJsonPathProps) EventBridgeSchedulerCreateScheduleTaskstatic#
Create an AWS EventBridge Scheduler schedule using JSONPath.
metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric#
Return the given named metric for this Task.
metricFailed(props?: MetricOptions): Metricdef metric_failed(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFailed(MetricOptions props)public Metric MetricFailed(MetricOptions? props = null)func MetricFailed(Props MetricOptions) Metric#
Metric for the number of times this activity fails.
metricHeartbeatTimedOut(props?: MetricOptions): Metricdef metric_heartbeat_timed_out(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHeartbeatTimedOut(MetricOptions props)public Metric MetricHeartbeatTimedOut(MetricOptions? props = null)func MetricHeartbeatTimedOut(Props MetricOptions) Metric#
Metric for the number of times the heartbeat times out for this activity.
metricRunTime(props?: MetricOptions): Metricdef metric_run_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricRunTime(MetricOptions props)public Metric MetricRunTime(MetricOptions? props = null)func MetricRunTime(Props MetricOptions) Metric#
The interval, in milliseconds, between the time the Task starts and the time it closes.
metricScheduled(props?: MetricOptions): Metricdef metric_scheduled(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricScheduled(MetricOptions props)public Metric MetricScheduled(MetricOptions? props = null)func MetricScheduled(Props MetricOptions) Metric#
Metric for the number of times this activity is scheduled.
metricScheduleTime(props?: MetricOptions): Metricdef metric_schedule_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricScheduleTime(MetricOptions props)public Metric MetricScheduleTime(MetricOptions? props = null)func MetricScheduleTime(Props MetricOptions) Metric#
The interval, in milliseconds, for which the activity stays in the schedule state.
metricStarted(props?: MetricOptions): Metricdef metric_started(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricStarted(MetricOptions props)public Metric MetricStarted(MetricOptions? props = null)func MetricStarted(Props MetricOptions) Metric#
Metric for the number of times this activity is started.
metricSucceeded(props?: MetricOptions): Metricdef metric_succeeded(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSucceeded(MetricOptions props)public Metric MetricSucceeded(MetricOptions? props = null)func MetricSucceeded(Props MetricOptions) Metric#
Metric for the number of times this activity succeeds.
metricTime(props?: MetricOptions): Metricdef metric_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTime(MetricOptions props)public Metric MetricTime(MetricOptions? props = null)func MetricTime(Props MetricOptions) Metric#
The interval, in milliseconds, between the time the activity is scheduled and the time it closes.
metricTimedOut(props?: MetricOptions): Metricdef metric_timed_out(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTimedOut(MetricOptions props)public Metric MetricTimedOut(MetricOptions? props = null)func MetricTimedOut(Props MetricOptions) Metric#
Metric for the number of times this activity times out.
prefixStates(root: IConstruct, prefix: string): void@staticmethod def prefix_states(root: IConstruct, prefix: str) -> Nonepublic static void prefixStates(IConstruct root, String prefix)public static void PrefixStates(IConstruct root, string prefix)func PrefixStates(Root IConstruct, Prefix *string)static#
Add a prefix to the stateId of all States found in a construct tree.
toStateJson(topLevelQueryLanguage?: QueryLanguage): jsondef to_state_json(self, top_level_query_language: typing.Optional[QueryLanguage] = None) -> Anypublic Object toStateJson(QueryLanguage topLevelQueryLanguage)public object ToStateJson(QueryLanguage? topLevelQueryLanguage = null)func ToStateJson(TopLevelQueryLanguage QueryLanguage) interface{}#
Return the Amazon States Language object for this state.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining