class Repository
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.Repository |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#Repository |
Java | software.amazon.awscdk.services.imagebuilder.alpha.Repository |
Python | aws_cdk.aws_imagebuilder_alpha.Repository |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป Repository |
A container repository used to distribute container images in EC2 Image Builder.
Example
const parameterizedComponent = imagebuilder.Component.fromComponentName(
this,
'ParameterizedComponent',
'my-parameterized-component'
);
const imageRecipe = new imagebuilder.ImageRecipe(this, 'ParameterizedImageRecipe', {
baseImage: imagebuilder.BaseImage.fromSsmParameterName(
'/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
),
components: [
{
component: parameterizedComponent,
parameters: {
environment: imagebuilder.ComponentParameterValue.fromString('production'),
version: imagebuilder.ComponentParameterValue.fromString('1.0.0')
}
}
]
});
Initializer
new Repository()
Properties
| Name | Type | Description |
|---|---|---|
| repository | string | The name of the container repository where the output container image is stored. |
| service | Repository | The service in which the container repository is hosted. |
repositoryName
Type:
string
The name of the container repository where the output container image is stored.
service
Type:
Repository
The service in which the container repository is hosted.
Methods
| Name | Description |
|---|---|
| static from | The ECR repository to use as the target container repository. |
static fromEcr(repository)
public static fromEcr(repository: IRepository): Repository
Parameters
- repository
IRepositoryโ The ECR repository to use.
Returns
The ECR repository to use as the target container repository.

.NET
Go
Java
Python
TypeScript (