image_recipe_policies
Creates, updates, deletes, gets or lists an image_recipe_policies resource.
Overview
| Name | image_recipe_policies |
| Type | Resource |
| Id | aws.imagebuilder.image_recipe_policies |
Fields
The following fields are returned by SELECT queries:
- get_image_recipe_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The image recipe policy object. |
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_image_recipe_policy | select | imageRecipeArn, region | Gets an image recipe policy. | |
put_image_recipe_policy | replace | region, imageRecipeArn, policy | Applies a policy to an image recipe. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutImageRecipePolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy 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 |
|---|---|---|
imageRecipeArn | string | The Amazon Resource Name (ARN) of the image recipe whose policy you want to retrieve. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_image_recipe_policy
Gets an image recipe policy.
SELECT
policy,
request_id
FROM aws.imagebuilder.image_recipe_policies
WHERE imageRecipeArn = '{{ imageRecipeArn }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_image_recipe_policy
Applies a policy to an image recipe. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutImageRecipePolicy, you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.
REPLACE aws.imagebuilder.image_recipe_policies
SET
imageRecipeArn = '{{ imageRecipeArn }}',
policy = '{{ policy }}'
WHERE
region = '{{ region }}' --required
AND imageRecipeArn = '{{ imageRecipeArn }}' --required
AND policy = '{{ policy }}' --required
RETURNING
image_recipe_arn,
request_id;