container_recipe_policies
Creates, updates, deletes, gets or lists a container_recipe_policies resource.
Overview
| Name | container_recipe_policies |
| Type | Resource |
| Id | aws.imagebuilder.container_recipe_policies |
Fields
The following fields are returned by SELECT queries:
- get_container_recipe_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The container recipe policy object that is returned. |
request_id | string | The request ID that uniquely identifies this request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_container_recipe_policy | select | containerRecipeArn, region | Retrieves the policy for a container recipe. | |
put_container_recipe_policy | replace | region, containerRecipeArn, policy | 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 PutContainerImagePolicy, 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
containerRecipeArn | string | The Amazon Resource Name (ARN) of the container recipe for the policy being requested. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_container_recipe_policy
Retrieves the policy for a container recipe.
SELECT
policy,
request_id
FROM aws.imagebuilder.container_recipe_policies
WHERE containerRecipeArn = '{{ containerRecipeArn }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_container_recipe_policy
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 PutContainerImagePolicy, 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.
REPLACE aws.imagebuilder.container_recipe_policies
SET
containerRecipeArn = '{{ containerRecipeArn }}',
policy = '{{ policy }}'
WHERE
region = '{{ region }}' --required
AND containerRecipeArn = '{{ containerRecipeArn }}' --required
AND policy = '{{ policy }}' --required
RETURNING
container_recipe_arn,
request_id;