Skip to content

EC2  >  Operations  >  create_store_image_task

create_store_image_task

Operation

create_store_image_task async

create_store_image_task(request: CreateStoreImageTaskInput | CreateStoreImageTaskInputDict, /, *, plugins: list[Plugin] | None = None) -> CreateStoreImageTaskOutput
create_store_image_task(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateStoreImageTaskInputDict]) -> CreateStoreImageTaskOutput

Stores an AMI as a single object in an Amazon S3 bucket.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using S3 in the Amazon EC2 User Guide.

For more information, see Store and restore an AMI using S3 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
CreateStoreImageTaskOutput

An instance of CreateStoreImageTaskOutput.

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

CreateStoreImageTaskInput dataclass

Bases: _SerdeShape

Dataclass for CreateStoreImageTaskInput structure.

Attributes
bucket class-attribute instance-attribute
bucket: str | None = ...

The name of the Amazon S3 bucket in which the AMI object will be stored. The bucket must be in the Region in which the request is being made. The AMI object appears in the bucket only after the upload task has completed.

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 AMI.

s3_object_tags class-attribute instance-attribute
s3_object_tags: list[S3ObjectTag] | None = ...

The tags to apply to the AMI object that will be stored in the Amazon S3 bucket.

Dictionaries

CreateStoreImageTaskInputDict

Bases: TypedDict

Dictionary form of CreateStoreImageTaskInput.

Attributes
bucket instance-attribute
bucket: Required[str]

The name of the Amazon S3 bucket in which the AMI object will be stored. The bucket must be in the Region in which the request is being made. The AMI object appears in the bucket only after the upload task has completed.

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.

image_id instance-attribute
image_id: Required[str]

The ID of the AMI.

s3_object_tags instance-attribute
s3_object_tags: Sequence[S3ObjectTag | S3ObjectTagDict] | None

The tags to apply to the AMI object that will be stored in the Amazon S3 bucket.

Output

CreateStoreImageTaskOutput dataclass

Bases: _SerdeShape

Dataclass for CreateStoreImageTaskOutput structure.

Attributes

object_key class-attribute instance-attribute
object_key: str | None = ...

The name of the stored AMI object in the S3 bucket.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.