image_usage_report_entries
Creates, updates, deletes, gets or lists an image_usage_report_entries resource.
Overview
| Name | image_usage_report_entries |
| Type | Resource |
| Id | aws.ec2.image_usage_report_entries |
Fields
The following fields are returned by SELECT queries:
- describe_image_usage_report_entries
| Name | Datatype | Description |
|---|---|---|
account_id | string | The ID of the account that uses the image. |
image_id | string | The ID of the image. |
report_creation_time | string | The date and time the report creation was initiated. |
report_id | string | The ID of the report. |
resource_type | string | The type of resource (ec2:Instance or ec2:LaunchTemplate). |
usage_count | integer | The number of times resources of this type reference this image in the account. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_image_usage_report_entries | select | region | ImageId, ReportId, NextToken, Filter, DryRun, MaxResults | Describes the entries in image usage reports, showing how your images are used across other Amazon Web Services accounts. For more information, see View your AMI usage 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 |
|---|---|---|
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. |
Filter | array | The filters. account-id - A 12-digit Amazon Web Services account ID. creation-time - The time when the report was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2025-11-29T11:04:43.305Z. You can use a wildcard (), for example, 2025-11-29T, which matches an entire day. resource-type - The resource type (ec2:Instance | ec2:LaunchTemplate). |
ImageId | array | The IDs of the images for filtering the report entries. If specified, only report entries containing these images are returned. |
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. |
ReportId | array | The IDs of the usage reports. |
SELECT examples
- describe_image_usage_report_entries
Describes the entries in image usage reports, showing how your images are used across other Amazon Web Services accounts. For more information, see View your AMI usage in the Amazon EC2 User Guide.
SELECT
account_id,
image_id,
report_creation_time,
report_id,
resource_type,
usage_count
FROM aws.ec2.image_usage_report_entries
WHERE region = '{{ region }}' -- required
AND ImageId = '{{ ImageId }}'
AND ReportId = '{{ ReportId }}'
AND NextToken = '{{ NextToken }}'
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
AND MaxResults = '{{ MaxResults }}'
;