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

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

            ListDomainsResponse resp = new ListDomainsResponse();

            do
            {
                ListDomainsRequest req = new ListDomainsRequest
                {
                    Marker = resp.NextPageMarker
                    ,
                    MaxItems = maxItems
                };

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

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