Skip to content
v2.278.0

InstanceRequireImdsv2AspectProps Struct ​

Properties for InstanceRequireImdsv2Aspect.

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 instanceRequireImdsv2AspectProps: ec2.InstanceRequireImdsv2AspectProps = {
  suppressLaunchTemplateWarning: false,
  suppressWarnings: 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

instance_require_imdsv2_aspect_props = ec2.InstanceRequireImdsv2AspectProps(
    suppress_launch_template_warning=False,
    suppress_warnings=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.*;

InstanceRequireImdsv2AspectProps instanceRequireImdsv2AspectProps = InstanceRequireImdsv2AspectProps.builder()
        .suppressLaunchTemplateWarning(false)
        .suppressWarnings(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 instanceRequireImdsv2AspectProps = new InstanceRequireImdsv2AspectProps {
    SuppressLaunchTemplateWarning = false,
    SuppressWarnings = 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"

instanceRequireImdsv2AspectProps := &InstanceRequireImdsv2AspectProps{
	SuppressLaunchTemplateWarning: jsii.Boolean(false),
	SuppressWarnings: jsii.Boolean(false),
}

Properties ​

suppressLaunchTemplateWarningoptionalbooleansuppress_launch_template_warningoptionalboolsuppressLaunchTemplateWarningoptionalBooleanSuppressLaunchTemplateWarningoptionalboolSuppressLaunchTemplateWarningoptional*bool = false #
Whether warnings that would be raised when an Instance is associated with an existing Launch Template should be suppressed or not.

You can set this to true if LaunchTemplateImdsAspect is being used alongside this Aspect to suppress false-positive warnings because any Launch Templates associated with Instances will still be covered.

suppressWarningsoptionalbooleansuppress_warningsoptionalboolsuppressWarningsoptionalBooleanSuppressWarningsoptionalboolSuppressWarningsoptional*bool = false #
Whether warning annotations from this Aspect should be suppressed or not.