create_image_usage_report
async
¶
create_image_usage_report(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 | |