# StateTransitionMetric

Metrics on the rate limiting performed on state machine execution.

These rate limits are shared across all state machines.

- Source: [`aws-stepfunctions/lib/state-transition-metrics.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/state-transition-metrics.ts#L8)

## Example

TypeScript:

```ts
new cloudwatch.Alarm(this, 'ThrottledAlarm', {
  metric: sfn.StateTransitionMetric.metricThrottledEvents(),
  threshold: 10,
  evaluationPeriods: 2,
});
```

Python:

```python
cloudwatch.Alarm(self, "ThrottledAlarm",
    metric=sfn.StateTransitionMetric.metric_throttled_events(),
    threshold=10,
    evaluation_periods=2
)
```

Java:

```java
Alarm.Builder.create(this, "ThrottledAlarm")
        .metric(StateTransitionMetric.metricThrottledEvents())
        .threshold(10)
        .evaluationPeriods(2)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
new Alarm(this, "ThrottledAlarm", new AlarmProps {
    Metric = StateTransitionMetric.MetricThrottledEvents(),
    Threshold = 10,
    EvaluationPeriods = 2
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
cloudwatch.NewAlarm(this, jsii.String("ThrottledAlarm"), &AlarmProps{
	Metric: sfn.StateTransitionMetric_MetricThrottledEvents(),
	Threshold: jsii.Number(10),
	EvaluationPeriods: jsii.Number(2),
})
```

## Initializer

TypeScript:

```ts
new StateTransitionMetric()
```

Python:

```python
StateTransitionMetric()
```

Java:

```java
new StateTransitionMetric()
```

C# / .NET:

```csharp
new StateTransitionMetric()
```

Golang:

```go
NewStateTransitionMetric()
```

## Methods

- `metric(metricName: string, props?: MetricOptions): Metric` (static) — Return the given named metric for the service's state transition metrics.

- `metricConsumedCapacity(props?: MetricOptions): Metric` (static) — Metric for the number of available state transitions per second.

- `metricProvisionedBucketSize(props?: MetricOptions): Metric` (static) — Metric for the number of available state transitions.

- `metricProvisionedRefillRate(props?: MetricOptions): Metric` (static) — Metric for the provisioned steady-state execution rate.

- `metricThrottledEvents(props?: MetricOptions): Metric` (static) — Metric for the number of throttled state transitions.
