Exemplo n.º 1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonIoTConfig config = new AmazonIoTConfig();

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

            ListV2LoggingLevelsResponse resp = new ListV2LoggingLevelsResponse();

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

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

                foreach (var obj in resp.LogTargetConfigurations)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }