Exemplo n.º 1
0
        /**
         * Convert DescribeScalingActivitiesRequest to name value pairs
         */
        private static IDictionary <string, string> ConvertDescribeScalingActivities(DescribeScalingActivitiesRequest request)
        {
            IDictionary <string, string> parameters = new Dictionary <string, string>();

            parameters["Action"] = "DescribeScalingActivities";
            List <string> describeScalingActivitiesRequestActivityIdsList      = request.ActivityIds;
            int           describeScalingActivitiesRequestActivityIdsListIndex = 1;

            foreach (string describeScalingActivitiesRequestActivityIds in describeScalingActivitiesRequestActivityIdsList)
            {
                parameters[String.Concat("ActivityIds", ".member.", describeScalingActivitiesRequestActivityIdsListIndex)] = describeScalingActivitiesRequestActivityIds;
                describeScalingActivitiesRequestActivityIdsListIndex++;
            }
            if (request.IsSetAutoScalingGroupName())
            {
                parameters["AutoScalingGroupName"] = request.AutoScalingGroupName;
            }
            if (request.IsSetMaxRecords())
            {
                parameters["MaxRecords"] = request.MaxRecords.ToString();
            }
            if (request.IsSetNextToken())
            {
                parameters["NextToken"] = request.NextToken;
            }

            return(parameters);
        }
Exemplo n.º 2
0
        private static IDictionary <string, string> ConvertDescribeScalingActivities(DescribeScalingActivitiesRequest request)
        {
            IDictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Action"] = "DescribeScalingActivities";
            List <string> activityIds = request.ActivityIds;
            int           num         = 1;

            foreach (string str in activityIds)
            {
                dictionary["ActivityIds" + ".member." + num] = str;
                num++;
            }
            if (request.IsSetAutoScalingGroupName())
            {
                dictionary["AutoScalingGroupName"] = request.AutoScalingGroupName;
            }
            if (request.IsSetMaxRecords())
            {
                dictionary["MaxRecords"] = request.MaxRecords.ToString();
            }
            if (request.IsSetNextToken())
            {
                dictionary["NextToken"] = request.NextToken;
            }
            return(dictionary);
        }