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

# PUT /PutContainerRecipePolicy

`PUT /PutContainerRecipePolicy`

Applies a policy to a container image. We recommend that you call the RAM API CreateResourceShare (https://docs.aws.amazon.com//ram/latest/APIReference/API_CreateResourceShare.html) to share resources. If you call the Image Builder API <code>PutContainerImagePolicy</code>, you must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com//ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) in order for the resource to be visible to all principals with whom the resource is shared.

## Request body

- object
  - `containerRecipeArn` string, required — The Amazon Resource Name (ARN) of the container recipe that this policy should be applied to.
  - `policy` string, required — The policy to apply to the container recipe.

## Response `200`

Success

- PutContainerRecipePolicyResponse
  - `requestId` string — The request ID that uniquely identifies this request.
  - `containerRecipeArn` string — The Amazon Resource Name (ARN) of the container recipe that this policy was applied to.

## Other responses

- `480` — ServiceException
- `481` — ClientException
- `482` — ServiceUnavailableException
- `483` — InvalidRequestException
- `484` — InvalidParameterValueException
- `485` — ResourceNotFoundException
- `486` — ForbiddenException
- `487` — CallRateLimitExceededException

---

[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)
