> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ImageProps

Properties for creating an Image resource.

Extends: ImageProps
Used as props by: Image

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/image.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/image.ts#L87)

## Example

```ts
const containerRecipe = new imagebuilder.ContainerRecipe(this, 'MyContainerRecipe', {
  baseImage: imagebuilder.BaseContainerImage.fromDockerHub('amazonlinux', 'latest'),
  targetRepository: imagebuilder.Repository.fromEcr(
    ecr.Repository.fromRepositoryName(this, 'Repository', 'my-container-repo')
  )
});

const containerImage = new imagebuilder.Image(this, 'MyContainerImage', {
  recipe: containerRecipe
});
```

## Properties

- `deletionExecutionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The execution role to use for deleting the image as well as the underlying resources, such as the AMIs, snapshots, and containers.

  **Default:** no execution role. Only the Image Builder image will be deleted.

  This role should contain resource lifecycle permissions required to delete the underlying
  AMIs/containers.

- `distributionConfiguration`: [IDistributionConfiguration](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.IDistributionConfiguration.html) = None — The distribution configuration used for distributing the image.

- `enhancedImageMetadataEnabled`: boolean = true — If enabled, collects additional information about the image being created, including the operating system (OS) version and package list for the AMI.

- `executionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The execution role used to perform workflow actions to build the image.

  **Default:** Image Builder will use the SLR if possible. Otherwise, an execution role will be generated

  By default, the Image Builder Service Linked Role (SLR) will be created automatically and used as the execution
  role. However, when providing a custom set of image workflows for the image, an execution role will be
  generated with the minimal permissions needed to execute the workflows.

- `imageScanningEcrRepository`: [IRepository](/cdk/api/v2/docs/aws-cdk-lib.aws_ecr.IRepository.html) — The container repository that Amazon Inspector scans to identify findings for your container images.

  **Default:** if scanning is enabled, a repository will be created by Image Builder if one is not provided

  If a
  repository is not provided, Image Builder creates a repository named `image-builder-image-scanning-repository`
  for vulnerability scanning.

- `imageScanningEcrTags`: string[] = None — The tags for Image Builder to apply to the output container image that Amazon Inspector scans.

- `imageScanningEnabled`: boolean = false — Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

- `imageTestsEnabled`: boolean = true — Whether to run tests after building an image.

- `infrastructureConfiguration`: [IInfrastructureConfiguration](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.IInfrastructureConfiguration.html) — The infrastructure configuration used for building the image.

  **Default:** an infrastructure configuration will be created with the default settings

  A default infrastructure configuration will be used if one is not provided.

  The default configuration will create an instance profile and role with minimal permissions needed to build the
  image, attached to the EC2 instance.

  IMDSv2 will be required by default on the instances used to build and test the image.

- `logGroup`: [ILogGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html) — The log group to use for the image.

  **Default:** a log group will be created

  By default, a log group will be created with the format
  `/aws/imagebuilder/<image-name>`

- `recipe`: [IRecipeBase](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.IRecipeBase.html) (required) — The recipe that defines the base image, components, and customizations used to build the image.

  This can either be
  an image recipe, or a container recipe.

- `tags`: { [key: string]: string } = None — The tags to apply to the image.

- `workflows`: [WorkflowConfiguration](/cdk/api/v2/docs/@aws-cdk_aws-imagebuilder-alpha.WorkflowConfiguration.html)[] — The list of workflow configurations used to build the image.

  **Default:** Image Builder will use a default set of workflows for the build to build, test, and distribute the image
