public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.CertificateManager.Model.PutAccountConfigurationRequest();


            // populate ExpiryEvents
            var requestExpiryEventsIsNull = true;

            request.ExpiryEvents = new Amazon.CertificateManager.Model.ExpiryEventsConfiguration();
            System.Int32?requestExpiryEvents_expiryEvents_DaysBeforeExpiry = null;
            if (cmdletContext.ExpiryEvents_DaysBeforeExpiry != null)
            {
                requestExpiryEvents_expiryEvents_DaysBeforeExpiry = cmdletContext.ExpiryEvents_DaysBeforeExpiry.Value;
            }
            if (requestExpiryEvents_expiryEvents_DaysBeforeExpiry != null)
            {
                request.ExpiryEvents.DaysBeforeExpiry = requestExpiryEvents_expiryEvents_DaysBeforeExpiry.Value;
                requestExpiryEventsIsNull             = false;
            }
            // determine if request.ExpiryEvents should be set to null
            if (requestExpiryEventsIsNull)
            {
                request.ExpiryEvents = null;
            }
            if (cmdletContext.IdempotencyToken != null)
            {
                request.IdempotencyToken = cmdletContext.IdempotencyToken;
            }

            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);
        }
 private Amazon.CertificateManager.Model.PutAccountConfigurationResponse CallAWSServiceOperation(IAmazonCertificateManager client, Amazon.CertificateManager.Model.PutAccountConfigurationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Certificate Manager", "PutAccountConfiguration");
     try
     {
         #if DESKTOP
         return(client.PutAccountConfiguration(request));
         #elif CORECLR
         return(client.PutAccountConfigurationAsync(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;
     }
 }