/// <summary> /// Initiates the asynchronous execution of the DeactivateMFADevice operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeactivateMFADevice 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<DeactivateMFADeviceResponse> DeactivateMFADeviceAsync(DeactivateMFADeviceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.Instance; return InvokeAsync<DeactivateMFADeviceRequest,DeactivateMFADeviceResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeDeactivateMFADevice(DeactivateMFADeviceRequest deactivateMFADeviceRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeactivateMFADeviceRequestMarshaller().Marshall(deactivateMFADeviceRequest); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
internal DeactivateMFADeviceResponse DeactivateMFADevice(DeactivateMFADeviceRequest request) { var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.Instance; return Invoke<DeactivateMFADeviceRequest,DeactivateMFADeviceResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeactivateMFADevice operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeactivateMFADevice operation on AmazonIdentityManagementServiceClient.</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 EndDeactivateMFADevice /// operation.</returns> public IAsyncResult BeginDeactivateMFADevice(DeactivateMFADeviceRequest request, AsyncCallback callback, object state) { var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.Instance; return BeginInvoke<DeactivateMFADeviceRequest>(request, marshaller, unmarshaller, callback, state); }
public void DeactivateMFADeviceMarshallTest() { var operation = service_model.FindOperation("DeactivateMFADevice"); var request = InstantiateClassGenerator.Execute<DeactivateMFADeviceRequest>(); var marshaller = new DeactivateMFADeviceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// <para>Deactivates the specified MFA device and removes it from /// association with the User name for which it was originally /// enabled.</para> /// </summary> /// /// <param name="deactivateMFADeviceRequest">Container for the necessary /// parameters to execute the DeactivateMFADevice service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="EntityTemporarilyUnmodifiableException"/> /// <exception cref="NoSuchEntityException"/> public DeactivateMFADeviceResponse DeactivateMFADevice(DeactivateMFADeviceRequest deactivateMFADeviceRequest) { IRequest<DeactivateMFADeviceRequest> request = new DeactivateMFADeviceRequestMarshaller().Marshall(deactivateMFADeviceRequest); DeactivateMFADeviceResponse response = Invoke<DeactivateMFADeviceRequest, DeactivateMFADeviceResponse> (request, this.signer, DeactivateMFADeviceResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the DeactivateMFADevice operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeactivateMFADevice operation on AmazonIdentityManagementServiceClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">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 void DeactivateMFADeviceAsync(DeactivateMFADeviceRequest request, AmazonServiceCallback<DeactivateMFADeviceRequest, DeactivateMFADeviceResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeactivateMFADeviceRequest,DeactivateMFADeviceResponse> responseObject = new AmazonServiceResult<DeactivateMFADeviceRequest,DeactivateMFADeviceResponse>((DeactivateMFADeviceRequest)req, (DeactivateMFADeviceResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeactivateMFADeviceRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the DeactivateMFADevice operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.DeactivateMFADevice"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeactivateMFADevice 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<DeactivateMFADeviceResponse> DeactivateMFADeviceAsync(DeactivateMFADeviceRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeactivateMFADeviceRequest, DeactivateMFADeviceResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Deactivates the specified MFA device and removes it from association with the user name for which it was originally enabled.</para> /// </summary> /// /// <param name="deactivateMFADeviceRequest">Container for the necessary parameters to execute the DeactivateMFADevice service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.EntityTemporarilyUnmodifiableException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeactivateMFADeviceResponse> DeactivateMFADeviceAsync(DeactivateMFADeviceRequest deactivateMFADeviceRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeactivateMFADeviceRequest, DeactivateMFADeviceResponse>(deactivateMFADeviceRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeDeactivateMFADevice(DeactivateMFADeviceRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DeactivateMFADeviceRequestMarshaller(); var unmarshaller = DeactivateMFADeviceResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }