Beispiel #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonLexModelBuildingServiceConfig config = new AmazonLexModelBuildingServiceConfig();

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

            GetBotsResponse resp = new GetBotsResponse();

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

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

                foreach (var obj in resp.Bots)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Beispiel #2
0
        public void LexModelBuildingServiceGetBots()
        {
            #region to-get-a-list-of-bots-1494432220036

            var client   = new AmazonLexModelBuildingServiceClient();
            var response = client.GetBots(new GetBotsRequest
            {
                MaxResults = 5,
                NextToken  = ""
            });

            List <BotMetadata> bots = response.Bots;

            #endregion
        }