image_references
Creates, updates, deletes, gets or lists an image_references resource.
Overview
| Name | image_references |
| Type | Resource |
| Id | aws.ec2.image_references |
Fields
The following fields are returned by SELECT queries:
- describe_image_references
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the resource referencing the image. |
image_id | string | The ID of the referenced image. |
resource_type | string | The type of resource referencing the image. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_image_references | select | ImageId, region | IncludeAllResourceTypes, ResourceType, NextToken, DryRun, MaxResults | Describes your Amazon Web Services resources that are referencing the specified images. For more information, see Identify your resources referencing specified AMIs in the Amazon EC2 User Guide. |
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 |
|---|---|---|
ImageId | array | The IDs of the images to check for resource references. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
IncludeAllResourceTypes | boolean | Specifies whether to check all supported Amazon Web Services resource types for image references. When specified, default values are applied for ResourceTypeOptions. For the default values, see How AMI reference checks work in the Amazon EC2 User Guide. If you also specify ResourceTypes with ResourceTypeOptions, your specified values override the default values. Supported resource types: ec2:Instance | ec2:LaunchTemplate | ssm:Parameter | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe Either IncludeAllResourceTypes or ResourceTypes must be specified. |
MaxResults | integer | The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination. |
NextToken | string | The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request. |
ResourceType | array | The Amazon Web Services resource types to check for image references. Either IncludeAllResourceTypes or ResourceTypes must be specified. |
SELECT examples
- describe_image_references
Describes your Amazon Web Services resources that are referencing the specified images. For more information, see Identify your resources referencing specified AMIs in the Amazon EC2 User Guide.
SELECT
arn,
image_id,
resource_type
FROM aws.ec2.image_references
WHERE ImageId = '{{ ImageId }}' -- required
AND region = '{{ region }}' -- required
AND IncludeAllResourceTypes = '{{ IncludeAllResourceTypes }}'
AND ResourceType = '{{ ResourceType }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
AND MaxResults = '{{ MaxResults }}'
;