internal ListStepsResponse ListSteps(ListStepsRequest request)
        {
            var marshaller   = new ListStepsRequestMarshaller();
            var unmarshaller = ListStepsResponseUnmarshaller.Instance;

            return(Invoke <ListStepsRequest, ListStepsResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListSteps operation.
        /// <seealso cref="Amazon.ElasticMapReduce.IAmazonElasticMapReduce"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListSteps 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 <ListStepsResponse> ListStepsAsync(ListStepsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListStepsRequestMarshaller();
            var unmarshaller = ListStepsResponseUnmarshaller.Instance;

            return(Invoke <IRequest, ListStepsRequest, ListStepsResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
Esempio n. 3
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonElasticMapReduceConfig config = new AmazonElasticMapReduceConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonElasticMapReduceClient client = new AmazonElasticMapReduceClient(creds, config);

            ListStepsResponse resp = new ListStepsResponse();

            do
            {
                ListStepsRequest req = new ListStepsRequest
                {
                    Marker = resp.Marker
                };

                resp = client.ListSteps(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Steps)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.Marker));
        }
        internal ListStepsResponse ListSteps(ListStepsRequest request)
        {
            var task = ListStepsAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }