@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.481Z") @Stability(value=Stable) public class LookupMachineImage extends software.amazon.jsii.JsiiObject implements IMachineImage
The most recent, available, launchable image matching the given filter criteria will be used. Looking up AMIs may take a long time; specify as many filter criteria as possible to narrow down the search.
The AMI selected will be cached in cdk.context.json and the same value
will be used on future runs. To refresh the AMI lookup, you will have to
evict the value from the cache using the cdk context command. See
https://docs.aws.amazon.com/cdk/latest/guide/context.html for more information.
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;
LookupMachineImage lookupMachineImage = LookupMachineImage.Builder.create()
.name("name")
// the properties below are optional
.filters(Map.of(
"filtersKey", List.of("filters")))
.owners(List.of("owners"))
.userData(userData)
.windows(false)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
LookupMachineImage.Builder
A fluent builder for
LookupMachineImage. |
software.amazon.jsii.JsiiObject.InitializationModeIMachineImage.Jsii$Default, IMachineImage.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
LookupMachineImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LookupMachineImage(software.amazon.jsii.JsiiObjectRef objRef) |
|
LookupMachineImage(LookupMachineImageProps props) |
| Modifier and Type | Method and Description |
|---|---|
MachineImageConfig |
getImage(software.constructs.Construct scope)
Return the image to use in the given context.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected LookupMachineImage(software.amazon.jsii.JsiiObjectRef objRef)
protected LookupMachineImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public LookupMachineImage(@NotNull
LookupMachineImageProps props)
props - This parameter is required.@Stability(value=Stable) @NotNull public MachineImageConfig getImage(@NotNull software.constructs.Construct scope)
getImage in interface IMachineImagescope - This parameter is required.Copyright © 2022. All rights reserved.