"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.AutoScalingGroupRequireImdsv2Aspect=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../../core"),auto_scaling_group_1=require("../auto-scaling-group");class AutoScalingGroupRequireImdsv2Aspect{constructor(){}visit(node){if(!(node instanceof auto_scaling_group_1.AutoScalingGroup))return;const launchConfig=node.node.tryFindChild("LaunchConfig");if(cdk.isResolvableObject(launchConfig.metadataOptions)){this.warn(node,"CfnLaunchConfiguration.MetadataOptions field is a CDK token.");return}launchConfig.metadataOptions={...launchConfig.metadataOptions,httpTokens:"required"}}warn(node,message){cdk.Annotations.of(node).addWarningV2(`@aws-cdk/aws-autoscaling:imdsv2${AutoScalingGroupRequireImdsv2Aspect.name}`,`${AutoScalingGroupRequireImdsv2Aspect.name} failed on node ${node.node.id}: ${message}`)}}exports.AutoScalingGroupRequireImdsv2Aspect=AutoScalingGroupRequireImdsv2Aspect,_a=JSII_RTTI_SYMBOL_1,AutoScalingGroupRequireImdsv2Aspect[_a]={fqn:"aws-cdk-lib.aws_autoscaling.AutoScalingGroupRequireImdsv2Aspect",version:"2.96.1"};
