@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.102Z") @Stability(value=Stable) public class AmazonLinuxImage extends GenericSSMParameterImage
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:
// Pick a Windows edition to use
WindowsImage windows = new WindowsImage(WindowsVersion.WINDOWS_SERVER_2019_ENGLISH_FULL_BASE);
// Pick the right Amazon Linux edition. All arguments shown are optional
// and will default to these values when omitted.
AmazonLinuxImage amznLinux = AmazonLinuxImage.Builder.create()
.generation(AmazonLinuxGeneration.AMAZON_LINUX)
.edition(AmazonLinuxEdition.STANDARD)
.virtualization(AmazonLinuxVirt.HVM)
.storage(AmazonLinuxStorage.GENERAL_PURPOSE)
.build();
// For other custom (Linux) images, instantiate a `GenericLinuxImage` with
// a map giving the AMI to in for each region:
GenericLinuxImage linux = new GenericLinuxImage(Map.of(
"us-east-1", "ami-97785bed",
"eu-west-1", "ami-12345678"));
| Modifier and Type | Class and Description |
|---|---|
static class |
AmazonLinuxImage.Builder
A fluent builder for
AmazonLinuxImage. |
software.amazon.jsii.JsiiObject.InitializationModeIMachineImage.Jsii$Default, IMachineImage.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
AmazonLinuxImage() |
|
AmazonLinuxImage(AmazonLinuxImageProps props) |
protected |
AmazonLinuxImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AmazonLinuxImage(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
MachineImageConfig |
getImage(software.constructs.Construct scope)
Return the image to use in the given context.
|
static String |
ssmParameterName()
Return the SSM parameter name that will contain the Amazon Linux image with the given attributes.
|
static String |
ssmParameterName(AmazonLinuxImageProps props)
Return the SSM parameter name that will contain the Amazon Linux image with the given attributes.
|
getParameterNamejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected AmazonLinuxImage(software.amazon.jsii.JsiiObjectRef objRef)
protected AmazonLinuxImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public AmazonLinuxImage(@Nullable
AmazonLinuxImageProps props)
props - @Stability(value=Stable) public AmazonLinuxImage()
@Stability(value=Stable) @NotNull public static String ssmParameterName(@Nullable AmazonLinuxImageProps props)
props - @Stability(value=Stable) @NotNull public static String ssmParameterName()
@Stability(value=Stable) @NotNull public MachineImageConfig getImage(@NotNull software.constructs.Construct scope)
getImage in interface IMachineImagegetImage in class GenericSSMParameterImagescope - This parameter is required.Copyright © 2022. All rights reserved.