Skip to content
v2.277.0

Experimental

@aws-cdk/aws-imagebuilder-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

AmazonManagedImageAttributes Struct ​

Attributes for importing an Amazon-managed image by name (and optionally a version).

Example ​

ts
// Import by name
const managedImageByName = imagebuilder.AmazonManagedImage.fromAmazonManagedImageName(
  this,
  'ManagedImageByName',
  'amazon-linux-2023-x86'
);

// Import by attributes with specific version
const managedImageByAttributes = imagebuilder.AmazonManagedImage.fromAmazonManagedImageAttributes(this, 'ManagedImageByAttributes', {
  imageName: 'ubuntu-server-22-lts-x86',
  imageVersion: '2024.11.25'
});
python
# Import by name
managed_image_by_name = imagebuilder.AmazonManagedImage.from_amazon_managed_image_name(self, "ManagedImageByName", "amazon-linux-2023-x86")

# Import by attributes with specific version
managed_image_by_attributes = imagebuilder.AmazonManagedImage.from_amazon_managed_image_attributes(self, "ManagedImageByAttributes",
    image_name="ubuntu-server-22-lts-x86",
    image_version="2024.11.25"
)
java
// Import by name
IImage managedImageByName = AmazonManagedImage.fromAmazonManagedImageName(this, "ManagedImageByName", "amazon-linux-2023-x86");

// Import by attributes with specific version
IImage managedImageByAttributes = AmazonManagedImage.fromAmazonManagedImageAttributes(this, "ManagedImageByAttributes", AmazonManagedImageAttributes.builder()
        .imageName("ubuntu-server-22-lts-x86")
        .imageVersion("2024.11.25")
        .build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.ImageBuilder.Alpha
// Import by name
var managedImageByName = AmazonManagedImage.FromAmazonManagedImageName(this, "ManagedImageByName", "amazon-linux-2023-x86");

// Import by attributes with specific version
var managedImageByAttributes = AmazonManagedImage.FromAmazonManagedImageAttributes(this, "ManagedImageByAttributes", new AmazonManagedImageAttributes {
    ImageName = "ubuntu-server-22-lts-x86",
    ImageVersion = "2024.11.25"
});
go
// Install: go get github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2
// Import by name
managedImageByName := imagebuilder.AmazonManagedImage_FromAmazonManagedImageName(this, jsii.String("ManagedImageByName"), jsii.String("amazon-linux-2023-x86"))

// Import by attributes with specific version
managedImageByAttributes := imagebuilder.AmazonManagedImage_FromAmazonManagedImageAttributes(this, jsii.String("ManagedImageByAttributes"), &AmazonManagedImageAttributes{
	ImageName: jsii.String("ubuntu-server-22-lts-x86"),
	ImageVersion: jsii.String("2024.11.25"),
})

Properties ​

imageNamestringimage_namestrimageNameStringImageNamestringImageName*string required #
The name of the Amazon-managed image.

The provided name must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.

imageVersionoptionalstringimage_versionoptionalstrimageVersionoptionalStringImageVersionoptionalstringImageVersionoptional*string = x.x.x #
The version of the Amazon-managed image.