private static IDictionary <string, string> ConvertUpdateAutoScalingGroup(UpdateAutoScalingGroupRequest request) { IDictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Action"] = "UpdateAutoScalingGroup"; if (request.IsSetAutoScalingGroupName()) { dictionary["AutoScalingGroupName"] = request.AutoScalingGroupName; } if (request.IsSetLaunchConfigurationName()) { dictionary["LaunchConfigurationName"] = request.LaunchConfigurationName; } if (request.IsSetMinSize()) { dictionary["MinSize"] = request.MinSize.ToString(); } if (request.IsSetMaxSize()) { dictionary["MaxSize"] = request.MaxSize.ToString(); } if (request.IsSetCooldown()) { dictionary["Cooldown"] = request.Cooldown.ToString(); } List <string> availabilityZones = request.AvailabilityZones; int num = 1; foreach (string str in availabilityZones) { dictionary["AvailabilityZones" + ".member." + num] = str; num++; } return(dictionary); }
/** * Convert UpdateAutoScalingGroupRequest to name value pairs */ private static IDictionary <string, string> ConvertUpdateAutoScalingGroup(UpdateAutoScalingGroupRequest request) { IDictionary <string, string> parameters = new Dictionary <string, string>(); parameters["Action"] = "UpdateAutoScalingGroup"; if (request.IsSetAutoScalingGroupName()) { parameters["AutoScalingGroupName"] = request.AutoScalingGroupName; } if (request.IsSetLaunchConfigurationName()) { parameters["LaunchConfigurationName"] = request.LaunchConfigurationName; } if (request.IsSetMinSize()) { parameters["MinSize"] = request.MinSize.ToString(); } if (request.IsSetMaxSize()) { parameters["MaxSize"] = request.MaxSize.ToString(); } if (request.IsSetCooldown()) { parameters["Cooldown"] = request.Cooldown.ToString(); } List <string> updateAutoScalingGroupRequestAvailabilityZonesList = request.AvailabilityZones; int updateAutoScalingGroupRequestAvailabilityZonesListIndex = 1; foreach (string updateAutoScalingGroupRequestAvailabilityZones in updateAutoScalingGroupRequestAvailabilityZonesList) { parameters[String.Concat("AvailabilityZones", ".member.", updateAutoScalingGroupRequestAvailabilityZonesListIndex)] = updateAutoScalingGroupRequestAvailabilityZones; updateAutoScalingGroupRequestAvailabilityZonesListIndex++; } return(parameters); }