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

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

            DescribeCustomAvailabilityZonesResponse resp = new DescribeCustomAvailabilityZonesResponse();

            do
            {
                DescribeCustomAvailabilityZonesRequest req = new DescribeCustomAvailabilityZonesRequest
                {
                    Marker = resp.Marker
                    ,
                    MaxRecords = maxItems
                };

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

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