Skip to content
v2.277.0

MonitoringProperty Struct ​

Specifies whether detailed monitoring is enabled for an instance.

For more information about detailed monitoring, see Enable or turn off detailed monitoring for your instances in the Amazon EC2 User Guide .

Monitoring is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const monitoringProperty: ec2.CfnLaunchTemplate.MonitoringProperty = {
  enabled: false,
};
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_ec2 as ec2

monitoring_property = ec2.CfnLaunchTemplate.MonitoringProperty(
    enabled=False
)
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.ec2.*;

MonitoringProperty monitoringProperty = MonitoringProperty.builder()
        .enabled(false)
        .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.EC2;

var monitoringProperty = new MonitoringProperty {
    Enabled = false
};
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"

monitoringProperty := &MonitoringProperty{
	Enabled: jsii.Boolean(false),
}

Properties ​

enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{}#
Specify `true` to enable detailed monitoring.

Otherwise, basic monitoring is enabled.