public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.QuickSight.Model.UpdateDashboardPermissionsRequest();

            if (cmdletContext.AwsAccountId != null)
            {
                request.AwsAccountId = cmdletContext.AwsAccountId;
            }
            if (cmdletContext.DashboardId != null)
            {
                request.DashboardId = cmdletContext.DashboardId;
            }
            if (cmdletContext.GrantLinkPermission != null)
            {
                request.GrantLinkPermissions = cmdletContext.GrantLinkPermission;
            }
            if (cmdletContext.GrantPermission != null)
            {
                request.GrantPermissions = cmdletContext.GrantPermission;
            }
            if (cmdletContext.RevokeLinkPermission != null)
            {
                request.RevokeLinkPermissions = cmdletContext.RevokeLinkPermission;
            }
            if (cmdletContext.RevokePermission != null)
            {
                request.RevokePermissions = cmdletContext.RevokePermission;
            }

            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);
        }
 private Amazon.QuickSight.Model.UpdateDashboardPermissionsResponse CallAWSServiceOperation(IAmazonQuickSight client, Amazon.QuickSight.Model.UpdateDashboardPermissionsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon QuickSight", "UpdateDashboardPermissions");
     try
     {
         #if DESKTOP
         return(client.UpdateDashboardPermissions(request));
         #elif CORECLR
         return(client.UpdateDashboardPermissionsAsync(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;
     }
 }