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

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

            ListFHIRDatastoresResponse resp = new ListFHIRDatastoresResponse();

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

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

                foreach (var obj in resp.DatastorePropertiesList)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
示例#2
0
        protected IAmazonHealthLake CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonHealthLakeConfig {
                RegionEndpoint = region
            };

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

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