public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonDeviceFarmConfig config = new AmazonDeviceFarmConfig();

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

            ListOfferingsResponse resp = new ListOfferingsResponse();

            do
            {
                ListOfferingsRequest req = new ListOfferingsRequest
                {
                    NextToken = resp.NextToken
                };

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

                foreach (var obj in resp.Offerings)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Ejemplo n.º 2
0
        public void DeviceFarmListOfferings()
        {
            #region to-get-information-about-device-offerings-1472562810999

            var client   = new AmazonDeviceFarmClient();
            var response = client.ListOfferings(new ListOfferingsRequest
            {
                NextToken = "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE=" // A dynamically generated value, used for paginating results.
            });

            List <Offering> offerings = response.Offerings;

            #endregion
        }