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

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

            GetResourceShareInvitationsResponse resp = new GetResourceShareInvitationsResponse();

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

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

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

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

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