public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElasticBeanstalk.Model.RequestEnvironmentInfoRequest(); if (cmdletContext.EnvironmentId != null) { request.EnvironmentId = cmdletContext.EnvironmentId; } if (cmdletContext.EnvironmentName != null) { request.EnvironmentName = cmdletContext.EnvironmentName; } if (cmdletContext.InfoType != null) { request.InfoType = cmdletContext.InfoType; } 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); }
/// <summary> /// Initiates the asynchronous execution of the RequestEnvironmentInfo operation. /// <seealso cref="Amazon.ElasticBeanstalk.AmazonElasticBeanstalk.RequestEnvironmentInfo"/> /// </summary> /// /// <param name="requestEnvironmentInfoRequest">Container for the necessary parameters to execute the RequestEnvironmentInfo operation on /// AmazonElasticBeanstalk.</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> public IAsyncResult BeginRequestEnvironmentInfo(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest, AsyncCallback callback, object state) { return invokeRequestEnvironmentInfo(requestEnvironmentInfoRequest, callback, state, false); }
IAsyncResult invokeRequestEnvironmentInfo(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new RequestEnvironmentInfoRequestMarshaller().Marshall(requestEnvironmentInfoRequest); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para> Initiates a request to compile the specified type of information of the deployed environment. </para> <para> Setting the /// <c>InfoType</c> to <c>tail</c> compiles the last lines from the application server log files of every Amazon EC2 instance in your /// environment. Use RetrieveEnvironmentInfo to access the compiled information. </para> <para>Related Topics</para> /// <ul> /// <li> RetrieveEnvironmentInfo </li> /// /// </ul> /// </summary> /// /// <param name="requestEnvironmentInfoRequest">Container for the necessary parameters to execute the RequestEnvironmentInfo service method on /// AmazonElasticBeanstalk.</param> /// public RequestEnvironmentInfoResponse RequestEnvironmentInfo(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest) { IAsyncResult asyncResult = invokeRequestEnvironmentInfo(requestEnvironmentInfoRequest, null, null, true); return EndRequestEnvironmentInfo(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the RequestEnvironmentInfo operation. /// <seealso cref="Amazon.ElasticBeanstalk.IAmazonElasticBeanstalk"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RequestEnvironmentInfo 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<RequestEnvironmentInfoResponse> RequestEnvironmentInfoAsync(RequestEnvironmentInfoRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RequestEnvironmentInfoRequestMarshaller(); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.Instance; return InvokeAsync<RequestEnvironmentInfoRequest,RequestEnvironmentInfoResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal RequestEnvironmentInfoResponse RequestEnvironmentInfo(RequestEnvironmentInfoRequest request) { var marshaller = new RequestEnvironmentInfoRequestMarshaller(); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.Instance; return Invoke<RequestEnvironmentInfoRequest,RequestEnvironmentInfoResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para> Initiates a request to compile the specified type of information of the deployed environment. </para> <para> Setting the /// <c>InfoType</c> to <c>tail</c> compiles the last lines from the application server log files of every Amazon EC2 instance in your /// environment. Use RetrieveEnvironmentInfo to access the compiled information. </para> <para>Related Topics</para> /// <ul> /// <li> RetrieveEnvironmentInfo </li> /// /// </ul> /// </summary> /// /// <param name="requestEnvironmentInfoRequest">Container for the necessary parameters to execute the RequestEnvironmentInfo service method on /// AmazonElasticBeanstalk.</param> /// public RequestEnvironmentInfoResponse RequestEnvironmentInfo(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest) { IRequest<RequestEnvironmentInfoRequest> request = new RequestEnvironmentInfoRequestMarshaller().Marshall(requestEnvironmentInfoRequest); RequestEnvironmentInfoResponse response = Invoke<RequestEnvironmentInfoRequest, RequestEnvironmentInfoResponse> (request, this.signer, RequestEnvironmentInfoResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// <para> Initiates a request to compile the specified type of information of the deployed environment. </para> <para> Setting the /// <c>InfoType</c> to <c>tail</c> compiles the last lines from the application server log files of every Amazon EC2 instance in your /// environment. Use RetrieveEnvironmentInfo to access the compiled information. </para> <para>Related Topics</para> /// <ul> /// <li> RetrieveEnvironmentInfo </li> /// /// </ul> /// </summary> /// /// <param name="requestEnvironmentInfoRequest">Container for the necessary parameters to execute the RequestEnvironmentInfo service method on /// AmazonElasticBeanstalk.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<RequestEnvironmentInfoResponse> RequestEnvironmentInfoAsync(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RequestEnvironmentInfoRequestMarshaller(); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.GetInstance(); return Invoke<IRequest, RequestEnvironmentInfoRequest, RequestEnvironmentInfoResponse>(requestEnvironmentInfoRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal RequestEnvironmentInfoResponse RequestEnvironmentInfo(RequestEnvironmentInfoRequest request) { var task = RequestEnvironmentInfoAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the RequestEnvironmentInfo operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RequestEnvironmentInfo operation on AmazonElasticBeanstalkClient.</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 EndRequestEnvironmentInfo /// operation.</returns> public IAsyncResult BeginRequestEnvironmentInfo(RequestEnvironmentInfoRequest request, AsyncCallback callback, object state) { var marshaller = new RequestEnvironmentInfoRequestMarshaller(); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.Instance; return BeginInvoke<RequestEnvironmentInfoRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeRequestEnvironmentInfo(RequestEnvironmentInfoRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new RequestEnvironmentInfoRequestMarshaller(); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
private Amazon.ElasticBeanstalk.Model.RequestEnvironmentInfoResponse CallAWSServiceOperation(IAmazonElasticBeanstalk client, Amazon.ElasticBeanstalk.Model.RequestEnvironmentInfoRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Elastic Beanstalk", "RequestEnvironmentInfo"); try { #if DESKTOP return(client.RequestEnvironmentInfo(request)); #elif CORECLR return(client.RequestEnvironmentInfoAsync(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; } }
/// <summary> /// <para> Initiates a request to compile the specified type of information of the deployed environment. </para> <para> Setting the /// <c>InfoType</c> to <c>tail</c> compiles the last lines from the application server log files of every Amazon EC2 instance in your /// environment. Use RetrieveEnvironmentInfo to access the compiled information. </para> <para>Related Topics</para> /// <ul> /// <li> RetrieveEnvironmentInfo </li> /// /// </ul> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RequestEnvironmentInfo service method on /// AmazonElasticBeanstalk.</param> public RequestEnvironmentInfoResponse RequestEnvironmentInfo(RequestEnvironmentInfoRequest request) { var task = RequestEnvironmentInfoAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para> Initiates a request to compile the specified type of information of the deployed environment. </para> <para> Setting the /// <c>InfoType</c> to <c>tail</c> compiles the last lines from the application server log files of every Amazon EC2 instance in your /// environment. Use RetrieveEnvironmentInfo to access the compiled information. </para> <para>Related Topics</para> /// <ul> /// <li> RetrieveEnvironmentInfo </li> /// /// </ul> /// </summary> /// /// <param name="requestEnvironmentInfoRequest">Container for the necessary parameters to execute the RequestEnvironmentInfo service method on /// AmazonElasticBeanstalk.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<RequestEnvironmentInfoResponse> RequestEnvironmentInfoAsync(RequestEnvironmentInfoRequest requestEnvironmentInfoRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RequestEnvironmentInfoRequestMarshaller(); var unmarshaller = RequestEnvironmentInfoResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, RequestEnvironmentInfoRequest, RequestEnvironmentInfoResponse>(requestEnvironmentInfoRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }