private Amazon.Glue.Model.CreateSecurityConfigurationResponse CallAWSServiceOperation(IAmazonGlue client, Amazon.Glue.Model.CreateSecurityConfigurationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Glue", "CreateSecurityConfiguration");
     try
     {
         #if DESKTOP
         return(client.CreateSecurityConfiguration(request));
         #elif CORECLR
         return(client.CreateSecurityConfigurationAsync(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;
     }
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Glue.Model.CreateSecurityConfigurationRequest();


            // populate EncryptionConfiguration
            var requestEncryptionConfigurationIsNull = true;

            request.EncryptionConfiguration = new Amazon.Glue.Model.EncryptionConfiguration();
            List <Amazon.Glue.Model.S3Encryption> requestEncryptionConfiguration_encryptionConfiguration_S3Encryption = null;

            if (cmdletContext.EncryptionConfiguration_S3Encryption != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_S3Encryption = cmdletContext.EncryptionConfiguration_S3Encryption;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_S3Encryption != null)
            {
                request.EncryptionConfiguration.S3Encryption = requestEncryptionConfiguration_encryptionConfiguration_S3Encryption;
                requestEncryptionConfigurationIsNull         = false;
            }
            Amazon.Glue.Model.CloudWatchEncryption requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption = null;

            // populate CloudWatchEncryption
            var requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryptionIsNull = true;

            requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption = new Amazon.Glue.Model.CloudWatchEncryption();
            Amazon.Glue.CloudWatchEncryptionMode requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_CloudWatchEncryptionMode = null;
            if (cmdletContext.CloudWatchEncryption_CloudWatchEncryptionMode != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_CloudWatchEncryptionMode = cmdletContext.CloudWatchEncryption_CloudWatchEncryptionMode;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_CloudWatchEncryptionMode != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption.CloudWatchEncryptionMode = requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_CloudWatchEncryptionMode;
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryptionIsNull = false;
            }
            System.String requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_KmsKeyArn = null;
            if (cmdletContext.CloudWatchEncryption_KmsKeyArn != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_KmsKeyArn = cmdletContext.CloudWatchEncryption_KmsKeyArn;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_KmsKeyArn != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption.KmsKeyArn = requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption_cloudWatchEncryption_KmsKeyArn;
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryptionIsNull     = false;
            }
            // determine if requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption should be set to null
            if (requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryptionIsNull)
            {
                requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption = null;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption != null)
            {
                request.EncryptionConfiguration.CloudWatchEncryption = requestEncryptionConfiguration_encryptionConfiguration_CloudWatchEncryption;
                requestEncryptionConfigurationIsNull = false;
            }
            Amazon.Glue.Model.JobBookmarksEncryption requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption = null;

            // populate JobBookmarksEncryption
            var requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryptionIsNull = true;

            requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption = new Amazon.Glue.Model.JobBookmarksEncryption();
            Amazon.Glue.JobBookmarksEncryptionMode requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_JobBookmarksEncryptionMode = null;
            if (cmdletContext.JobBookmarksEncryption_JobBookmarksEncryptionMode != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_JobBookmarksEncryptionMode = cmdletContext.JobBookmarksEncryption_JobBookmarksEncryptionMode;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_JobBookmarksEncryptionMode != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption.JobBookmarksEncryptionMode = requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_JobBookmarksEncryptionMode;
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryptionIsNull = false;
            }
            System.String requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_KmsKeyArn = null;
            if (cmdletContext.JobBookmarksEncryption_KmsKeyArn != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_KmsKeyArn = cmdletContext.JobBookmarksEncryption_KmsKeyArn;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_KmsKeyArn != null)
            {
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption.KmsKeyArn = requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption_jobBookmarksEncryption_KmsKeyArn;
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryptionIsNull     = false;
            }
            // determine if requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption should be set to null
            if (requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryptionIsNull)
            {
                requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption = null;
            }
            if (requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption != null)
            {
                request.EncryptionConfiguration.JobBookmarksEncryption = requestEncryptionConfiguration_encryptionConfiguration_JobBookmarksEncryption;
                requestEncryptionConfigurationIsNull = false;
            }
            // determine if request.EncryptionConfiguration should be set to null
            if (requestEncryptionConfigurationIsNull)
            {
                request.EncryptionConfiguration = null;
            }
            if (cmdletContext.Name != null)
            {
                request.Name = cmdletContext.Name;
            }

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