CreateImageUsageReport - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CreateImageUsageReport

Creates a report that shows how your image is used across other Amazon accounts. The report provides visibility into which accounts are using the specified image, and how many resources (EC2 instances or launch templates) are referencing it.

For more information, see View your AMI usage in the Amazon EC2 User Guide.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

AccountId.N

The Amazon account IDs to include in the report. To include all accounts, omit this parameter.

Type: Array of strings

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No

ClientToken

A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

Type: String

Required: No

DryRun

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.

Type: Boolean

Required: No

ImageId

The ID of the image to report on.

Type: String

Required: Yes

ResourceType.N

The resource types to include in the report.

Type: Array of ImageUsageResourceTypeRequest objects

Required: Yes

TagSpecification.N

The tags to apply to the report on creation. The ResourceType must be set to image-usage-report; any other value will cause the report creation to fail.

To tag a report after it has been created, see CreateTags.

Type: Array of TagSpecification objects

Required: No

Response Elements

The following elements are returned by the service.

reportId

The ID of the report.

Type: String

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common client error codes.

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: