Beispiel #1
0
 private Amazon.SimpleWorkflow.Model.UndeprecateActivityTypeResponse CallAWSServiceOperation(IAmazonSimpleWorkflow client, Amazon.SimpleWorkflow.Model.UndeprecateActivityTypeRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Simple Workflow Service (SWF)", "UndeprecateActivityType");
     try
     {
         #if DESKTOP
         return(client.UndeprecateActivityType(request));
         #elif CORECLR
         return(client.UndeprecateActivityTypeAsync(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;
     }
 }
Beispiel #2
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.SimpleWorkflow.Model.UndeprecateActivityTypeRequest();


            // populate ActivityType
            var requestActivityTypeIsNull = true;

            request.ActivityType = new Amazon.SimpleWorkflow.Model.ActivityType();
            System.String requestActivityType_activityType_Name = null;
            if (cmdletContext.ActivityType_Name != null)
            {
                requestActivityType_activityType_Name = cmdletContext.ActivityType_Name;
            }
            if (requestActivityType_activityType_Name != null)
            {
                request.ActivityType.Name = requestActivityType_activityType_Name;
                requestActivityTypeIsNull = false;
            }
            System.String requestActivityType_activityType_Version = null;
            if (cmdletContext.ActivityType_Version != null)
            {
                requestActivityType_activityType_Version = cmdletContext.ActivityType_Version;
            }
            if (requestActivityType_activityType_Version != null)
            {
                request.ActivityType.Version = requestActivityType_activityType_Version;
                requestActivityTypeIsNull    = false;
            }
            // determine if request.ActivityType should be set to null
            if (requestActivityTypeIsNull)
            {
                request.ActivityType = null;
            }
            if (cmdletContext.Domain != null)
            {
                request.Domain = cmdletContext.Domain;
            }

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