Container for the parameters to the CreateApplication operation.

Creates an application that has one configuration template named default and no application versions.

Inheritance: AmazonElasticBeanstalkRequest
 /// <summary>
 /// Initiates the asynchronous execution of the CreateApplication operation.
 /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.CreateApplication"/>
 /// </summary>
 /// 
 /// <param name="createApplicationRequest">Container for the necessary parameters to execute the CreateApplication 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 EndCreateApplication
 ///         operation.</returns>
 public IAsyncResult BeginCreateApplication(CreateApplicationRequest createApplicationRequest, AsyncCallback callback, object state)
 {
     return invokeCreateApplication(createApplicationRequest, callback, state, false);
 }
 /// <summary>
 /// <para> Creates an application that has one configuration template named <c>default</c> and no application versions. </para>
 /// <para><b>NOTE:</b> The default configuration template is for a 32-bit version of the Amazon Linux operating system running the Tomcat 6
 /// application container. </para>
 /// </summary>
 /// 
 /// <param name="createApplicationRequest">Container for the necessary parameters to execute the CreateApplication service method on
 ///          AmazonElasticBeanstalk.</param>
 /// 
 /// <returns>The response from the CreateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
 /// 
 /// <exception cref="TooManyApplicationsException"/>
 public CreateApplicationResponse CreateApplication(CreateApplicationRequest createApplicationRequest)
 {
     IAsyncResult asyncResult = invokeCreateApplication(createApplicationRequest, null, null, true);
     return EndCreateApplication(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateApplication operation.
        /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateApplication 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<CreateApplicationResponse> CreateApplicationAsync(CreateApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateApplicationRequestMarshaller();
            var unmarshaller = CreateApplicationResponseUnmarshaller.Instance;

            return InvokeAsync<CreateApplicationRequest,CreateApplicationResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 IAsyncResult invokeCreateApplication(CreateApplicationRequest createApplicationRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new CreateApplicationRequestMarshaller().Marshall(createApplicationRequest);
     var unmarshaller = CreateApplicationResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
  /// <summary>
  /// <para> Creates an application that has one configuration template named <c>default</c> and no application versions. </para>
  /// <para><b>NOTE:</b> The default configuration template is for a 32-bit version of the Amazon Linux operating system running the Tomcat 6
  /// application container. </para>
  /// </summary>
  /// 
  /// <param name="createApplicationRequest">Container for the necessary parameters to execute the CreateApplication service method on
  ///           AmazonElasticBeanstalk.</param>
  /// 
  /// <returns>The response from the CreateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
  /// 
  /// <exception cref="TooManyApplicationsException"/>
 public CreateApplicationResponse CreateApplication(CreateApplicationRequest createApplicationRequest) 
 {           
     IRequest<CreateApplicationRequest> request = new CreateApplicationRequestMarshaller().Marshall(createApplicationRequest);
     CreateApplicationResponse response = Invoke<CreateApplicationRequest, CreateApplicationResponse> (request, this.signer, CreateApplicationResponseUnmarshaller.GetInstance());
     return response;
 }
        internal CreateApplicationResponse CreateApplication(CreateApplicationRequest request)
        {
            var marshaller = new CreateApplicationRequestMarshaller();
            var unmarshaller = CreateApplicationResponseUnmarshaller.Instance;

            return Invoke<CreateApplicationRequest,CreateApplicationResponse>(request, marshaller, unmarshaller);
        }
		internal CreateApplicationResponse CreateApplication(CreateApplicationRequest request)
        {
            var task = CreateApplicationAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// <para> Creates an application that has one configuration template named <c>default</c> and no application versions. </para>
        /// </summary>
        /// 
        /// <param name="createApplicationRequest">Container for the necessary parameters to execute the CreateApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the CreateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyApplicationsException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<CreateApplicationResponse> CreateApplicationAsync(CreateApplicationRequest createApplicationRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateApplicationRequestMarshaller();
            var unmarshaller = CreateApplicationResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, CreateApplicationRequest, CreateApplicationResponse>(createApplicationRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
Beispiel #9
0
 private Amazon.ElasticBeanstalk.Model.CreateApplicationResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.CreateApplicationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "CreateApplication");
     try
     {
         #if DESKTOP
         return(client.CreateApplication(request));
         #elif CORECLR
         return(client.CreateApplicationAsync(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>
        /// 
        /// </summary>
        /// <param name="createApplicationVersionRequest"></param>
        /// <returns></returns>
        public async Task CreateOrUpdateApplicationAsync(CreateApplicationVersionRequest createApplicationVersionRequest)
        {
            using (var ebClient = new AmazonElasticBeanstalkClient(creds, configurationProvider.RegionEndpoint))
            {
                if (await IsNewApplicationAsync(ebClient))
                {
                    loggerProvider.GetLogger().Debug("New application - creating...");
                    var createApplicationRequest = new CreateApplicationRequest
                    {
                        ApplicationName = configurationProvider.LongApplicationName
                    };

                    var createApplicationResponse = await ebClient.CreateApplicationAsync(createApplicationRequest);
                    loggerProvider.GetLogger().Debug($"Created application: {createApplicationResponse}");
                }

                var describeApplicationsRequest = new DescribeApplicationVersionsRequest
                {
                    ApplicationName = configurationProvider.LongApplicationName,
                    VersionLabels = new List<string> { configurationProvider.Version }
                };

                var apps = await ebClient.DescribeApplicationVersionsAsync(describeApplicationsRequest);
                if (apps.ApplicationVersions.Any())
                {
                    loggerProvider.GetLogger().Debug("Application Version already exists");
                    return;
                }

                loggerProvider.GetLogger().Debug("Creating application version...");
                var createApplicationVersionResponse = await ebClient.CreateApplicationVersionAsync(createApplicationVersionRequest);
                loggerProvider.GetLogger().Debug($"Created application version: {createApplicationVersionResponse}");

            }
        }
Beispiel #11
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticBeanstalk.Model.CreateApplicationRequest();

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

            // populate ResourceLifecycleConfig
            var requestResourceLifecycleConfigIsNull = true;

            request.ResourceLifecycleConfig = new Amazon.ElasticBeanstalk.Model.ApplicationResourceLifecycleConfig();
            System.String requestResourceLifecycleConfig_resourceLifecycleConfig_ServiceRole = null;
            if (cmdletContext.ResourceLifecycleConfig_ServiceRole != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_ServiceRole = cmdletContext.ResourceLifecycleConfig_ServiceRole;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_ServiceRole != null)
            {
                request.ResourceLifecycleConfig.ServiceRole = requestResourceLifecycleConfig_resourceLifecycleConfig_ServiceRole;
                requestResourceLifecycleConfigIsNull        = false;
            }
            Amazon.ElasticBeanstalk.Model.ApplicationVersionLifecycleConfig requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig = null;

            // populate VersionLifecycleConfig
            var requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfigIsNull = true;

            requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig = new Amazon.ElasticBeanstalk.Model.ApplicationVersionLifecycleConfig();
            Amazon.ElasticBeanstalk.Model.MaxAgeRule requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule = null;

            // populate MaxAgeRule
            var requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRuleIsNull = true;

            requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule = new Amazon.ElasticBeanstalk.Model.MaxAgeRule();
            System.Boolean?requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_DeleteSourceFromS3 = null;
            if (cmdletContext.MaxAgeRule_DeleteSourceFromS3 != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_DeleteSourceFromS3 = cmdletContext.MaxAgeRule_DeleteSourceFromS3.Value;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_DeleteSourceFromS3 != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule.DeleteSourceFromS3 = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_DeleteSourceFromS3.Value;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRuleIsNull = false;
            }
            System.Boolean?requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_Enabled = null;
            if (cmdletContext.MaxAgeRule_Enabled != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_Enabled = cmdletContext.MaxAgeRule_Enabled.Value;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_Enabled != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule.Enabled = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_Enabled.Value;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRuleIsNull   = false;
            }
            System.Int32?requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_MaxAgeInDay = null;
            if (cmdletContext.MaxAgeRule_MaxAgeInDay != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_MaxAgeInDay = cmdletContext.MaxAgeRule_MaxAgeInDay.Value;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_MaxAgeInDay != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule.MaxAgeInDays = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule_maxAgeRule_MaxAgeInDay.Value;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRuleIsNull        = false;
            }
            // determine if requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule should be set to null
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRuleIsNull)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule = null;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig.MaxAgeRule = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxAgeRule;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfigIsNull      = false;
            }
            Amazon.ElasticBeanstalk.Model.MaxCountRule requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule = null;

            // populate MaxCountRule
            var requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRuleIsNull = true;

            requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule = new Amazon.ElasticBeanstalk.Model.MaxCountRule();
            System.Boolean?requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_DeleteSourceFromS3 = null;
            if (cmdletContext.MaxCountRule_DeleteSourceFromS3 != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_DeleteSourceFromS3 = cmdletContext.MaxCountRule_DeleteSourceFromS3.Value;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_DeleteSourceFromS3 != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule.DeleteSourceFromS3 = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_DeleteSourceFromS3.Value;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRuleIsNull = false;
            }
            System.Boolean?requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_Enabled = null;
            if (cmdletContext.MaxCountRule_Enabled != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_Enabled = cmdletContext.MaxCountRule_Enabled.Value;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_Enabled != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule.Enabled = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_Enabled.Value;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRuleIsNull   = false;
            }
            System.Int32?requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_MaxCount = null;
            if (cmdletContext.MaxCountRule_MaxCount != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_MaxCount = cmdletContext.MaxCountRule_MaxCount.Value;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_MaxCount != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule.MaxCount = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule_maxCountRule_MaxCount.Value;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRuleIsNull    = false;
            }
            // determine if requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule should be set to null
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRuleIsNull)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule = null;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule != null)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig.MaxCountRule = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig_MaxCountRule;
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfigIsNull        = false;
            }
            // determine if requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig should be set to null
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfigIsNull)
            {
                requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig = null;
            }
            if (requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig != null)
            {
                request.ResourceLifecycleConfig.VersionLifecycleConfig = requestResourceLifecycleConfig_resourceLifecycleConfig_VersionLifecycleConfig;
                requestResourceLifecycleConfigIsNull = false;
            }
            // determine if request.ResourceLifecycleConfig should be set to null
            if (requestResourceLifecycleConfigIsNull)
            {
                request.ResourceLifecycleConfig = null;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }

            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>
        /// Initiates the asynchronous execution of the CreateApplication operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateApplication 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 EndCreateApplication
        ///         operation.</returns>
        public IAsyncResult BeginCreateApplication(CreateApplicationRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new CreateApplicationRequestMarshaller();
            var unmarshaller = CreateApplicationResponseUnmarshaller.Instance;

            return BeginInvoke<CreateApplicationRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        IAsyncResult invokeCreateApplication(CreateApplicationRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new CreateApplicationRequestMarshaller();
            var unmarshaller = CreateApplicationResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
        /// <summary>
        /// <para> Creates an application that has one configuration template named <c>default</c> and no application versions. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the CreateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyApplicationsException" />
		public CreateApplicationResponse CreateApplication(CreateApplicationRequest request)
        {
            var task = CreateApplicationAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// <para> Creates an application that has one configuration template named <c>default</c> and no application versions. </para>
        /// <para><b>NOTE:</b> The default configuration template is for a 32-bit version of the Amazon Linux operating system running the Tomcat 6
        /// application container. </para>
        /// </summary>
        /// 
        /// <param name="createApplicationRequest">Container for the necessary parameters to execute the CreateApplication service method on
        /// AmazonElasticBeanstalk.</param>
        /// 
        /// <returns>The response from the CreateApplication service method, as returned by AmazonElasticBeanstalk.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticBeanstalk.Model.TooManyApplicationsException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<CreateApplicationResponse> CreateApplicationAsync(CreateApplicationRequest createApplicationRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateApplicationRequestMarshaller();
            var unmarshaller = CreateApplicationResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, CreateApplicationRequest, CreateApplicationResponse>(createApplicationRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }