public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticMapReduce.Model.DescribeJobFlowsRequest(); if (cmdletContext.CreatedAfter != null) { request.CreatedAfter = cmdletContext.CreatedAfter.Value; } if (cmdletContext.CreatedBefore != null) { request.CreatedBefore = cmdletContext.CreatedBefore.Value; } if (cmdletContext.JobFlowId != null) { request.JobFlowIds = cmdletContext.JobFlowId; } if (cmdletContext.JobFlowState != null) { request.JobFlowStates = cmdletContext.JobFlowState; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
protected override void ProcessRecord() { AmazonElasticMapReduce client = base.GetClient(); Amazon.ElasticMapReduce.Model.DescribeJobFlowsRequest request = new Amazon.ElasticMapReduce.Model.DescribeJobFlowsRequest(); request.CreatedAfter = this._CreatedAfter; request.CreatedBefore = this._CreatedBefore; if (string.IsNullOrEmpty(this._JobFlowIds)) { request.JobFlowIds.Add(this._JobFlowIds); } if (string.IsNullOrEmpty(this._JobFlowStates)) { request.JobFlowStates.Add(this._JobFlowStates); } Amazon.ElasticMapReduce.Model.DescribeJobFlowsResponse response = client.DescribeJobFlows(request); base.WriteObject(response.DescribeJobFlowsResult, true); }
/// <summary> /// Initiates the asynchronous execution of the DescribeJobFlows operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows 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<DescribeJobFlowsResponse> DescribeJobFlowsAsync(DescribeJobFlowsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeJobFlowsRequestMarshaller(); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.Instance; return InvokeAsync<DescribeJobFlowsRequest,DescribeJobFlowsResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// This API is deprecated and will eventually be removed. We recommend you use <a>ListClusters</a>, /// <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> /// instead. /// /// /// <para> /// DescribeJobFlows returns a list of job flows that match all of the supplied parameters. /// The parameters can include a list of job flow IDs, job flow states, and restrictions /// on job flow creation date and time. /// </para> /// /// <para> /// Regardless of supplied parameters, only job flows created within the last two months /// are returned. /// </para> /// /// <para> /// If no parameters are supplied, then job flows matching either of the following criteria /// are returned: /// </para> /// <ul> <li>Job flows created and completed in the last two weeks</li> <li> Job flows /// created within the last two months that are in one of the following states: <code>RUNNING</code>, /// <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> </li> </ul> /// /// <para> /// Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows service method.</param> /// /// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="Amazon.ElasticMapReduce.Model.InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> public DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest request) { var marshaller = new DescribeJobFlowsRequestMarshaller(); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.Instance; return Invoke<DescribeJobFlowsRequest,DescribeJobFlowsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// This API is deprecated and will eventually be removed. We recommend you use <a>ListClusters</a>, /// <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> /// instead. /// /// /// <para> /// DescribeJobFlows returns a list of job flows that match all of the supplied parameters. /// The parameters can include a list of job flow IDs, job flow states, and restrictions /// on job flow creation date and time. /// </para> /// /// <para> /// Regardless of supplied parameters, only job flows created within the last two months /// are returned. /// </para> /// /// <para> /// If no parameters are supplied, then job flows matching either of the following criteria /// are returned: /// </para> /// <ul> <li>Job flows created and completed in the last two weeks</li> /// <li> Job flows created within the last two months that are in one of the following /// states: <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, /// <code>STARTING</code> </li> </ul> /// <para> /// Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows service method.</param> /// /// <returns>The response from the DescribeJobFlows service method, as returned by ElasticMapReduce.</returns> /// <exception cref="InternalServerErrorException"> /// Indicates that an error occurred while processing the request and that the request /// was not completed. /// </exception> public DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest request) { var task = DescribeJobFlowsAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the DescribeJobFlows operation. /// <seealso cref="Amazon.ElasticMapReduce.IAmazonElasticMapReduce.DescribeJobFlows"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows 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<DescribeJobFlowsResponse> DescribeJobFlowsAsync(DescribeJobFlowsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeJobFlowsRequestMarshaller(); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeJobFlowsRequest, DescribeJobFlowsResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para> DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow /// IDs, job flow states, and restrictions on job flow creation date and time.</para> <para> Regardless of supplied parameters, only job flows /// created within the last two months are returned.</para> <para> If no parameters are supplied, then job flows matching either of the /// following criteria are returned:</para> /// <ul> /// <li>Job flows created and completed in the last two weeks</li> /// <li> Job flows created within the last two months that are in one of the following states: <c>RUNNING</c> , /// <c>WAITING</c> , /// <c>SHUTTING_DOWN</c> , /// /// <c>STARTING</c> </li> /// /// </ul> /// <para> Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeJobFlows service method on /// AmazonElasticMapReduce.</param> /// /// <returns>The response from the DescribeJobFlows service method, as returned by AmazonElasticMapReduce.</returns> /// /// <exception cref="T:Amazon.ElasticMapReduce.Model.InternalServerErrorException" /> public DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest request) { var task = DescribeJobFlowsAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.ElasticMapReduce.Model.DescribeJobFlowsResponse CallAWSServiceOperation(IAmazonElasticMapReduce client, Amazon.ElasticMapReduce.Model.DescribeJobFlowsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Elastic MapReduce", "DescribeJobFlows"); try { #if DESKTOP return(client.DescribeJobFlows(request)); #elif CORECLR return(client.DescribeJobFlowsAsync(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 IAsyncResult BeginDescribeJobFlows(DescribeJobFlowsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeJobFlowsRequestMarshaller(); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.Instance; return BeginInvoke<DescribeJobFlowsRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDescribeJobFlows(DescribeJobFlowsRequest describeJobFlowsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeJobFlowsRequestMarshaller().Marshall(describeJobFlowsRequest); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DescribeJobFlows operation. /// <seealso cref="Amazon.ElasticMapReduce.IAmazonElasticMapReduce.DescribeJobFlows"/> /// </summary> /// /// <param name="describeJobFlowsRequest">Container for the necessary parameters to execute the DescribeJobFlows 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 EndDescribeJobFlows /// operation.</returns> public IAsyncResult BeginDescribeJobFlows(DescribeJobFlowsRequest describeJobFlowsRequest, AsyncCallback callback, object state) { return invokeDescribeJobFlows(describeJobFlowsRequest, callback, state, false); }
/// <summary> /// <para> DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow /// IDs, job flow states, and restrictions on job flow creation date and time.</para> <para> Regardless of supplied parameters, only job flows /// created within the last two months are returned.</para> <para> If no parameters are supplied, then job flows matching either of the /// following criteria are returned:</para> /// <ul> /// <li>Job flows created and completed in the last two weeks</li> /// <li> Job flows created within the last two months that are in one of the following states: <c>RUNNING</c> , /// <c>WAITING</c> , /// <c>SHUTTING_DOWN</c> , /// /// <c>STARTING</c> </li> /// /// </ul> /// <para> Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions. </para> /// </summary> /// /// <param name="describeJobFlowsRequest">Container for the necessary parameters to execute the DescribeJobFlows service method on /// AmazonElasticMapReduce.</param> /// /// <returns>The response from the DescribeJobFlows service method, as returned by AmazonElasticMapReduce.</returns> /// /// <exception cref="InternalServerErrorException"/> public DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest describeJobFlowsRequest) { IAsyncResult asyncResult = invokeDescribeJobFlows(describeJobFlowsRequest, null, null, true); return EndDescribeJobFlows(asyncResult); }
/// <summary> /// <para> DescribeJobFlows returns a list of job flows that match all of /// the supplied parameters. The parameters can include a list of job flow /// IDs, job flow states, and restrictions on job flow creation date and /// time.</para> <para> Regardless of supplied parameters, only job flows /// created within the last two months are returned.</para> <para> If no /// parameters are supplied, then job flows matching either of the /// following criteria are returned:</para> /// <ul> /// <li>Job flows created and completed in the last two weeks</li> /// <li> Job flows created within the last two months that are in one of /// the following states: <c>RUNNING</c> , /// /// <c>WAITING</c> , /// /// <c>SHUTTING_DOWN</c> , /// /// <c>STARTING</c> </li> /// /// </ul> /// <para> Amazon Elastic MapReduce can return a maximum of 512 job flow /// descriptions. </para> /// </summary> /// /// <param name="describeJobFlowsRequest">Container for the necessary /// parameters to execute the DescribeJobFlows service method on /// AmazonElasticMapReduce.</param> /// /// <returns>The response from the DescribeJobFlows service method, as /// returned by AmazonElasticMapReduce.</returns> /// /// <exception cref="InternalServerErrorException"/> public DescribeJobFlowsResponse DescribeJobFlows(DescribeJobFlowsRequest describeJobFlowsRequest) { IRequest<DescribeJobFlowsRequest> request = new DescribeJobFlowsRequestMarshaller().Marshall(describeJobFlowsRequest); DescribeJobFlowsResponse response = Invoke<DescribeJobFlowsRequest, DescribeJobFlowsResponse> (request, this.signer, DescribeJobFlowsResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// <para> DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow /// IDs, job flow states, and restrictions on job flow creation date and time.</para> <para> Regardless of supplied parameters, only job flows /// created within the last two months are returned.</para> <para> If no parameters are supplied, then job flows matching either of the /// following criteria are returned:</para> /// <ul> /// <li>Job flows created and completed in the last two weeks</li> /// <li> Job flows created within the last two months that are in one of the following states: <c>RUNNING</c> , /// <c>WAITING</c> , /// <c>SHUTTING_DOWN</c> , /// /// <c>STARTING</c> </li> /// /// </ul> /// <para> Amazon Elastic MapReduce can return a maximum of 512 job flow descriptions. </para> /// </summary> /// /// <param name="describeJobFlowsRequest">Container for the necessary parameters to execute the DescribeJobFlows service method on /// AmazonElasticMapReduce.</param> /// /// <returns>The response from the DescribeJobFlows 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 async Task<DescribeJobFlowsResponse> DescribeJobFlowsAsync(DescribeJobFlowsRequest describeJobFlowsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeJobFlowsRequestMarshaller(); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeJobFlowsRequest, DescribeJobFlowsResponse>(describeJobFlowsRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
IAsyncResult invokeDescribeJobFlows(DescribeJobFlowsRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DescribeJobFlowsRequestMarshaller(); var unmarshaller = DescribeJobFlowsResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }