Experimental
@aws-cdk/aws-imagebuilder-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
Repository Class
A container repository used to distribute container images in EC2 Image Builder.
Example
ts
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
ts
new Repository()
python
Repository()
java
new Repository()
csharp
new Repository()
go
NewRepository()
Properties
repositoryNamestringrepository_namestrrepositoryNameStringRepositoryNamestringRepositoryName*stringrequired#The name of the container repository where the output container image is stored.
serviceRepositoryServiceserviceRepositoryServiceserviceRepositoryServiceServiceRepositoryServiceServiceRepositoryServicerequired#The service in which the container repository is hosted.
Methods
fromEcr(repository: IRepository): Repository // chainable@staticmethod def from_ecr(repository: IRepository) -> Repositorypublic static Repository fromEcr(IRepository repository)public static Repository FromEcr(IRepository repository)func FromEcr(Repository IRepository) Repositorystatic#The ECR repository to use as the target container repository.
1 parameter
Parameters
repositoryrepositoryrepositoryrepositoryRepository— The ECR repository to use.