class LaunchTemplateRequireImdsv2Aspect
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.LaunchTemplateRequireImdsv2Aspect |
Java | software.amazon.awscdk.services.ec2.LaunchTemplateRequireImdsv2Aspect |
Python | aws_cdk.aws_ec2.LaunchTemplateRequireImdsv2Aspect |
TypeScript (source) | @aws-cdk/aws-ec2 » LaunchTemplateRequireImdsv2Aspect |
Implements
IAspect
Aspect that applies IMDS configuration on EC2 Launch Template constructs.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
const launchTemplateRequireImdsv2Aspect = new ec2.LaunchTemplateRequireImdsv2Aspect(/* all optional props */ {
suppressWarnings: false,
});
Initializer
new LaunchTemplateRequireImdsv2Aspect(props?: LaunchTemplateRequireImdsv2AspectProps)
Parameters
Properties
Name | Type | Description |
---|---|---|
suppress | boolean |
suppressWarnings
Type:
boolean
Methods
Name | Description |
---|---|
visit(node) | All aspects can visit an IConstruct. |
protected warn(node, message) | Adds a warning annotation to a node, unless suppressWarnings is true. |
visit(node)
public visit(node: IConstruct): void
Parameters
- node
IConstruct
All aspects can visit an IConstruct.
protected warn(node, message)
protected warn(node: IConstruct, message: string): void
Parameters
- node
IConstruct
— The scope to add the warning to. - message
string
— The warning message.
Adds a warning annotation to a node, unless suppressWarnings
is true.