/// <summary> /// Initiates the asynchronous execution of the GetConsoleOutput operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetConsoleOutput 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<GetConsoleOutputResponse> GetConsoleOutputAsync(GetConsoleOutputRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetConsoleOutputRequestMarshaller(); var unmarshaller = GetConsoleOutputResponseUnmarshaller.Instance; return InvokeAsync<GetConsoleOutputRequest,GetConsoleOutputResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void GetConsoleOutputMarshallTest() { var operation = service_model.FindOperation("GetConsoleOutput"); var request = InstantiateClassGenerator.Execute<GetConsoleOutputRequest>(); var marshaller = new GetConsoleOutputRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData()); var response = GetConsoleOutputResponseUnmarshaller.Instance.Unmarshall(context) as GetConsoleOutputResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Gets the console output for the specified instance. /// /// /// <para> /// Instances do not have a physical monitor through which you can view their console /// output. They also lack physical controls that allow you to power up, reboot, or shut /// them down. To allow these actions, we provide them through the Amazon EC2 API and /// command line interface. /// </para> /// /// <para> /// Instance console output is buffered and posted shortly after instance boot, reboot, /// and termination. Amazon EC2 preserves the most recent 64 KB output which is available /// for at least one hour after the most recent post. /// </para> /// /// <para> /// For Linux instances, the instance console output displays the exact console output /// that would normally be displayed on a physical monitor attached to a computer. This /// output is buffered because the instance produces it and then posts it to a store where /// the instance's owner can retrieve it. /// </para> /// /// <para> /// For Windows instances, the instance console output includes output from the EC2Config /// service. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetConsoleOutput service method.</param> /// /// <returns>The response from the GetConsoleOutput service method, as returned by EC2.</returns> public GetConsoleOutputResponse GetConsoleOutput(GetConsoleOutputRequest request) { var marshaller = new GetConsoleOutputRequestMarshaller(); var unmarshaller = GetConsoleOutputResponseUnmarshaller.Instance; return Invoke<GetConsoleOutputRequest,GetConsoleOutputResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the GetConsoleOutput operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetConsoleOutput operation on AmazonEC2Client.</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 EndGetConsoleOutput /// operation.</returns> public IAsyncResult BeginGetConsoleOutput(GetConsoleOutputRequest request, AsyncCallback callback, object state) { var marshaller = new GetConsoleOutputRequestMarshaller(); var unmarshaller = GetConsoleOutputResponseUnmarshaller.Instance; return BeginInvoke<GetConsoleOutputRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeGetConsoleOutput(GetConsoleOutputRequest getConsoleOutputRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new GetConsoleOutputRequestMarshaller().Marshall(getConsoleOutputRequest); var unmarshaller = GetConsoleOutputResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Gets the console output for the specified instance.</para> <para>Instances do not have a physical monitor through which you can view /// their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we /// provide them through the Amazon EC2 API and command line interface.</para> <para>Instance console output is buffered and posted shortly /// after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which is available for at least one hour /// after the most recent post.</para> <para>For Linux/Unix instances, the instance console output displays the exact console output that would /// normally be displayed on a physical monitor attached to a machine. This output is buffered because the instance produces it and then posts /// it to a store where the instance's owner can retrieve it.</para> <para>For Windows instances, the instance console output displays the last /// three system event log errors.</para> /// </summary> /// /// <param name="getConsoleOutputRequest">Container for the necessary parameters to execute the GetConsoleOutput service method on /// AmazonEC2.</param> /// /// <returns>The response from the GetConsoleOutput service method, as returned by AmazonEC2.</returns> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<GetConsoleOutputResponse> GetConsoleOutputAsync(GetConsoleOutputRequest getConsoleOutputRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetConsoleOutputRequestMarshaller(); var unmarshaller = GetConsoleOutputResponseUnmarshaller.GetInstance(); return Invoke<IRequest, GetConsoleOutputRequest, GetConsoleOutputResponse>(getConsoleOutputRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the GetConsoleOutput operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.GetConsoleOutput"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetConsoleOutput 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 async Task<GetConsoleOutputResponse> GetConsoleOutputAsync(GetConsoleOutputRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetConsoleOutputRequestMarshaller(); var unmarshaller = GetConsoleOutputResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, GetConsoleOutputRequest, GetConsoleOutputResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }