/// <summary>
        /// <para> Returns descriptions of what each policy does. This action supports pagination. If the response includes a token, there are more
        /// records available. To get the additional records, repeat the request with the response token as the NextToken parameter. </para>
        /// </summary>
        ///
        /// <param name="describePoliciesRequest">Container for the necessary parameters to execute the DescribePolicies service method on
        ///           AmazonAutoScaling.</param>
        ///
        /// <returns>The response from the DescribePolicies service method, as returned by AmazonAutoScaling.</returns>
        ///
        /// <exception cref="InvalidNextTokenException"/>
        public DescribePoliciesResponse DescribePolicies(DescribePoliciesRequest describePoliciesRequest)
        {
            IRequest <DescribePoliciesRequest> request  = new DescribePoliciesRequestMarshaller().Marshall(describePoliciesRequest);
            DescribePoliciesResponse           response = Invoke <DescribePoliciesRequest, DescribePoliciesResponse> (request, this.signer, DescribePoliciesResponseUnmarshaller.GetInstance());

            return(response);
        }
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonAutoScalingConfig config = new AmazonAutoScalingConfig();

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

            DescribePoliciesResponse resp = new DescribePoliciesResponse();

            do
            {
                DescribePoliciesRequest req = new DescribePoliciesRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxRecords = maxItems
                };

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

                foreach (var obj in resp.ScalingPolicies)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }