public void TestProductsWithLocationService() { var request = new DescribeRegionsRequest(); DescribeRegionsResponse response = client.GetAcsResponse(request); Assert.True(0 < response.Regions.Count); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.Code = context.IntegerValue("DescribeRegions.Code"); describeRegionsResponse.Message = context.StringValue("DescribeRegions.Message"); describeRegionsResponse.Success = context.BooleanValue("DescribeRegions.Success"); List <DescribeRegionsResponse.DescribeRegions_Region> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_Region>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Region(); region.RegionId = context.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); region.LocalName = context.StringValue("DescribeRegions.Regions[" + i + "].LocalName"); region.RegionEndpoint = context.StringValue("DescribeRegions.Regions[" + i + "].RegionEndpoint"); describeRegionsResponse_regions.Add(region); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; describeRegionsResponse.RequestId = _ctx.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.Success = _ctx.BooleanValue("DescribeRegions.Success"); describeRegionsResponse.Code = _ctx.StringValue("DescribeRegions.Code"); describeRegionsResponse.ErrorMsg = _ctx.StringValue("DescribeRegions.ErrorMsg"); List <DescribeRegionsResponse.DescribeRegions_Region> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_Region>(); for (int i = 0; i < _ctx.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Region(); region.RegionId = _ctx.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); region.LocalName = _ctx.StringValue("DescribeRegions.Regions[" + i + "].LocalName"); region.RegionEndpoint = _ctx.StringValue("DescribeRegions.Regions[" + i + "].RegionEndpoint"); describeRegionsResponse_regions.Add(region); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.TotalCount = context.IntegerValue("DescribeRegions.TotalCount"); describeRegionsResponse.PageSize = context.IntegerValue("DescribeRegions.PageSize"); describeRegionsResponse.PageNumber = context.IntegerValue("DescribeRegions.PageNumber"); List <DescribeRegionsResponse.DescribeRegions_Region> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_Region>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Region(); region.RegionId = context.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); region.LocalName = context.StringValue("DescribeRegions.Regions[" + i + "].LocalName"); region.RegionEndpoint = context.StringValue("DescribeRegions.Regions[" + i + "].RegionEndpoint"); describeRegionsResponse_regions.Add(region); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; describeRegionsResponse.Code = _ctx.StringValue("DescribeRegions.code"); describeRegionsResponse.Message = _ctx.StringValue("DescribeRegions.message"); describeRegionsResponse.RequestId = _ctx.StringValue("DescribeRegions.requestId"); List <DescribeRegionsResponse.DescribeRegions_ResultItem> describeRegionsResponse_result = new List <DescribeRegionsResponse.DescribeRegions_ResultItem>(); for (int i = 0; i < _ctx.Length("DescribeRegions.Result.Length"); i++) { DescribeRegionsResponse.DescribeRegions_ResultItem resultItem = new DescribeRegionsResponse.DescribeRegions_ResultItem(); resultItem.ConsoleUrl = _ctx.StringValue("DescribeRegions.Result[" + i + "].consoleUrl"); resultItem.Endpoint = _ctx.StringValue("DescribeRegions.Result[" + i + "].endpoint"); resultItem.LocalName = _ctx.StringValue("DescribeRegions.Result[" + i + "].localName"); resultItem.RegionId = _ctx.StringValue("DescribeRegions.Result[" + i + "].regionId"); resultItem.Status = _ctx.StringValue("DescribeRegions.Result[" + i + "].status"); describeRegionsResponse_result.Add(resultItem); } describeRegionsResponse.Result = describeRegionsResponse_result; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); List <DescribeRegionsResponse.DescribeRegions_KVStoreRegion> describeRegionsResponse_regionIds = new List <DescribeRegionsResponse.DescribeRegions_KVStoreRegion>(); for (int i = 0; i < context.Length("DescribeRegions.RegionIds.Length"); i++) { DescribeRegionsResponse.DescribeRegions_KVStoreRegion kVStoreRegion = new DescribeRegionsResponse.DescribeRegions_KVStoreRegion(); kVStoreRegion.RegionId = context.StringValue("DescribeRegions.RegionIds[" + i + "].RegionId"); kVStoreRegion.ZoneIds = context.StringValue("DescribeRegions.RegionIds[" + i + "].ZoneIds"); kVStoreRegion.LocalName = context.StringValue("DescribeRegions.RegionIds[" + i + "].LocalName"); kVStoreRegion.RegionEndpoint = context.StringValue("DescribeRegions.RegionIds[" + i + "].RegionEndpoint"); List <string> kVStoreRegion_zoneIdList = new List <string>(); for (int j = 0; j < context.Length("DescribeRegions.RegionIds[" + i + "].ZoneIdList.Length"); j++) { kVStoreRegion_zoneIdList.Add(context.StringValue("DescribeRegions.RegionIds[" + i + "].ZoneIdList[" + j + "]")); } kVStoreRegion.ZoneIdList = kVStoreRegion_zoneIdList; describeRegionsResponse_regionIds.Add(kVStoreRegion); } describeRegionsResponse.RegionIds = describeRegionsResponse_regionIds; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.Code = context.StringValue("DescribeRegions.Code"); describeRegionsResponse.Message = context.StringValue("DescribeRegions.Message"); List <DescribeRegionsResponse.DescribeRegions_Item> describeRegionsResponse_result = new List <DescribeRegionsResponse.DescribeRegions_Item>(); for (int i = 0; i < context.Length("DescribeRegions.Result.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Item item = new DescribeRegionsResponse.DescribeRegions_Item(); item.RegionId = context.StringValue("DescribeRegions.Result[" + i + "].RegionId"); item.LocalName = context.StringValue("DescribeRegions.Result[" + i + "].LocalName"); item.Endpoint = context.StringValue("DescribeRegions.Result[" + i + "].Endpoint"); item.Status = context.StringValue("DescribeRegions.Result[" + i + "].Status"); item.ConsoleUrl = context.StringValue("DescribeRegions.Result[" + i + "].ConsoleUrl"); describeRegionsResponse_result.Add(item); } describeRegionsResponse.Result = describeRegionsResponse_result; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); DescribeRegionsResponse.DescribeRegions_Regions regions = new DescribeRegionsResponse.DescribeRegions_Regions(); List <DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem> regions_region = new List <DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Region.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem regionItem = new DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem(); regionItem.RegionId = context.StringValue("DescribeRegions.Regions.Region[" + i + "].RegionId"); List <string> regionItem_projectTypes = new List <string>(); for (int j = 0; j < context.Length("DescribeRegions.Regions.Region[" + i + "].ProjectTypes.Length"); j++) { regionItem_projectTypes.Add(context.StringValue("DescribeRegions.Regions.Region[" + i + "].ProjectTypes[" + j + "]")); } regionItem.ProjectTypes = regionItem_projectTypes; regions_region.Add(regionItem); } regions.Region = regions_region; describeRegionsResponse.Regions = regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); List <DescribeRegionsResponse.DescribeRegions_Region> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_Region>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Region(); region.RegionId = context.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); region.LocalName = context.StringValue("DescribeRegions.Regions[" + i + "].LocalName"); region.RegionEndpoint = context.StringValue("DescribeRegions.Regions[" + i + "].RegionEndpoint"); List <DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone> region_zones = new List <DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone>(); for (int j = 0; j < context.Length("DescribeRegions.Regions[" + i + "].Zones.Length"); j++) { DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone zone = new DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone(); zone.Id = context.StringValue("DescribeRegions.Regions[" + i + "].Zones[" + j + "].Id"); region_zones.Add(zone); } region.Zones = region_zones; describeRegionsResponse_regions.Add(region); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeRegionsResponse response = new DescribeRegionsResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth = 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("regionInfo/item", targetDepth)) { var unmarshaller = RegionUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Regions.Add(item); continue; } } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeRegionsResponse response = new DescribeRegionsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RegionsDescription", targetDepth)) { var unmarshaller = new ListUnmarshaller <RegionDescription, RegionDescriptionUnmarshaller>(RegionDescriptionUnmarshaller.Instance); response.RegionsDescription = unmarshaller.Unmarshall(context); continue; } } return(response); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.Success = context.BooleanValue("DescribeRegions.Success"); describeRegionsResponse.ErrorCode = context.IntegerValue("DescribeRegions.ErrorCode"); List <DescribeRegionsResponse.DescribeRegions_ResultItem> describeRegionsResponse_result = new List <DescribeRegionsResponse.DescribeRegions_ResultItem>(); for (int i = 0; i < context.Length("DescribeRegions.Result.Length"); i++) { DescribeRegionsResponse.DescribeRegions_ResultItem resultItem = new DescribeRegionsResponse.DescribeRegions_ResultItem(); resultItem.Id = context.IntegerValue("DescribeRegions.Result[" + i + "].Id"); resultItem.RegionId = context.StringValue("DescribeRegions.Result[" + i + "].RegionId"); resultItem.Title = context.StringValue("DescribeRegions.Result[" + i + "].Title"); resultItem.Online = context.BooleanValue("DescribeRegions.Result[" + i + "].Online"); describeRegionsResponse_result.Add(resultItem); } describeRegionsResponse.Result = describeRegionsResponse_result; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); List <DescribeRegionsResponse.DescribeRegions_DdsRegion> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_DdsRegion>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_DdsRegion ddsRegion = new DescribeRegionsResponse.DescribeRegions_DdsRegion(); ddsRegion.RegionId = context.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); List <DescribeRegionsResponse.DescribeRegions_DdsRegion.DescribeRegions_Zone> ddsRegion_zones = new List <DescribeRegionsResponse.DescribeRegions_DdsRegion.DescribeRegions_Zone>(); for (int j = 0; j < context.Length("DescribeRegions.Regions[" + i + "].Zones.Length"); j++) { DescribeRegionsResponse.DescribeRegions_DdsRegion.DescribeRegions_Zone zone = new DescribeRegionsResponse.DescribeRegions_DdsRegion.DescribeRegions_Zone(); zone.ZoneId = context.StringValue("DescribeRegions.Regions[" + i + "].Zones[" + j + "].ZoneId"); zone.VpcEnabled = context.BooleanValue("DescribeRegions.Regions[" + i + "].Zones[" + j + "].VpcEnabled"); ddsRegion_zones.Add(zone); } ddsRegion.Zones = ddsRegion_zones; describeRegionsResponse_regions.Add(ddsRegion); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; describeRegionsResponse.RequestId = _ctx.StringValue("DescribeRegions.RequestId"); return(describeRegionsResponse); }
public void EcsHttpDebugTest() { Environment.SetEnvironmentVariable("DEBUG", "sdk"); DescribeRegionsRequest request = new DescribeRegionsRequest(); DescribeRegionsResponse response = client.GetAcsResponse(request); Assert.True(null != response.RequestId); Assert.Null(Environment.GetEnvironmentVariable("DEBUG")); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.Code = context.IntegerValue("DescribeRegions.Code"); describeRegionsResponse.Message = context.StringValue("DescribeRegions.Message"); describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); DescribeRegionsResponse.DescribeRegions_Data data = new DescribeRegionsResponse.DescribeRegions_Data(); List <DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region> data_regionList = new List <DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region>(); for (int i = 0; i < context.Length("DescribeRegions.Data.RegionList.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region(); region.RegionId = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].RegionId"); region.RegionName = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].RegionName"); region.RegionUrl = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].RegionUrl"); region.Isdefault = context.BooleanValue("DescribeRegions.Data.RegionList[" + i + "].Isdefault"); List <DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation> region_physicalLocations = new List <DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation>(); for (int j = 0; j < context.Length("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations.Length"); j++) { DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation physicalLocation = new DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation(); physicalLocation.No = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].No"); physicalLocation.ServiceCode = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].ServiceCode"); physicalLocation.Type = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].Type"); physicalLocation.Name = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].Name"); physicalLocation.Status = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].Status"); List <DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation.DescribeRegions_Attribute> physicalLocation_attributes = new List <DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation.DescribeRegions_Attribute>(); for (int k = 0; k < context.Length("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].Attributes.Length"); k++) { DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation.DescribeRegions_Attribute attribute = new DescribeRegionsResponse.DescribeRegions_Data.DescribeRegions_Region.DescribeRegions_PhysicalLocation.DescribeRegions_Attribute(); attribute.Name = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].Attributes[" + k + "].Name"); attribute._Value = context.StringValue("DescribeRegions.Data.RegionList[" + i + "].PhysicalLocations[" + j + "].Attributes[" + k + "].Value"); physicalLocation_attributes.Add(attribute); } physicalLocation.Attributes = physicalLocation_attributes; region_physicalLocations.Add(physicalLocation); } region.PhysicalLocations = region_physicalLocations; data_regionList.Add(region); } data.RegionList = data_regionList; describeRegionsResponse.Data = data; return(describeRegionsResponse); }
public static void DescribeRegions() { Console.WriteLine("Describe Regions"); AmazonEC2Client client = new AmazonEC2Client(); DescribeRegionsResponse response = client.DescribeRegions(); var regions = new List <Region>(); regions = response.Regions; foreach (Region region in regions) { Console.WriteLine(region.RegionName); } }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.Success = context.BooleanValue("DescribeRegions.Success"); List <DescribeRegionsResponse.DescribeRegions_DrdsRegion> describeRegionsResponse_drdsRegions = new List <DescribeRegionsResponse.DescribeRegions_DrdsRegion>(); for (int i = 0; i < context.Length("DescribeRegions.DrdsRegions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_DrdsRegion drdsRegion = new DescribeRegionsResponse.DescribeRegions_DrdsRegion(); drdsRegion.RegionId = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].RegionId"); drdsRegion.RegionName = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].RegionName"); drdsRegion.ZoneId = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].ZoneId"); drdsRegion.ZoneName = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].ZoneName"); List <DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries> drdsRegion_instanceSeriesList = new List <DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries>(); for (int j = 0; j < context.Length("DescribeRegions.DrdsRegions[" + i + "].InstanceSeriesList.Length"); j++) { DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries instanceSeries = new DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries(); instanceSeries.SeriesId = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].InstanceSeriesList[" + j + "].SeriesId"); instanceSeries.SeriesName = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].InstanceSeriesList[" + j + "].SeriesName"); List <DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries.DescribeRegions_Spec> instanceSeries_specList = new List <DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries.DescribeRegions_Spec>(); for (int k = 0; k < context.Length("DescribeRegions.DrdsRegions[" + i + "].InstanceSeriesList[" + j + "].SpecList.Length"); k++) { DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries.DescribeRegions_Spec spec = new DescribeRegionsResponse.DescribeRegions_DrdsRegion.DescribeRegions_InstanceSeries.DescribeRegions_Spec(); spec.SpecId = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].InstanceSeriesList[" + j + "].SpecList[" + k + "].SpecId"); spec.SpecName = context.StringValue("DescribeRegions.DrdsRegions[" + i + "].InstanceSeriesList[" + j + "].SpecList[" + k + "].SpecName"); instanceSeries_specList.Add(spec); } instanceSeries.SpecList = instanceSeries_specList; drdsRegion_instanceSeriesList.Add(instanceSeries); } drdsRegion.InstanceSeriesList = drdsRegion_instanceSeriesList; describeRegionsResponse_drdsRegions.Add(drdsRegion); } describeRegionsResponse.DrdsRegions = describeRegionsResponse_drdsRegions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); List <DescribeRegionsResponse.DescribeRegions_Region> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_Region>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Region(); region.RegionId = context.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); describeRegionsResponse_regions.Add(region); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.Success = context.BooleanValue("DescribeRegions.Success"); describeRegionsResponse.ErrCode = context.StringValue("DescribeRegions.ErrCode"); describeRegionsResponse.ErrMessage = context.StringValue("DescribeRegions.ErrMessage"); describeRegionsResponse.HttpStatusCode = context.IntegerValue("DescribeRegions.HttpStatusCode"); describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); List <string> describeRegionsResponse_regions = new List <string>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { describeRegionsResponse_regions.Add(context.StringValue("DescribeRegions.Regions[" + i + "]")); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonEC2Config config = new AmazonEC2Config(); config.RegionEndpoint = region; ConfigureClient(config); AmazonEC2Client client = new AmazonEC2Client(creds, config); DescribeRegionsResponse resp = new DescribeRegionsResponse(); DescribeRegionsRequest req = new DescribeRegionsRequest { }; resp = client.DescribeRegions(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Regions) { AddObject(obj); } }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.RequestId = context.StringValue("DescribeRegions.RequestId"); List <DescribeRegionsResponse.DescribeRegions_RegionsItem> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_RegionsItem>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_RegionsItem regionsItem = new DescribeRegionsResponse.DescribeRegions_RegionsItem(); regionsItem.Region = context.StringValue("DescribeRegions.Regions[" + i + "].Region"); regionsItem.Status = context.StringValue("DescribeRegions.Regions[" + i + "].Status"); regionsItem.ShowName = context.StringValue("DescribeRegions.Regions[" + i + "].ShowName"); describeRegionsResponse_regions.Add(regionsItem); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = context.HttpResponse; describeRegionsResponse.Request_id = context.StringValue("DescribeRegions.request_id"); describeRegionsResponse.Status = context.StringValue("DescribeRegions.status"); List <DescribeRegionsResponse.DescribeRegions_Error> describeRegionsResponse_errors = new List <DescribeRegionsResponse.DescribeRegions_Error>(); for (int i = 0; i < context.Length("DescribeRegions.Errors.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Error error = new DescribeRegionsResponse.DescribeRegions_Error(); error.Code = context.IntegerValue("DescribeRegions.Errors[" + i + "].code"); error.Message = context.StringValue("DescribeRegions.Errors[" + i + "].message"); describeRegionsResponse_errors.Add(error); } describeRegionsResponse.Errors = describeRegionsResponse_errors; return(describeRegionsResponse); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeRegionsResponse response = new DescribeRegionsResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("regionInfo/item", targetDepth)) { response.Regions.Add(RegionUnmarshaller.GetInstance().Unmarshall(context)); continue; } } } return(response); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext context) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse() { HttpResponse = context.HttpResponse, RequestId = context.StringValue("DescribeRegions.RequestId") }; List <DescribeRegionsResponse.Region> regions = new List <DescribeRegionsResponse.Region>(); for (int i = 0; i < context.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.Region region = new DescribeRegionsResponse.Region() { RegionId = context.StringValue($"DescribeRegions.Regions[{i}].RegionId"), LocalName = context.StringValue($"DescribeRegions.Regions[{i}].LocalName") }; regions.Add(region); } describeRegionsResponse.Regions = regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; describeRegionsResponse.RequestId = _ctx.StringValue("DescribeRegions.RequestId"); DescribeRegionsResponse.DescribeRegions_Regions regions = new DescribeRegionsResponse.DescribeRegions_Regions(); List <DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem> regions_region = new List <DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem>(); for (int i = 0; i < _ctx.Length("DescribeRegions.Regions.Region.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem regionItem = new DescribeRegionsResponse.DescribeRegions_Regions.DescribeRegions_RegionItem(); regionItem.RegionId = _ctx.StringValue("DescribeRegions.Regions.Region[" + i + "].RegionId"); regions_region.Add(regionItem); } regions.Region = regions_region; describeRegionsResponse.Regions = regions; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; describeRegionsResponse.RequestId = _ctx.StringValue("DescribeRegions.RequestId"); List <DescribeRegionsResponse.DescribeRegions_RegionInfo> describeRegionsResponse_result = new List <DescribeRegionsResponse.DescribeRegions_RegionInfo>(); for (int i = 0; i < _ctx.Length("DescribeRegions.Result.Length"); i++) { DescribeRegionsResponse.DescribeRegions_RegionInfo regionInfo = new DescribeRegionsResponse.DescribeRegions_RegionInfo(); regionInfo.RegionId = _ctx.StringValue("DescribeRegions.Result[" + i + "].regionId"); regionInfo.RegionEndpoint = _ctx.StringValue("DescribeRegions.Result[" + i + "].regionEndpoint"); regionInfo.LocalName = _ctx.StringValue("DescribeRegions.Result[" + i + "].localName"); regionInfo.ConsoleEndpoint = _ctx.StringValue("DescribeRegions.Result[" + i + "].consoleEndpoint"); regionInfo.Status = _ctx.StringValue("DescribeRegions.Result[" + i + "].status"); describeRegionsResponse_result.Add(regionInfo); } describeRegionsResponse.Result = describeRegionsResponse_result; return(describeRegionsResponse); }
public static DescribeRegionsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeRegionsResponse describeRegionsResponse = new DescribeRegionsResponse(); describeRegionsResponse.HttpResponse = _ctx.HttpResponse; describeRegionsResponse.RequestId = _ctx.StringValue("DescribeRegions.RequestId"); describeRegionsResponse.Code = _ctx.IntegerValue("DescribeRegions.Code"); describeRegionsResponse.ErrorCode = _ctx.IntegerValue("DescribeRegions.ErrorCode"); describeRegionsResponse.Success = _ctx.BooleanValue("DescribeRegions.Success"); describeRegionsResponse.Message = _ctx.StringValue("DescribeRegions.Message"); List <DescribeRegionsResponse.DescribeRegions_Region> describeRegionsResponse_regions = new List <DescribeRegionsResponse.DescribeRegions_Region>(); for (int i = 0; i < _ctx.Length("DescribeRegions.Regions.Length"); i++) { DescribeRegionsResponse.DescribeRegions_Region region = new DescribeRegionsResponse.DescribeRegions_Region(); region.RegionId = _ctx.StringValue("DescribeRegions.Regions[" + i + "].RegionId"); region.SupportPolarx20 = _ctx.BooleanValue("DescribeRegions.Regions[" + i + "].SupportPolarx20"); List <DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone> region_zones = new List <DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone>(); for (int j = 0; j < _ctx.Length("DescribeRegions.Regions[" + i + "].Zones.Length"); j++) { DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone zone = new DescribeRegionsResponse.DescribeRegions_Region.DescribeRegions_Zone(); zone.ZoneId = _ctx.StringValue("DescribeRegions.Regions[" + i + "].Zones[" + j + "].ZoneId"); zone.VpcEnabled = _ctx.BooleanValue("DescribeRegions.Regions[" + i + "].Zones[" + j + "].VpcEnabled"); region_zones.Add(zone); } region.Zones = region_zones; describeRegionsResponse_regions.Add(region); } describeRegionsResponse.Regions = describeRegionsResponse_regions; return(describeRegionsResponse); }