コード例 #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);

            ListCACertificatesResponse resp = new ListCACertificatesResponse();

            do
            {
                ListCACertificatesRequest req = new ListCACertificatesRequest
                {
                    Marker = resp.NextMarker
                    ,
                    PageSize = maxItems
                };

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

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