Container for the parameters to the ListInstanceGroups operation.

Provides all available details about the instance groups in a cluster.

Inheritance: AmazonElasticMapReduceRequest
        /// <summary>
        /// Provides all available details about the instance groups in a cluster.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups service method.</param>
        /// 
        /// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns>
        /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerException">
        /// This exception occurs when there is an internal failure in the EMR service.
        /// </exception>
        /// <exception cref="Amazon.ElasticMapReduce.Model.InvalidRequestException">
        /// This exception occurs when there is something wrong with user input.
        /// </exception>
        public ListInstanceGroupsResponse ListInstanceGroups(ListInstanceGroupsRequest request)
        {
            var marshaller = new ListInstanceGroupsRequestMarshaller();
            var unmarshaller = ListInstanceGroupsResponseUnmarshaller.Instance;

            return Invoke<ListInstanceGroupsRequest,ListInstanceGroupsResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListInstanceGroups operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<ListInstanceGroupsResponse> ListInstanceGroupsAsync(ListInstanceGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListInstanceGroupsRequestMarshaller();
            var unmarshaller = ListInstanceGroupsResponseUnmarshaller.Instance;

            return InvokeAsync<ListInstanceGroupsRequest,ListInstanceGroupsResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListInstanceGroups operation.
        /// <seealso cref="Amazon.ElasticMapReduce.IAmazonElasticMapReduce.ListInstanceGroups"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
		public Task<ListInstanceGroupsResponse> ListInstanceGroupsAsync(ListInstanceGroupsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListInstanceGroupsRequestMarshaller();
            var unmarshaller = ListInstanceGroupsResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, ListInstanceGroupsRequest, ListInstanceGroupsResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
 /// <summary>
 /// Provides all available details about the instance groups in a cluster.
 /// </summary>
 /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups service method.</param>
 /// 
 /// <returns>The response from the ListInstanceGroups service method, as returned by ElasticMapReduce.</returns>
 /// <exception cref="InternalServerException">
 /// This exception occurs when there is an internal failure in the EMR service.
 /// </exception>
 /// <exception cref="InvalidRequestException">
 /// This exception occurs when there is something wrong with user input.
 /// </exception>
 public ListInstanceGroupsResponse ListInstanceGroups(ListInstanceGroupsRequest request)
 {
     var task = ListInstanceGroupsAsync(request);
     try
     {
         return task.Result;
     }
     catch(AggregateException e)
     {
         ExceptionDispatchInfo.Capture(e.InnerException).Throw();
         return null;
     }
 }
 internal ListInstanceGroupsPaginator(IAmazonElasticMapReduce client, ListInstanceGroupsRequest request)
 {
     this._client  = client;
     this._request = request;
 }
        /// <summary>
        /// <para>Provides all available details about the instance groups in a cluster.</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups service method on
        /// AmazonElasticMapReduce.</param>
        /// 
        /// <returns>The response from the ListInstanceGroups service method, as returned by AmazonElasticMapReduce.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticMapReduce.Model.InternalServerException" />
        /// <exception cref="T:Amazon.ElasticMapReduce.Model.InvalidRequestException" />
		public ListInstanceGroupsResponse ListInstanceGroups(ListInstanceGroupsRequest request)
        {
            var task = ListInstanceGroupsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
 IAsyncResult invokeListInstanceGroups(ListInstanceGroupsRequest listInstanceGroupsRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new ListInstanceGroupsRequestMarshaller().Marshall(listInstanceGroupsRequest);
     var unmarshaller = ListInstanceGroupsResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the ListInstanceGroups operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListInstanceGroups operation on AmazonElasticMapReduceClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListInstanceGroups
        ///         operation.</returns>
        public IAsyncResult BeginListInstanceGroups(ListInstanceGroupsRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListInstanceGroupsRequestMarshaller();
            var unmarshaller = ListInstanceGroupsResponseUnmarshaller.Instance;

            return BeginInvoke<ListInstanceGroupsRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// <para>Provides all available details about the instance groups in a cluster.</para>
 /// </summary>
 /// 
 /// <param name="listInstanceGroupsRequest">Container for the necessary parameters to execute the ListInstanceGroups service method on
 ///          AmazonElasticMapReduce.</param>
 /// 
 /// <returns>The response from the ListInstanceGroups service method, as returned by AmazonElasticMapReduce.</returns>
 /// 
 /// <exception cref="InternalServerException"/>
 /// <exception cref="InvalidRequestException"/>
 public ListInstanceGroupsResponse ListInstanceGroups(ListInstanceGroupsRequest listInstanceGroupsRequest)
 {
     IAsyncResult asyncResult = invokeListInstanceGroups(listInstanceGroupsRequest, null, null, true);
     return EndListInstanceGroups(asyncResult);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the ListInstanceGroups operation.
 /// <seealso cref="Amazon.ElasticMapReduce.IAmazonElasticMapReduce.ListInstanceGroups"/>
 /// </summary>
 /// 
 /// <param name="listInstanceGroupsRequest">Container for the necessary parameters to execute the ListInstanceGroups operation on
 ///          AmazonElasticMapReduce.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// 
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking
 ///         EndListInstanceGroups operation.</returns>
 public IAsyncResult BeginListInstanceGroups(ListInstanceGroupsRequest listInstanceGroupsRequest, AsyncCallback callback, object state)
 {
     return invokeListInstanceGroups(listInstanceGroupsRequest, callback, state, false);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Paginator for ListInstanceGroups operation
 ///</summary>
 public IListInstanceGroupsPaginator ListInstanceGroups(ListInstanceGroupsRequest request)
 {
     return(new ListInstanceGroupsPaginator(this.client, request));
 }
 private Amazon.ElasticMapReduce.Model.ListInstanceGroupsResponse CallAWSServiceOperation(IAmazonElasticMapReduce client, Amazon.ElasticMapReduce.Model.ListInstanceGroupsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic MapReduce", "ListInstanceGroups");
     try
     {
         #if DESKTOP
         return(client.ListInstanceGroups(request));
         #elif CORECLR
         return(client.ListInstanceGroupsAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;

            #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute
            var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent;
            #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute

            // create request and set iteration invariants
            var request = new Amazon.ElasticMapReduce.Model.ListInstanceGroupsRequest();

            if (cmdletContext.ClusterId != null)
            {
                request.ClusterId = cmdletContext.ClusterId;
            }

            // Initialize loop variant and commence piping
            var _nextToken             = cmdletContext.Marker;
            var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.Marker));

            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);
            do
            {
                request.Marker = _nextToken;

                CmdletOutput output;

                try
                {
                    var response = CallAWSServiceOperation(client, request);

                    object pipelineOutput = null;
                    if (!useParameterSelect)
                    {
                        pipelineOutput = cmdletContext.Select(response, this);
                    }
                    output = new CmdletOutput
                    {
                        PipelineOutput  = pipelineOutput,
                        ServiceResponse = response
                    };

                    _nextToken = response.Marker;
                }
                catch (Exception e)
                {
                    output = new CmdletOutput {
                        ErrorResponse = e
                    };
                }

                ProcessOutput(output);
            } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken));

            if (useParameterSelect)
            {
                WriteObject(cmdletContext.Select(null, this));
            }


            return(null);
        }
        /// <summary>
        /// <para>Provides all available details about the instance groups in a cluster.</para>
        /// </summary>
        /// 
        /// <param name="listInstanceGroupsRequest">Container for the necessary parameters to execute the ListInstanceGroups service method on
        /// AmazonElasticMapReduce.</param>
        /// 
        /// <returns>The response from the ListInstanceGroups service method, as returned by AmazonElasticMapReduce.</returns>
        /// 
        /// <exception cref="T:Amazon.ElasticMapReduce.Model.InternalServerException" />
        /// <exception cref="T:Amazon.ElasticMapReduce.Model.InvalidRequestException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<ListInstanceGroupsResponse> ListInstanceGroupsAsync(ListInstanceGroupsRequest listInstanceGroupsRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListInstanceGroupsRequestMarshaller();
            var unmarshaller = ListInstanceGroupsResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, ListInstanceGroupsRequest, ListInstanceGroupsResponse>(listInstanceGroupsRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        IAsyncResult invokeListInstanceGroups(ListInstanceGroupsRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new ListInstanceGroupsRequestMarshaller();
            var unmarshaller = ListInstanceGroupsResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }