Class GenericSSMParameterImage

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.GenericSSMParameterImage
All Implemented Interfaces:
IMachineImage, software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
AmazonLinuxImage, WindowsImage

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.329Z") @Stability(Stable) public class GenericSSMParameterImage extends software.amazon.jsii.JsiiObject implements IMachineImage
Select the image based on a given SSM parameter.

This Machine Image automatically updates to the latest version on every deployment. Be aware this will cause your instances to be replaced when a new version of the image becomes available. Do not store stateful information on the instance if you are using this image.

The AMI ID is selected using the values published to the SSM parameter store.

Example:

 // 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.*;
 UserData userData;
 GenericSSMParameterImage genericSSMParameterImage = new GenericSSMParameterImage("parameterName", OperatingSystemType.LINUX, userData);
 
  • Constructor Details

    • GenericSSMParameterImage

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

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

      @Stability(Stable) public GenericSSMParameterImage(@NotNull String parameterName, @NotNull OperatingSystemType os, @Nullable UserData userData)
      Parameters:
      parameterName - This parameter is required.
      os - This parameter is required.
      userData -
    • GenericSSMParameterImage

      @Stability(Stable) public GenericSSMParameterImage(@NotNull String parameterName, @NotNull OperatingSystemType os)
      Parameters:
      parameterName - This parameter is required.
      os - This parameter is required.
  • Method Details

    • getImage

      @Stability(Stable) @NotNull public MachineImageConfig getImage(@NotNull Construct scope)
      Return the image to use in the given context.

      Specified by:
      getImage in interface IMachineImage
      Parameters:
      scope - This parameter is required.
    • getParameterName

      @Stability(Stable) @NotNull public String getParameterName()
      Name of the SSM parameter we're looking up.