From 640e33218b60a98666d72872cc5fdc7276d02ea4 Mon Sep 17 00:00:00 2001 From: spg Date: Tue, 7 May 2019 15:22:33 -0700 Subject: [PATCH] feat(sfn) Support for ExecutionTime metric --- packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts index cf0161bc7cbd1..1eee9ad06408e 100644 --- a/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts @@ -193,6 +193,15 @@ export class StateMachine extends Resource implements IStateMachine, events.IEve public metricStarted(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('ExecutionsStarted', props); } + + /** + * Metric for the interval, in milliseconds, between the time the execution starts and the time it closes + * + * @default sum over 5 minutes + */ + public metricTime(props?: cloudwatch.MetricOptions): cloudwatch.Metric { + return this.metric('ExecutionTime', props); + } } /**