Container for the parameters to the DescribeApplications operation.

Returns the descriptions of existing applications.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
        public static IList<ElasticBeanStalkRecord> GetAllElasticBeanStalkInstances(bool force = false)
        {
            if (m_ElastickBeanstalkRecords == null || force)
            {
                var elasticBeanstalk = ElasticBeanStalkConnectionProvider.GetElasticBeanstalkConnection();

                DescribeApplicationsRequest request = new DescribeApplicationsRequest();
                DescribeApplicationsResponse res = elasticBeanstalk.DescribeApplications();

                m_ElastickBeanstalkRecords = new List<ElasticBeanStalkRecord>();

                res.DescribeApplicationsResult.Applications.ForEach(
                        application =>
                            {
                                var elasticBeanStalkRecord = new ElasticBeanStalkRecord()
                                {
                                    ApplicationName = application.ApplicationName,
                                    DateCreated = application.DateCreated,
                                    Description = application.Description,
                                    DateUpdated = application.DateUpdated
                                };

                                elasticBeanStalkRecord.ConfigurationTemplates = new List<string>(application.ConfigurationTemplates);
                                elasticBeanStalkRecord.Versions = new List<string>(application.Versions);

                                m_ElastickBeanstalkRecords.Add(elasticBeanStalkRecord);
                            }
                    );
            }

            return m_ElastickBeanstalkRecords;
        }
Esempio n. 2
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticBeanstalk.Model.DescribeApplicationsRequest();

            if (cmdletContext.ApplicationName != null)
            {
                request.ApplicationNames = cmdletContext.ApplicationName;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
 /// <summary>
 /// <para>Returns the descriptions of existing applications.</para>
 /// </summary>
 /// 
 /// <param name="describeApplicationsRequest">Container for the necessary parameters to execute the DescribeApplications service method on
 ///          AmazonElasticBeanstalk.</param>
 /// 
 /// <returns>The response from the DescribeApplications service method, as returned by AmazonElasticBeanstalk.</returns>
 /// 
 public DescribeApplicationsResponse DescribeApplications(DescribeApplicationsRequest describeApplicationsRequest)
 {
     IAsyncResult asyncResult = invokeDescribeApplications(describeApplicationsRequest, null, null, true);
     return EndDescribeApplications(asyncResult);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the DescribeApplications operation.
 /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.DescribeApplications"/>
 /// </summary>
 /// 
 /// <param name="describeApplicationsRequest">Container for the necessary parameters to execute the DescribeApplications operation on
 ///          AmazonElasticBeanstalk.</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
 ///         EndDescribeApplications operation.</returns>
 public IAsyncResult BeginDescribeApplications(DescribeApplicationsRequest describeApplicationsRequest, AsyncCallback callback, object state)
 {
     return invokeDescribeApplications(describeApplicationsRequest, callback, state, false);
 }
 IAsyncResult invokeDescribeApplications(DescribeApplicationsRequest describeApplicationsRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DescribeApplicationsRequestMarshaller().Marshall(describeApplicationsRequest);
     var unmarshaller = DescribeApplicationsResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeApplications operation.
        /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeApplications 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<DescribeApplicationsResponse> DescribeApplicationsAsync(DescribeApplicationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeApplicationsRequestMarshaller();
            var unmarshaller = DescribeApplicationsResponseUnmarshaller.Instance;

            return InvokeAsync<DescribeApplicationsRequest,DescribeApplicationsResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal DescribeApplicationsResponse DescribeApplications(DescribeApplicationsRequest request)
        {
            var marshaller = new DescribeApplicationsRequestMarshaller();
            var unmarshaller = DescribeApplicationsResponseUnmarshaller.Instance;

            return Invoke<DescribeApplicationsRequest,DescribeApplicationsResponse>(request, marshaller, unmarshaller);
        }
Esempio n. 8
0
 private Amazon.ElasticBeanstalk.Model.DescribeApplicationsResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.DescribeApplicationsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "DescribeApplications");
     try
     {
         #if DESKTOP
         return(client.DescribeApplications(request));
         #elif CORECLR
         return(client.DescribeApplicationsAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
  /// <summary>
  /// <para>Returns the descriptions of existing applications.</para>
  /// </summary>
  /// 
  /// <param name="describeApplicationsRequest">Container for the necessary parameters to execute the DescribeApplications service method on
  ///           AmazonElasticBeanstalk.</param>
  /// 
  /// <returns>The response from the DescribeApplications service method, as returned by AmazonElasticBeanstalk.</returns>
  /// 
 public DescribeApplicationsResponse DescribeApplications(DescribeApplicationsRequest describeApplicationsRequest) 
 {           
     IRequest<DescribeApplicationsRequest> request = new DescribeApplicationsRequestMarshaller().Marshall(describeApplicationsRequest);
     DescribeApplicationsResponse response = Invoke<DescribeApplicationsRequest, DescribeApplicationsResponse> (request, this.signer, DescribeApplicationsResponseUnmarshaller.GetInstance());
     return response;
 }
        /// <summary>
        /// <para>Returns the descriptions of existing applications.</para>
        /// </summary>
        /// 
        /// <param name="describeApplicationsRequest">Container for the necessary parameters to execute the DescribeApplications service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the DescribeApplications service method, as returned by AmazonElasticBeanstalk.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<DescribeApplicationsResponse> DescribeApplicationsAsync(DescribeApplicationsRequest describeApplicationsRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeApplicationsRequestMarshaller();
            var unmarshaller = DescribeApplicationsResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DescribeApplicationsRequest, DescribeApplicationsResponse>(describeApplicationsRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
		internal DescribeApplicationsResponse DescribeApplications(DescribeApplicationsRequest request)
        {
            var task = DescribeApplicationsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeApplications operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeApplications operation on AmazonElasticBeanstalkClient.</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 EndDescribeApplications
        ///         operation.</returns>
        public IAsyncResult BeginDescribeApplications(DescribeApplicationsRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DescribeApplicationsRequestMarshaller();
            var unmarshaller = DescribeApplicationsResponseUnmarshaller.Instance;

            return BeginInvoke<DescribeApplicationsRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        IAsyncResult invokeDescribeApplications(DescribeApplicationsRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new DescribeApplicationsRequestMarshaller();
            var unmarshaller = DescribeApplicationsResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
        /// <summary>
        /// <para>Returns the descriptions of existing applications.</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DescribeApplications service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the DescribeApplications service method, as returned by AmazonElasticBeanstalk.</returns>
		public DescribeApplicationsResponse DescribeApplications(DescribeApplicationsRequest request)
        {
            var task = DescribeApplicationsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// <para>Returns the descriptions of existing applications.</para>
        /// </summary>
        /// 
        /// <param name="describeApplicationsRequest">Container for the necessary parameters to execute the DescribeApplications service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the DescribeApplications service method, as returned by AmazonElasticBeanstalk.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<DescribeApplicationsResponse> DescribeApplicationsAsync(DescribeApplicationsRequest describeApplicationsRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DescribeApplicationsRequestMarshaller();
            var unmarshaller = DescribeApplicationsResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DescribeApplicationsRequest, DescribeApplicationsResponse>(describeApplicationsRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }