create_image_usage_report
¶
create_image_usage_report(
*,
config_overrides: Optional[EC2ClientConfig] = None,
image_id: Optional[ImageId] = None,
dry_run: Optional[Boolean] = None,
resource_types: Optional[ImageUsageResourceTypeRequestList] = None,
account_ids: Optional[ImageUsageReportUserIdStringList] = None,
client_token: Optional[CreateImageUsageReportClientToken] = None,
tag_specifications: Optional[TagSpecificationList] = None,
) -> CreateImageUsageReportResult
Creates a report that shows how your image is used across other Amazon Web Services 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.
Parameters:
-
image_id(Optional[ImageId], default:None) –The ID of the image to report on.
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation. -
resource_types(Optional[ImageUsageResourceTypeRequestList], default:None) –The resource types to include in the report.
-
account_ids(Optional[ImageUsageReportUserIdStringList], default:None) –The Amazon Web Services account IDs to include in the report. To include all accounts, omit this parameter.
-
client_token(Optional[CreateImageUsageReportClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure idempotency of the request.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the report on creation. The
ResourceTypemust be set toimage-usage-report; any other value will cause the report creation to fail.To tag a report after it has been created, see CreateTags.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 | |