private Amazon.RDS.Model.CreateDBProxyResponse CallAWSServiceOperation(IAmazonRDS client, Amazon.RDS.Model.CreateDBProxyRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Relational Database Service", "CreateDBProxy");
     try
     {
         #if DESKTOP
         return(client.CreateDBProxy(request));
         #elif CORECLR
         return(client.CreateDBProxyAsync(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.RDS.Model.CreateDBProxyRequest();

            if (cmdletContext.Auth != null)
            {
                request.Auth = cmdletContext.Auth;
            }
            if (cmdletContext.DBProxyName != null)
            {
                request.DBProxyName = cmdletContext.DBProxyName;
            }
            if (cmdletContext.DebugLogging != null)
            {
                request.DebugLogging = cmdletContext.DebugLogging.Value;
            }
            if (cmdletContext.EngineFamily != null)
            {
                request.EngineFamily = cmdletContext.EngineFamily;
            }
            if (cmdletContext.IdleClientTimeout != null)
            {
                request.IdleClientTimeout = cmdletContext.IdleClientTimeout.Value;
            }
            if (cmdletContext.RequireTLS != null)
            {
                request.RequireTLS = cmdletContext.RequireTLS.Value;
            }
            if (cmdletContext.RoleArn != null)
            {
                request.RoleArn = cmdletContext.RoleArn;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }
            if (cmdletContext.VpcSecurityGroupId != null)
            {
                request.VpcSecurityGroupIds = cmdletContext.VpcSecurityGroupId;
            }
            if (cmdletContext.VpcSubnetId != null)
            {
                request.VpcSubnetIds = cmdletContext.VpcSubnetId;
            }

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