EC2 / Client / create_store_image_task

create_store_image_task#

EC2.Client.create_store_image_task(**kwargs)#

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 Amazon S3 in the Amazon EC2 User Guide.

For more information, see Store and restore an AMI using Amazon S3 in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

response = client.create_store_image_task(
    ImageId='string',
    Bucket='string',
    S3ObjectTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    DryRun=True|False
)
Parameters:
  • ImageId (string) –

    [REQUIRED]

    The ID of the AMI.

  • Bucket (string) –

    [REQUIRED]

    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.

  • S3ObjectTags (list) –

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

    • (dict) –

      The tags to apply to the AMI object that will be stored in the Amazon S3 bucket. For more information, see Categorizing your storage using tags in the Amazon Simple Storage Service User Guide.

      • Key (string) –

        The key of the tag.

        Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with aws:.

      • Value (string) –

        The value of the tag.

        Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.

  • DryRun (boolean) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'ObjectKey': 'string'
}

Response Structure

  • (dict) –

    • ObjectKey (string) –

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