Skip to content
v2.277.0

Experimental

@aws-cdk/aws-mediaconnect-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

MonitoringMetric Struct ​

Configures a source monitoring metric.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as mediaconnect_alpha from '@aws-cdk/aws-mediaconnect-alpha';
import * as cdk from 'aws-cdk-lib';
const monitoringMetric: mediaconnect_alpha.MonitoringMetric = {
  state: mediaconnect_alpha.State.ENABLED,
  threshold: cdk.Duration.minutes(30),
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_mediaconnect_alpha as mediaconnect_alpha
import aws_cdk as cdk

monitoring_metric = mediaconnect_alpha.MonitoringMetric(
    state=mediaconnect_alpha.State.ENABLED,
    threshold=cdk.Duration.minutes(30)
)
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.mediaconnect.alpha.*;
import software.amazon.awscdk.*;

MonitoringMetric monitoringMetric = MonitoringMetric.builder()
        .state(State.ENABLED)
        .threshold(Duration.minutes(30))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaConnect.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaConnect.Alpha;
using Amazon.CDK;

var monitoringMetric = new MonitoringMetric {
    State = State.ENABLED,
    Threshold = Duration.Minutes(30)
};
go
// Install: go get github.com/aws/aws-cdk-go/awsmediaconnectalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import mediaconnect_alpha "github.com/aws/aws-cdk-go/awsmediaconnectalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"

monitoringMetric := &MonitoringMetric{
	State: mediaconnect_alpha.State_ENABLED,
	Threshold: cdk.Duration_Minutes(jsii.Number(30)),
}

Properties ​

stateStatestateStatestateStateStateStateStateState required #
Whether the metric is enabled or disabled.

The threshold is persisted by the service either way, so you can toggle the metric on and off without losing the threshold value.

thresholdDurationthresholdDurationthresholdDurationThresholdDurationThresholdDuration required #
Threshold in seconds that triggers the metric's alert.

Valid range: 10–60 seconds.