public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.SimpleSystemsManagement.Model.UpdateAssociationRequest(); if (cmdletContext.ApplyOnlyAtCronInterval != null) { request.ApplyOnlyAtCronInterval = cmdletContext.ApplyOnlyAtCronInterval.Value; } if (cmdletContext.AssociationId != null) { request.AssociationId = cmdletContext.AssociationId; } if (cmdletContext.AssociationName != null) { request.AssociationName = cmdletContext.AssociationName; } if (cmdletContext.AssociationVersion != null) { request.AssociationVersion = cmdletContext.AssociationVersion; } if (cmdletContext.AutomationTargetParameterName != null) { request.AutomationTargetParameterName = cmdletContext.AutomationTargetParameterName; } if (cmdletContext.ComplianceSeverity != null) { request.ComplianceSeverity = cmdletContext.ComplianceSeverity; } if (cmdletContext.DocumentVersion != null) { request.DocumentVersion = cmdletContext.DocumentVersion; } if (cmdletContext.MaxConcurrency != null) { request.MaxConcurrency = cmdletContext.MaxConcurrency; } if (cmdletContext.MaxError != null) { request.MaxErrors = cmdletContext.MaxError; } if (cmdletContext.Name != null) { request.Name = cmdletContext.Name; } // populate OutputLocation var requestOutputLocationIsNull = true; request.OutputLocation = new Amazon.SimpleSystemsManagement.Model.InstanceAssociationOutputLocation(); Amazon.SimpleSystemsManagement.Model.S3OutputLocation requestOutputLocation_outputLocation_S3Location = null; // populate S3Location var requestOutputLocation_outputLocation_S3LocationIsNull = true; requestOutputLocation_outputLocation_S3Location = new Amazon.SimpleSystemsManagement.Model.S3OutputLocation(); System.String requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3BucketName = null; if (cmdletContext.S3Location_OutputS3BucketName != null) { requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3BucketName = cmdletContext.S3Location_OutputS3BucketName; } if (requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3BucketName != null) { requestOutputLocation_outputLocation_S3Location.OutputS3BucketName = requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3BucketName; requestOutputLocation_outputLocation_S3LocationIsNull = false; } System.String requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3KeyPrefix = null; if (cmdletContext.S3Location_OutputS3KeyPrefix != null) { requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3KeyPrefix = cmdletContext.S3Location_OutputS3KeyPrefix; } if (requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3KeyPrefix != null) { requestOutputLocation_outputLocation_S3Location.OutputS3KeyPrefix = requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3KeyPrefix; requestOutputLocation_outputLocation_S3LocationIsNull = false; } System.String requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3Region = null; if (cmdletContext.S3Location_OutputS3Region != null) { requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3Region = cmdletContext.S3Location_OutputS3Region; } if (requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3Region != null) { requestOutputLocation_outputLocation_S3Location.OutputS3Region = requestOutputLocation_outputLocation_S3Location_s3Location_OutputS3Region; requestOutputLocation_outputLocation_S3LocationIsNull = false; } // determine if requestOutputLocation_outputLocation_S3Location should be set to null if (requestOutputLocation_outputLocation_S3LocationIsNull) { requestOutputLocation_outputLocation_S3Location = null; } if (requestOutputLocation_outputLocation_S3Location != null) { request.OutputLocation.S3Location = requestOutputLocation_outputLocation_S3Location; requestOutputLocationIsNull = false; } // determine if request.OutputLocation should be set to null if (requestOutputLocationIsNull) { request.OutputLocation = null; } if (cmdletContext.Parameter != null) { request.Parameters = cmdletContext.Parameter; } if (cmdletContext.ScheduleExpression != null) { request.ScheduleExpression = cmdletContext.ScheduleExpression; } if (cmdletContext.SyncCompliance != null) { request.SyncCompliance = cmdletContext.SyncCompliance; } if (cmdletContext.Target != null) { request.Targets = cmdletContext.Target; } 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); }