---
title: "PUT /CreateContainerRecipe"
method: PUT
path: "/CreateContainerRecipe"
---

# PUT /CreateContainerRecipe

`PUT /CreateContainerRecipe`

Creates a new container recipe. Container recipes define how images are configured, tested, and assessed.

## Request body

- object
  - `containerType` 'DOCKER', required — The type of container to create.
  - `name` string, required — The name of the container recipe.
  - `description` string — The description of the container recipe.
  - `semanticVersion` string, required — <p>The semantic version of the container recipe. This version follows the semantic version syntax.</p> <note> <p>The semantic version has four nodes: &lt;major&gt;.&lt;minor&gt;.&lt;patch&gt;/&lt;build&gt;. You can assign values for the first three, and can filter on all of them.</p> <p> <b>Assignment:</b> For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.</p> <p> <b>Patterns:</b> You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.</p> </note>
  - `components` ComponentConfiguration[], required — Components for build and test that are included in the container recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
    - `componentArn` string, required — The Amazon Resource Name (ARN) of the component.
    - `parameters` ComponentParameter[] — A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
      - `name` string, required — The name of the component parameter to set.
      - `value` ComponentParameterValue[], required — Sets the value for the named component parameter.
  - `instanceConfiguration` object — Defines a custom base AMI and block device mapping configurations of an instance used for building and testing container images.
    - `image` string — The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.
    - `blockDeviceMappings` InstanceBlockDeviceMapping[] — Defines the block devices to attach for building an instance from this Image Builder AMI.
      - `deviceName` string — The device to which these mappings apply.
      - `ebs` object — Use to manage Amazon EBS-specific configuration for this mapping.
        - `encrypted` boolean — Use to configure device encryption.
        - `deleteOnTermination` boolean — Use to configure delete on termination of the associated device.
        - `iops` integer — Use to configure device IOPS.
        - `kmsKeyId` string — Use to configure the KMS key to use when encrypting the device.
        - `snapshotId` string — The snapshot that defines the device contents.
        - `volumeSize` integer — Use to override the device's volume size.
        - `volumeType` 'standard' | 'io1' | 'io2' | 'gp2' | 'gp3' | 'sc1' | 'st1' — Use to override the device's volume type.
        - `throughput` integer — <b>For GP3 volumes only</b> – The throughput in MiB/s that the volume supports.
      - `virtualName` string — Use to manage instance ephemeral devices.
      - `noDevice` string — Use to remove a mapping from the base image.
  - `dockerfileTemplateData` string — The Dockerfile template used to build your image as an inline data blob.
  - `dockerfileTemplateUri` string — The Amazon S3 URI for the Dockerfile that will be used to build your container image.
  - `platformOverride` 'Windows' | 'Linux' — Specifies the operating system platform when you use a custom base image.
  - `imageOsVersionOverride` string — Specifies the operating system version for the base image.
  - `parentImage` string, required — The base image for the container recipe.
  - `tags` object — Tags that are attached to the container recipe.
  - `workingDirectory` string — The working directory for use during build and test workflows.
  - `targetRepository` object, required — The container repository where the output container image is stored.
    - `service` 'ECR' — Specifies the service in which this image was registered.
    - `repositoryName` string — The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
  - `kmsKeyId` string — Identifies which KMS key is used to encrypt the container image.
  - `clientToken` string, required — The client token used to make this request idempotent.

## Response `200`

Success

- CreateContainerRecipeResponse
  - `requestId` string — The request ID that uniquely identifies this request.
  - `clientToken` string — The client token used to make this request idempotent.
  - `containerRecipeArn` string — Returns the Amazon Resource Name (ARN) of the container recipe that the request created.

## Other responses

- `480` — ServiceException
- `481` — ClientException
- `482` — ServiceUnavailableException
- `483` — InvalidRequestException
- `484` — IdempotentParameterMismatchException
- `485` — ForbiddenException
- `486` — CallRateLimitExceededException
- `487` — InvalidVersionNumberException
- `488` — ResourceInUseException
- `489` — ResourceAlreadyExistsException
- `490` — ServiceQuotaExceededException

---

[API](https://skmtc.net/aws/apis/imagebuilder.md) · [All operations](https://skmtc.net/aws/apis/imagebuilder/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/imagebuilder/versions/cfe68d8f8262/schema)
