public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonResourceGroupsTaggingAPIConfig config = new AmazonResourceGroupsTaggingAPIConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonResourceGroupsTaggingAPIClient client = new AmazonResourceGroupsTaggingAPIClient(creds, config);

            GetComplianceSummaryResponse resp = new GetComplianceSummaryResponse();

            do
            {
                GetComplianceSummaryRequest req = new GetComplianceSummaryRequest
                {
                    PaginationToken = resp.PaginationToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.GetComplianceSummary(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.SummaryList)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.PaginationToken));
        }
        /// <summary>
        /// Returns a table that shows counts of resources that are noncompliant with their tag
        /// policies.
        ///
        ///
        /// <para>
        /// For more information on tag policies, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">Tag
        /// Policies</a> in the <i>AWS Organizations User Guide.</i>
        /// </para>
        ///
        /// <para>
        /// You can call this operation only from the organization's management account and from
        /// the us-east-1 Region.
        /// </para>
        ///
        /// <para>
        /// This operation supports pagination, where the response can be sent in multiple pages.
        /// You should check the <code>PaginationToken</code> response parameter to determine
        /// if there are additional results available to return. Repeat the query, passing the
        /// <code>PaginationToken</code> response parameter value as an input to the next request
        /// until you recieve a <code>null</code> value. A null value for <code>PaginationToken</code>
        /// indicates that there are no more results waiting to be returned.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetComplianceSummary service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the GetComplianceSummary service method, as returned by ResourceGroupsTaggingAPI.</returns>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.ConstraintViolationException">
        /// The request was denied because performing this operation violates a constraint.
        ///
        ///
        /// <para>
        /// Some of the reasons in the following list might not apply to this specific operation.
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// You must meet the prerequisites for using tag policies. For information, see <a href="http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html">Prerequisites
        /// and Permissions for Using Tag Policies</a> in the <i>AWS Organizations User Guide.</i>
        ///
        /// </para>
        ///  </li> <li>
        /// <para>
        /// You must enable the tag policies service principal (<code>tagpolicies.tag.amazonaws.com</code>)
        /// to integrate with AWS Organizations For information, see <a href="http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html">EnableAWSServiceAccess</a>.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// You must have a tag policy attached to the organization root, an OU, or an account.
        /// </para>
        ///  </li> </ul>
        /// </exception>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.InternalServiceException">
        /// The request processing failed because of an unknown error, exception, or failure.
        /// You can retry the request.
        /// </exception>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.InvalidParameterException">
        /// This error indicates one of the following:
        ///
        ///  <ul> <li>
        /// <para>
        /// A parameter is missing.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// A malformed string was supplied for the request parameter.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// An out-of-range value was supplied for the request parameter.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// The target ID is invalid, unsupported, or doesn't exist.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// You can't access the Amazon S3 bucket for report storage. For more information, see
        /// <a href="http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report">Additional
        /// Requirements for Organization-wide Tag Compliance Reports</a> in the <i>AWS Organizations
        /// User Guide.</i>
        /// </para>
        ///  </li> </ul>
        /// </exception>
        /// <exception cref="Amazon.ResourceGroupsTaggingAPI.Model.ThrottledException">
        /// The request was denied to limit the frequency of submitted requests.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetComplianceSummary">REST API Reference for GetComplianceSummary Operation</seealso>
        public virtual Task <GetComplianceSummaryResponse> GetComplianceSummaryAsync(GetComplianceSummaryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetComplianceSummaryRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetComplianceSummaryResponseUnmarshaller.Instance;

            return(InvokeAsync <GetComplianceSummaryResponse>(request, options, cancellationToken));
        }
        internal virtual GetComplianceSummaryResponse GetComplianceSummary(GetComplianceSummaryRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetComplianceSummaryRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetComplianceSummaryResponseUnmarshaller.Instance;

            return(Invoke <GetComplianceSummaryResponse>(request, options));
        }