private Amazon.ServerMigrationService.Model.NotifyAppValidationOutputResponse CallAWSServiceOperation(IAmazonServerMigrationService client, Amazon.ServerMigrationService.Model.NotifyAppValidationOutputRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Server Migration Service", "NotifyAppValidationOutput"); try { #if DESKTOP return(client.NotifyAppValidationOutput(request)); #elif CORECLR return(client.NotifyAppValidationOutputAsync(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.ServerMigrationService.Model.NotifyAppValidationOutputRequest(); if (cmdletContext.AppId != null) { request.AppId = cmdletContext.AppId; } // populate NotificationContext var requestNotificationContextIsNull = true; request.NotificationContext = new Amazon.ServerMigrationService.Model.NotificationContext(); Amazon.ServerMigrationService.ValidationStatus requestNotificationContext_notificationContext_Status = null; if (cmdletContext.NotificationContext_Status != null) { requestNotificationContext_notificationContext_Status = cmdletContext.NotificationContext_Status; } if (requestNotificationContext_notificationContext_Status != null) { request.NotificationContext.Status = requestNotificationContext_notificationContext_Status; requestNotificationContextIsNull = false; } System.String requestNotificationContext_notificationContext_StatusMessage = null; if (cmdletContext.NotificationContext_StatusMessage != null) { requestNotificationContext_notificationContext_StatusMessage = cmdletContext.NotificationContext_StatusMessage; } if (requestNotificationContext_notificationContext_StatusMessage != null) { request.NotificationContext.StatusMessage = requestNotificationContext_notificationContext_StatusMessage; requestNotificationContextIsNull = false; } System.String requestNotificationContext_notificationContext_ValidationId = null; if (cmdletContext.NotificationContext_ValidationId != null) { requestNotificationContext_notificationContext_ValidationId = cmdletContext.NotificationContext_ValidationId; } if (requestNotificationContext_notificationContext_ValidationId != null) { request.NotificationContext.ValidationId = requestNotificationContext_notificationContext_ValidationId; requestNotificationContextIsNull = false; } // determine if request.NotificationContext should be set to null if (requestNotificationContextIsNull) { request.NotificationContext = 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); }