/// <summary>
        /// <para>AddInstanceGroups adds an instance group to a running cluster.</para>
        /// </summary>
        ///
        /// <param name="addInstanceGroupsRequest">Container for the necessary parameters to execute the AddInstanceGroups service method on
        /// AmazonElasticMapReduce.</param>
        ///
        /// <returns>The response from the AddInstanceGroups service method, as returned by AmazonElasticMapReduce.</returns>
        ///
        /// <exception cref="T:Amazon.ElasticMapReduce.Model.InternalServerErrorException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        public Task <AddInstanceGroupsResponse> AddInstanceGroupsAsync(AddInstanceGroupsRequest addInstanceGroupsRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new AddInstanceGroupsRequestMarshaller();
            var unmarshaller = AddInstanceGroupsResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, AddInstanceGroupsRequest, AddInstanceGroupsResponse>(addInstanceGroupsRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
        IAsyncResult invokeAddInstanceGroups(AddInstanceGroupsRequest addInstanceGroupsRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new AddInstanceGroupsRequestMarshaller().Marshall(addInstanceGroupsRequest);
            var         unmarshaller = AddInstanceGroupsResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
        /// <summary>
        /// <para>AddInstanceGroups adds an instance group to a running
        /// cluster.</para>
        /// </summary>
        ///
        /// <param name="addInstanceGroupsRequest">Container for the necessary
        ///           parameters to execute the AddInstanceGroups service method on
        ///           AmazonElasticMapReduce.</param>
        ///
        /// <returns>The response from the AddInstanceGroups service method, as
        ///         returned by AmazonElasticMapReduce.</returns>
        ///
        /// <exception cref="InternalServerErrorException"/>
        public AddInstanceGroupsResponse AddInstanceGroups(AddInstanceGroupsRequest addInstanceGroupsRequest)
        {
            IRequest <AddInstanceGroupsRequest> request  = new AddInstanceGroupsRequestMarshaller().Marshall(addInstanceGroupsRequest);
            AddInstanceGroupsResponse           response = Invoke <AddInstanceGroupsRequest, AddInstanceGroupsResponse> (request, this.signer, AddInstanceGroupsResponseUnmarshaller.GetInstance());

            return(response);
        }