Use DescribeBundleTasks
with a CLI
The following code examples show how to use DescribeBundleTasks
.
- CLI
-
- AWS CLI
-
To describe your bundle tasks
This example describes all of your bundle tasks.
Command:
aws ec2 describe-bundle-tasks
Output:
{ "BundleTasks": [ { "UpdateTime": "2015-09-15T13:26:54.000Z", "InstanceId": "i-1234567890abcdef0", "Storage": { "S3": { "Prefix": "winami", "Bucket": "bundletasks" } }, "State": "bundling", "StartTime": "2015-09-15T13:24:35.000Z", "Progress": "3%", "BundleId": "bun-2a4e041c" } ] }
-
For API details, see DescribeBundleTasks
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example describes the specified bundle task.
Get-EC2BundleTask -BundleId bun-12345678
Example 2: This example describes the bundle tasks whose state is either 'complete' or 'failed'.
$filter = New-Object Amazon.EC2.Model.Filter $filter.Name = "state" $filter.Values = @( "complete", "failed" ) Get-EC2BundleTask -Filter $filter
-
For API details, see DescribeBundleTasks in AWS Tools for PowerShell Cmdlet Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Create Amazon EC2 resources using an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.