Interface ImageAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ImageAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)", date="2025-12-05T22:26:50.058Z") @Stability(Experimental) public interface ImageAttributes extends software.amazon.jsii.JsiiSerializable
(experimental) Properties for an EC2 Image Builder image.

Example:

 // Import by name
 IImage existingImageByName = Image.fromImageName(this, "ExistingImageByName", "my-existing-image");
 // Import by ARN
 IImage existingImageByArn = Image.fromImageArn(this, "ExistingImageByArn", "arn:aws:imagebuilder:us-east-1:123456789012:image/imported-image/1.0.0");
 // Import by attributes
 IImage existingImageByAttributes = Image.fromImageAttributes(this, "ExistingImageByAttributes", ImageAttributes.builder()
         .imageName("shared-base-image")
         .imageVersion("2024.11.25")
         .build());
 // Grant permissions to imported images
 Role role = Role.Builder.create(this, "ImageAccessRole")
         .assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
         .build();
 existingImageByName.grantRead(role);
 existingImageByArn.grant(role, "imagebuilder:GetImage", "imagebuilder:ListImagePackages");
 
  • Method Details

    • getImageArn

      @Stability(Experimental) @Nullable default String getImageArn()
      (experimental) The ARN of the image.

      Default: - derived from the imageName

    • getImageName

      @Stability(Experimental) @Nullable default String getImageName()
      (experimental) The name of the image.

      Default: - derived from the imageArn

    • getImageVersion

      @Stability(Experimental) @Nullable default String getImageVersion()
      (experimental) The version of the image.

      Default: - the latest version of the image, x.x.x

    • builder

      @Stability(Experimental) static ImageAttributes.Builder builder()
      Returns:
      a ImageAttributes.Builder of ImageAttributes