/// <summary> /// Initiates the asynchronous execution of the GetPasswordData operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetPasswordData 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<GetPasswordDataResponse> GetPasswordDataAsync(GetPasswordDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetPasswordDataRequestMarshaller(); var unmarshaller = GetPasswordDataResponseUnmarshaller.Instance; return InvokeAsync<GetPasswordDataRequest,GetPasswordDataResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void GetPasswordDataMarshallTest() { var operation = service_model.FindOperation("GetPasswordData"); var request = InstantiateClassGenerator.Execute<GetPasswordDataRequest>(); var marshaller = new GetPasswordDataRequestMarshaller(); 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 = GetPasswordDataResponseUnmarshaller.Instance.Unmarshall(context) as GetPasswordDataResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Retrieves the encrypted administrator password for an instance running Windows. /// /// /// <para> /// The Windows password is generated at boot if the <code>EC2Config</code> service plugin, /// <code>Ec2SetPassword</code>, is enabled. This usually only happens the first time /// an AMI is launched, and then <code>Ec2SetPassword</code> is automatically disabled. /// The password is not generated for rebundled AMIs unless <code>Ec2SetPassword</code> /// is enabled before bundling. /// </para> /// /// <para> /// The password is encrypted using the key pair that you specified when you launched /// the instance. You must provide the corresponding key pair file. /// </para> /// /// <para> /// Password generation and encryption takes a few moments. We recommend that you wait /// up to 15 minutes after launching an instance before trying to retrieve the generated /// password. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetPasswordData service method.</param> /// /// <returns>The response from the GetPasswordData service method, as returned by EC2.</returns> public GetPasswordDataResponse GetPasswordData(GetPasswordDataRequest request) { var marshaller = new GetPasswordDataRequestMarshaller(); var unmarshaller = GetPasswordDataResponseUnmarshaller.Instance; return Invoke<GetPasswordDataRequest,GetPasswordDataResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the GetPasswordData operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetPasswordData 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 EndGetPasswordData /// operation.</returns> public IAsyncResult BeginGetPasswordData(GetPasswordDataRequest request, AsyncCallback callback, object state) { var marshaller = new GetPasswordDataRequestMarshaller(); var unmarshaller = GetPasswordDataResponseUnmarshaller.Instance; return BeginInvoke<GetPasswordDataRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeGetPasswordData(GetPasswordDataRequest getPasswordDataRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new GetPasswordDataRequestMarshaller().Marshall(getPasswordDataRequest); var unmarshaller = GetPasswordDataResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Retrieves the encrypted administrator password for an instance running Windows.</para> <para>The Windows password is only generated /// the first time an AMI is launched. It is not generated for rebundled AMIs or after the password is changed on an instance.</para> <para>The /// password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair /// file.</para> <para>Password generation and encryption takes a few moments. We recommend that you wait up to 15 minutes after launching an /// instance before trying to retrieve the generated password.</para> /// </summary> /// /// <param name="getPasswordDataRequest">Container for the necessary parameters to execute the GetPasswordData service method on /// AmazonEC2.</param> /// /// <returns>The response from the GetPasswordData 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<GetPasswordDataResponse> GetPasswordDataAsync(GetPasswordDataRequest getPasswordDataRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetPasswordDataRequestMarshaller(); var unmarshaller = GetPasswordDataResponseUnmarshaller.GetInstance(); return Invoke<IRequest, GetPasswordDataRequest, GetPasswordDataResponse>(getPasswordDataRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the GetPasswordData operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.GetPasswordData"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetPasswordData 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<GetPasswordDataResponse> GetPasswordDataAsync(GetPasswordDataRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetPasswordDataRequestMarshaller(); var unmarshaller = GetPasswordDataResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, GetPasswordDataRequest, GetPasswordDataResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }