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


            // populate Config
            var requestConfigIsNull = true;

            request.Config = new Amazon.DevOpsGuru.Model.NotificationChannelConfig();
            Amazon.DevOpsGuru.Model.SnsChannelConfig requestConfig_config_Sn = null;
            if (cmdletContext.Config_Sn != null)
            {
                requestConfig_config_Sn = cmdletContext.Config_Sn;
            }
            if (requestConfig_config_Sn != null)
            {
                request.Config.Sns  = requestConfig_config_Sn;
                requestConfigIsNull = false;
            }
            // determine if request.Config should be set to null
            if (requestConfigIsNull)
            {
                request.Config = 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);
        }
 private Amazon.DevOpsGuru.Model.AddNotificationChannelResponse CallAWSServiceOperation(IAmazonDevOpsGuru client, Amazon.DevOpsGuru.Model.AddNotificationChannelRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon DevOps Guru", "AddNotificationChannel");
     try
     {
         #if DESKTOP
         return(client.AddNotificationChannel(request));
         #elif CORECLR
         return(client.AddNotificationChannelAsync(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;
     }
 }