Class GenericLinuxImage
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.GenericLinuxImage
- All Implemented Interfaces:
IMachineImage
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-06T14:43:17.922Z")
@Stability(Stable)
public class GenericLinuxImage
extends software.amazon.jsii.JsiiObject
implements IMachineImage
Construct a Linux machine image from an AMI map.
Linux images IDs are not published to SSM parameter store yet, so you'll have to manually specify an AMI map.
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"));
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IMachineImage
IMachineImage.Jsii$Default, IMachineImage.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionGenericLinuxImage
(Map<String, String> amiMap) GenericLinuxImage
(Map<String, String> amiMap, GenericLinuxImageProps props) protected
GenericLinuxImage
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
GenericLinuxImage
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetImage
(software.constructs.Construct scope) Return the image to use in the given context.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
GenericLinuxImage
protected GenericLinuxImage(software.amazon.jsii.JsiiObjectRef objRef) -
GenericLinuxImage
protected GenericLinuxImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
GenericLinuxImage
@Stability(Stable) public GenericLinuxImage(@NotNull Map<String, String> amiMap, @Nullable GenericLinuxImageProps props) - Parameters:
amiMap
- This parameter is required.props
-
-
GenericLinuxImage
- Parameters:
amiMap
- This parameter is required.
-
-
Method Details
-
getImage
@Stability(Stable) @NotNull public MachineImageConfig getImage(@NotNull software.constructs.Construct scope) Return the image to use in the given context.- Specified by:
getImage
in interfaceIMachineImage
- Parameters:
scope
- This parameter is required.
-