Container for the parameters to the UpdateApplicationResourceLifecycle operation. Modifies lifecycle settings for an application.
Inheritance: AmazonElasticBeanstalkRequest
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateApplicationResourceLifecycle operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateApplicationResourceLifecycle 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<UpdateApplicationResourceLifecycleResponse> UpdateApplicationResourceLifecycleAsync(UpdateApplicationResourceLifecycleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateApplicationResourceLifecycleRequestMarshaller();
            var unmarshaller = UpdateApplicationResourceLifecycleResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateApplicationResourceLifecycleRequest,UpdateApplicationResourceLifecycleResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal UpdateApplicationResourceLifecycleResponse UpdateApplicationResourceLifecycle(UpdateApplicationResourceLifecycleRequest request)
        {
            var marshaller = new UpdateApplicationResourceLifecycleRequestMarshaller();
            var unmarshaller = UpdateApplicationResourceLifecycleResponseUnmarshaller.Instance;

            return Invoke<UpdateApplicationResourceLifecycleRequest,UpdateApplicationResourceLifecycleResponse>(request, marshaller, unmarshaller);
        }
 private Amazon.ElasticBeanstalk.Model.UpdateApplicationResourceLifecycleResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.UpdateApplicationResourceLifecycleRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "UpdateApplicationResourceLifecycle");
     try
     {
         #if DESKTOP
         return(client.UpdateApplicationResourceLifecycle(request));
         #elif CORECLR
         return(client.UpdateApplicationResourceLifecycleAsync(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>
        /// Initiates the asynchronous execution of the UpdateApplicationResourceLifecycle operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateApplicationResourceLifecycle 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 EndUpdateApplicationResourceLifecycle
        ///         operation.</returns>
        public IAsyncResult BeginUpdateApplicationResourceLifecycle(UpdateApplicationResourceLifecycleRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateApplicationResourceLifecycleRequestMarshaller();
            var unmarshaller = UpdateApplicationResourceLifecycleResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateApplicationResourceLifecycleRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ElasticBeanstalk.Model.UpdateApplicationResourceLifecycleRequest();

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

            // 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;
            }

            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);
        }