create_image_usage_report¶
Operation¶
create_image_usage_report
async
¶
create_image_usage_report(request: CreateImageUsageReportInput | CreateImageUsageReportInputDict, /, *, plugins: list[Plugin] | None = None) -> CreateImageUsageReportOutput
create_image_usage_report(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateImageUsageReportInputDict]) -> CreateImageUsageReportOutput
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, EC2 launch templates, Image Builder image recipes, or Image Builder container recipes) are referencing it.
For more information, see View your AMI usage in the Amazon EC2 User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateImageUsageReportOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
CreateImageUsageReportInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateImageUsageReportInput structure.
Attributes¶
account_ids
class-attribute
instance-attribute
¶
The Amazon Web Services account IDs to include in the report. To include all accounts, omit this parameter.
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
A unique, case-sensitive identifier that you provide to ensure idempotency of the request.
This field is autopopulated if not provided.
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | 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 is UnauthorizedOperation.
image_id
class-attribute
instance-attribute
¶
image_id: str | None = ...
The ID of the image to report on.
resource_types
class-attribute
instance-attribute
¶
resource_types: list[ImageUsageResourceTypeRequest] | None = ...
The resource types to include in the report.
tag_specifications
class-attribute
instance-attribute
¶
tag_specifications: list[TagSpecification] | None = ...
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.
Dictionaries¶
CreateImageUsageReportInputDict
¶
Bases: TypedDict
Dictionary form of CreateImageUsageReportInput.
Attributes¶
account_ids
instance-attribute
¶
The Amazon Web Services account IDs to include in the report. To include all accounts, omit this parameter.
client_token
instance-attribute
¶
client_token: str | None
A unique, case-sensitive identifier that you provide to ensure idempotency of the request.
This field is autopopulated if not provided.
dry_run
instance-attribute
¶
dry_run: bool | 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 is UnauthorizedOperation.
resource_types
instance-attribute
¶
resource_types: Required[Sequence[ImageUsageResourceTypeRequest | ImageUsageResourceTypeRequestDict]]
The resource types to include in the report.
tag_specifications
instance-attribute
¶
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None
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.
Output¶
CreateImageUsageReportOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateImageUsageReportOutput structure.