BundleInstance
The BundleInstance
operation bundles an Amazon EC2 instance running Windows. For more information, see
Bundling a Windows AMI.
Request Parameters
The following table describes the request parameters for
BundleInstance
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
instanceId |
The ID of the instance to bundle. Type: String Default: none |
Yes |
Storage.S3.AWSAccessKeyId |
The Access Key ID of the owner of the Amazon S3 bucket. Type: String Default: none |
Yes |
Storage.S3.Bucket |
The bucket in which to store the AMI. Type: String Default: none |
Yes |
Storage.S3.Prefix |
The prefix to append to the AMI. Type: String Default: none |
Yes |
Storage.S3.UploadPolicy |
The Base64 encoded JSON document. Type: String Default: none |
Yes |
Storage.S3.UploadPolicySignature |
The signature of the Base64 encoded JSON document. Type: String Default: none |
Yes |
Upload Policy JSON Parameters
The upload policy gives Amazon EC2 limited permission to upload items into your Amazon S3 bucket. The following table describes the required parameters for the upload policy JSON document. Parameter names are case sensitive. Please see the Amazon Simple Storage Service Developer Guide for more information about upload policies and how to sign them.
Name | Description | Required |
---|---|---|
expiration |
The expiration of the policy. We recommend 12 hours or longer. |
Yes |
conditions |
A list of restrictions on what can be uploaded to Amazon S3. Must contain the |
Yes |
bucket |
The bucket to store the AMI. |
Yes |
acl |
This must be set to |
Yes |
Response Elements
The following table describes the default response tags included
in BundleInstance
responses.
Name | Description |
---|---|
|
The ID of the bundling request. Type: xsd:string |
|
Identifier for this task. Type: xsd:string |
|
Instance associated with this bundle task. Type: xsd:string |
|
The state of the task. Options include Type: xsd:string |
|
The time this task was created. Type: xsd:dateTime |
|
The time of the most recent update for the task. Type: xsd:dateTime |
|
The storage description for the task. Type: BundleInstanceTaskStorageType |
|
A percentage description of the progress of the task, such as 20%. Type: xsd:string |
|
If a task fails, a description of the error. Type: BundleInstanceTaskErrorType |
Sample Request
<BundleInstance xmlns="http://ec2.amazonaws.com/doc/2008-12-01"> <instanceId>i-e468cd8d</instanceId> <storage> <S3> <bucket>my-bucket</bucket> <prefix>winami</prefix> <awsAccessKeyId>10QMXFEV71ZS32XQFTR2</awsAccessKeyId> <uploadPolicy>eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl1dfQ==</uploadPolicy> <uploadPolicySignature>w6BZu2oxGsiiLZnoBmQSErotuMA=</uploadPolicySignature> </S3> </storage> </BundleInstance>
Sample Upload Policy JSON Document
{ "expiration": "2008-08-08T09:41:01Z", "conditions": [ {"bucket": "bucket"}, {"acl": "ec2-bundle-read"}, ["starts-with", "$key", "my-ami"] ] }
Sample Response
<BundleInstanceResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01"> <requestId>bun-c1a540a8</requestId> <bundleInstanceTask> <instanceId>i-12345678</instanceId> <bundleId>bun-c1a540a8</bundleId> <state>bundling</state> <startTime>2008-10-07T11:41:50.000Z</startTime> <updateTime>2008-10-07T11:51:50.000Z</updateTime> <progress>70%</progress> <storage> <S3> <bucket>my-bucket</bucket> <prefix>winami</prefix> </S3> </storage> </bundleInstanceTask> </BundleInstanceResponse>