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

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

            DescribeImagesResponse resp = new DescribeImagesResponse();

            do
            {
                DescribeImagesRequest req = new DescribeImagesRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

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

                foreach (var obj in resp.Images)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        protected IAmazonAppStream CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonAppStreamConfig {
                RegionEndpoint = region
            };

            Amazon.PowerShell.Utils.Common.PopulateConfig(this, config);
            this.CustomizeClientConfig(config);
            var client = new AmazonAppStreamClient(credentials, config);

            client.BeforeRequestEvent += RequestEventHandler;
            client.AfterResponseEvent += ResponseEventHandler;
            return(client);
        }