Container for the parameters to the DescribeBundleTasks operation. Describes one or more of your bundling tasks.

Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage with the Amazon S3 bucket name and image manifest name you provided to the bundle task.

Inheritance: AmazonEC2Request
 protected override void ProcessRecord()
 {
     AmazonEC2 client = base.GetClient();
     Amazon.EC2.Model.DescribeBundleTasksRequest request = new Amazon.EC2.Model.DescribeBundleTasksRequest();
     if (string.IsNullOrEmpty(this._BundleId))
     {
         request.BundleId.Add(this._BundleId);
     }
     Amazon.EC2.Model.DescribeBundleTasksResponse response = client.DescribeBundleTasks(request);
     base.WriteObject(response.DescribeBundleTasksResult.BundleTask, true);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeBundleTasks operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeBundleTasks operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<DescribeBundleTasksResponse> DescribeBundleTasksAsync(DescribeBundleTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeBundleTasksRequestMarshaller();
            var unmarshaller = DescribeBundleTasksResponseUnmarshaller.Instance;

            return InvokeAsync<DescribeBundleTasksRequest,DescribeBundleTasksResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Describes one or more of your bundling tasks.
        /// 
        ///  <note>
        /// <para>
        /// Completed bundle tasks are listed for only a limited time. If your bundle task is
        /// no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code>
        /// with the Amazon S3 bucket name and image manifest name you provided to the bundle
        /// task.
        /// </para>
        /// </note>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DescribeBundleTasks service method.</param>
        /// 
        /// <returns>The response from the DescribeBundleTasks service method, as returned by EC2.</returns>
        public DescribeBundleTasksResponse DescribeBundleTasks(DescribeBundleTasksRequest request)
        {
            var marshaller = new DescribeBundleTasksRequestMarshaller();
            var unmarshaller = DescribeBundleTasksResponseUnmarshaller.Instance;

            return Invoke<DescribeBundleTasksRequest,DescribeBundleTasksResponse>(request, marshaller, unmarshaller);
        }
示例#4
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeBundleTasks operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeBundleTasks operation on AmazonEC2Client.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeBundleTasks
        ///         operation.</returns>
        public IAsyncResult BeginDescribeBundleTasks(DescribeBundleTasksRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DescribeBundleTasksRequestMarshaller();
            var unmarshaller = DescribeBundleTasksResponseUnmarshaller.Instance;

            return BeginInvoke<DescribeBundleTasksRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
示例#5
0
 IAsyncResult invokeDescribeBundleTasks(DescribeBundleTasksRequest describeBundleTasksRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DescribeBundleTasksRequestMarshaller().Marshall(describeBundleTasksRequest);
     var unmarshaller = DescribeBundleTasksResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
示例#6
0
 /// <summary>
 /// Initiates the asynchronous execution of the DescribeBundleTasks operation.
 /// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeBundleTasks"/>
 /// </summary>
 /// 
 /// <param name="describeBundleTasksRequest">Container for the necessary parameters to execute the DescribeBundleTasks operation on
 ///          AmazonEC2.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// 
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking
 ///         EndDescribeBundleTasks operation.</returns>
 public IAsyncResult BeginDescribeBundleTasks(DescribeBundleTasksRequest describeBundleTasksRequest, AsyncCallback callback, object state)
 {
     return invokeDescribeBundleTasks(describeBundleTasksRequest, callback, state, false);
 }
示例#7
0
 /// <summary>
 /// <para>Describes one or more of your bundling tasks.</para> <para><b>NOTE:</b> Completed bundle tasks are listed for only a limited time. If
 /// your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage with the Amazon S3 bucket name and
 /// image manifest name you provided to the bundle task. </para>
 /// </summary>
 /// 
 /// <param name="describeBundleTasksRequest">Container for the necessary parameters to execute the DescribeBundleTasks service method on
 ///          AmazonEC2.</param>
 /// 
 /// <returns>The response from the DescribeBundleTasks service method, as returned by AmazonEC2.</returns>
 /// 
 public DescribeBundleTasksResponse DescribeBundleTasks(DescribeBundleTasksRequest describeBundleTasksRequest)
 {
     IAsyncResult asyncResult = invokeDescribeBundleTasks(describeBundleTasksRequest, null, null, true);
     return EndDescribeBundleTasks(asyncResult);
 }
示例#8
0
        /// <summary>
        /// <para>Describes one or more of your bundling tasks.</para> <para><b>NOTE:</b> Completed bundle tasks are listed for only a limited time. If
        /// your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage with the Amazon S3 bucket name and
        /// image manifest name you provided to the bundle task. </para>
        /// </summary>
        /// 
        /// <param name="describeBundleTasksRequest">Container for the necessary parameters to execute the DescribeBundleTasks service method on
        /// AmazonEC2.</param>
        /// 
        /// <returns>The response from the DescribeBundleTasks service method, as returned by AmazonEC2.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<DescribeBundleTasksResponse> DescribeBundleTasksAsync(DescribeBundleTasksRequest describeBundleTasksRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeBundleTasksRequestMarshaller();
            var unmarshaller = DescribeBundleTasksResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DescribeBundleTasksRequest, DescribeBundleTasksResponse>(describeBundleTasksRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
示例#9
0
		internal DescribeBundleTasksResponse DescribeBundleTasks(DescribeBundleTasksRequest request)
        {
            var task = DescribeBundleTasksAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
示例#10
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeBundleTasks operation.
        /// <seealso cref="Amazon.EC2.IAmazonEC2.DescribeBundleTasks"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeBundleTasks operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
		public async Task<DescribeBundleTasksResponse> DescribeBundleTasksAsync(DescribeBundleTasksRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeBundleTasksRequestMarshaller();
            var unmarshaller = DescribeBundleTasksResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DescribeBundleTasksRequest, DescribeBundleTasksResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
示例#11
0
        /// <summary>
        /// <para> The DescribeBundleTasks operation describes in-progress and recent bundle tasks. Complete and failed tasks are removed from the list
        /// a short time after completion. If no bundle ids are given, all bundle tasks are returned. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeBundleTasks service method on
        /// AmazonEC2.</param>
        /// 
        /// <returns>The response from the DescribeBundleTasks service method, as returned by AmazonEC2.</returns>
		public DescribeBundleTasksResponse DescribeBundleTasks(DescribeBundleTasksRequest request)
        {
            var task = DescribeBundleTasksAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// The DescribeBundleTasks operation describes in-progress
        /// and recent bundle tasks. Complete and failed tasks are
        /// removed from the list a short time after completion.
        /// If no bundle ids are given, all bundle tasks are returned.
        /// 
        /// </summary>
        /// <param name="service">Instance of AmazonEC2 service</param>
        /// <param name="request">DescribeBundleTasksRequest request</param>
        public static void InvokeDescribeBundleTasks(AmazonEC2 service, DescribeBundleTasksRequest request)
        {
            try 
            {
                DescribeBundleTasksResponse response = service.DescribeBundleTasks(request);
                
                
                Console.WriteLine ("Service Response");
                Console.WriteLine ("=============================================================================");
                Console.WriteLine ();

                Console.WriteLine("        DescribeBundleTasksResponse");
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata  responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
                if (response.IsSetDescribeBundleTasksResult())
                {
                    Console.WriteLine("            DescribeBundleTasksResult");
                    DescribeBundleTasksResult  describeBundleTasksResult = response.DescribeBundleTasksResult;
                    List<BundleTask> bundleTaskList = describeBundleTasksResult.BundleTask;
                    foreach (BundleTask bundleTask in bundleTaskList)
                    {
                        Console.WriteLine("                BundleTask");
                        if (bundleTask.IsSetInstanceId())
                        {
                            Console.WriteLine("                    InstanceId");
                            Console.WriteLine("                        {0}", bundleTask.InstanceId);
                        }
                        if (bundleTask.IsSetBundleId())
                        {
                            Console.WriteLine("                    BundleId");
                            Console.WriteLine("                        {0}", bundleTask.BundleId);
                        }
                        if (bundleTask.IsSetBundleState())
                        {
                            Console.WriteLine("                    BundleState");
                            Console.WriteLine("                        {0}", bundleTask.BundleState);
                        }
                        if (bundleTask.IsSetStartTime())
                        {
                            Console.WriteLine("                    StartTime");
                            Console.WriteLine("                        {0}", bundleTask.StartTime);
                        }
                        if (bundleTask.IsSetUpdateTime())
                        {
                            Console.WriteLine("                    UpdateTime");
                            Console.WriteLine("                        {0}", bundleTask.UpdateTime);
                        }
                        if (bundleTask.IsSetStorage())
                        {
                            Console.WriteLine("                    Storage");
                            Storage  storage = bundleTask.Storage;
                            if (storage.IsSetS3())
                            {
                                Console.WriteLine("                        S3");
                                S3Storage  s3 = storage.S3;
                                if (s3.IsSetBucket())
                                {
                                    Console.WriteLine("                            Bucket");
                                    Console.WriteLine("                                {0}", s3.Bucket);
                                }
                                if (s3.IsSetPrefix())
                                {
                                    Console.WriteLine("                            Prefix");
                                    Console.WriteLine("                                {0}", s3.Prefix);
                                }
                                if (s3.IsSetAWSAccessKeyId())
                                {
                                    Console.WriteLine("                            AWSAccessKeyId");
                                    Console.WriteLine("                                {0}", s3.AWSAccessKeyId);
                                }
                                if (s3.IsSetUploadPolicy())
                                {
                                    Console.WriteLine("                            UploadPolicy");
                                    Console.WriteLine("                                {0}", s3.UploadPolicy);
                                }
                                if (s3.IsSetUploadPolicySignature())
                                {
                                    Console.WriteLine("                            UploadPolicySignature");
                                    Console.WriteLine("                                {0}", s3.UploadPolicySignature);
                                }
                            }
                        }
                        if (bundleTask.IsSetProgress())
                        {
                            Console.WriteLine("                    Progress");
                            Console.WriteLine("                        {0}", bundleTask.Progress);
                        }
                        if (bundleTask.IsSetBundleTaskError())
                        {
                            Console.WriteLine("                    BundleTaskError");
                            BundleTaskError  bundleTaskError = bundleTask.BundleTaskError;
                            if (bundleTaskError.IsSetCode())
                            {
                                Console.WriteLine("                        Code");
                                Console.WriteLine("                            {0}", bundleTaskError.Code);
                            }
                            if (bundleTaskError.IsSetMessage())
                            {
                                Console.WriteLine("                        Message");
                                Console.WriteLine("                            {0}", bundleTaskError.Message);
                            }
                        }
                    }
                }

            } 
            catch (AmazonEC2Exception ex) 
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
            }
        }