public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonManagedBlockchainConfig config = new AmazonManagedBlockchainConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonManagedBlockchainClient client = new AmazonManagedBlockchainClient(creds, config); ListInvitationsResponse resp = new ListInvitationsResponse(); do { ListInvitationsRequest req = new ListInvitationsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListInvitations(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Invitations) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
protected IAmazonManagedBlockchain CreateClient(AWSCredentials credentials, RegionEndpoint region) { var config = new AmazonManagedBlockchainConfig { RegionEndpoint = region }; Amazon.PowerShell.Utils.Common.PopulateConfig(this, config); this.CustomizeClientConfig(config); var client = new AmazonManagedBlockchainClient(credentials, config); client.BeforeRequestEvent += RequestEventHandler; client.AfterResponseEvent += ResponseEventHandler; return(client); }