Class InstanceRequireImdsv2Aspect

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.InstanceRequireImdsv2Aspect
All Implemented Interfaces:
IAspect, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:00.935Z") @Stability(Stable) public class InstanceRequireImdsv2Aspect extends software.amazon.jsii.JsiiObject implements IAspect
Aspect that applies IMDS configuration on EC2 Instance constructs.

This aspect configures IMDS on an EC2 instance by creating a Launch Template with the IMDS configuration and associating that Launch Template with the instance. If an Instance is already associated with a Launch Template, a warning will (optionally) be added to the construct node and it will be skipped.

To cover Instances already associated with Launch Templates, use LaunchTemplateImdsAspect.

Example:

 InstanceRequireImdsv2Aspect aspect = new InstanceRequireImdsv2Aspect();
 Aspects.of(this).add(aspect);
 
  • Constructor Details

    • InstanceRequireImdsv2Aspect

      protected InstanceRequireImdsv2Aspect(software.amazon.jsii.JsiiObjectRef objRef)
    • InstanceRequireImdsv2Aspect

      protected InstanceRequireImdsv2Aspect(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • InstanceRequireImdsv2Aspect

      @Stability(Stable) public InstanceRequireImdsv2Aspect(@Nullable InstanceRequireImdsv2AspectProps props)
      Parameters:
      props -
    • InstanceRequireImdsv2Aspect

      @Stability(Stable) public InstanceRequireImdsv2Aspect()
  • Method Details

    • visit

      @Stability(Stable) public void visit(@NotNull software.constructs.IConstruct node)
      All aspects can visit an IConstruct.

      Specified by:
      visit in interface IAspect
      Parameters:
      node - This parameter is required.
    • warn

      @Stability(Stable) protected void warn(@NotNull software.constructs.IConstruct node, @NotNull String message)
      Adds a warning annotation to a node, unless suppressWarnings is true.

      Parameters:
      node - This parameter is required.
      message - This parameter is required.
    • getSuppressWarnings

      @Stability(Stable) @NotNull protected Boolean getSuppressWarnings()